Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax package dependency requirements #557

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

WeatherGod
Copy link
Contributor

@WeatherGod WeatherGod commented Aug 9, 2024

  • Relax dependency requirements to allow newer versions.
  • Gain numpy 2.x compatibility by fixing np.NaN to np.nan

@WeatherGod
Copy link
Contributor Author

Closes #535. Trying it out without pinning numpy to <2.0 as, technically, it didn't before.

@WeatherGod
Copy link
Contributor Author

Just did a numpy 2.0 compatibility check with ruff, and there are some mistakes that looks like are easily fixable.

Copy link

sonarcloud bot commented Aug 9, 2024

@WeatherGod
Copy link
Contributor Author

This also supersedes #536.

@WeatherGod WeatherGod marked this pull request as ready for review August 9, 2024 19:26
Copy link

sourcery-ai bot commented Aug 9, 2024

Reviewer's Guide by Sourcery

This pull request focuses on relaxing package dependency requirements by replacing all instances of np.NaN with np.nan across multiple files. This change ensures consistency and compatibility with different versions of numpy.

File-Level Changes

Files Changes
src/climate_indices/compute.py
src/climate_indices/utils.py
src/climate_indices/eto.py
src/climate_indices/__spi__.py
Replaced all instances of np.NaN with np.nan for consistency and to avoid potential issues with different numpy versions.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @WeatherGod - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@monocongo
Copy link
Owner

Thanks for the tidy-up for numpy, @WeatherGod

@monocongo monocongo merged commit c561111 into monocongo:master Aug 10, 2024
6 checks passed
@WeatherGod WeatherGod deleted the relax-packages branch August 14, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants