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

Update workflow to Python 3.12 #539

Merged
merged 4 commits into from
Jan 24, 2025
Merged

Update workflow to Python 3.12 #539

merged 4 commits into from
Jan 24, 2025

Conversation

cpaniaguam
Copy link
Member

This pull request includes updates to the CI workflow and a fix for compatibility with a new version of the rasterio library. The most important changes involve updating the Python version and adjusting the code to work with the new library version.

CI workflow updates:

  • .github/workflows/CI.yml: Updated the Python version from 3.11 to 3.12, added steps to install setuptools and uv for dependency conflict resolution, and modified the requirements installation process to use a compiled requirements file specific to Python 3.12.

Library compatibility fix:

  • src/latlon.py: Modified the getlatlon function to reshape arrays xs and ys to match the image shape, ensuring compatibility with rasterio version 1.4.3.

@cpaniaguam cpaniaguam self-assigned this Jan 23, 2025
@cpaniaguam cpaniaguam added the enhancement New feature or request label Jan 23, 2025
@cpaniaguam
Copy link
Member Author

With this update the package should pass the Julia Registry QA workflow.

jinja2>=3.1
numpy<2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, so it turns out you don't have to have numpy 2 for the updated rasterio?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to build with numpy 2 but it conflicted with other deps. It seems rasterio is still compatible with numpy 1.

src/latlon.py Outdated
ys = np.array(ys)

xs = xs.reshape(im.shape) # needed in rasterio 1.4.3
ys = ys.reshape(im.shape)
Copy link
Contributor

Choose a reason for hiding this comment

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

nice and clean

Copy link
Contributor

@danielmwatkins danielmwatkins left a comment

Choose a reason for hiding this comment

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

Glad to see it was a simple fix!

@cpaniaguam cpaniaguam merged commit 597bfb8 into main Jan 24, 2025
7 checks passed
@cpaniaguam cpaniaguam deleted the update-workflow-to-py-3.12 branch January 24, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants