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

Replace rio.set_crs with rio.write_crs in load_tile_map function #3321

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Jul 9, 2024

Description of proposed changes

Rioxarray 0.16.0 has deprecated the use of set_crs in favour of write_crs. Xref corteva/rioxarray#793

Fixes FutureWarning: It is recommended to use 'rio.write_crs()' instead. 'rio.set_crs()' will likelybe removed in a future release

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

Rioxarray 0.16.0 has deprecated the use of `set_crs` in favour of `write_crs`. Xref corteva/rioxarray#793
@weiji14 weiji14 added the deprecation Deprecating a feature label Jul 9, 2024
@weiji14 weiji14 added this to the 0.13.0 milestone Jul 9, 2024
@weiji14 weiji14 self-assigned this Jul 9, 2024
The `write_crs` command will write an extra grid_mapping attribute to the encoding that shows up in the coordinates.
@weiji14 weiji14 marked this pull request as ready for review July 9, 2024 08:44
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

The changes look good, but do we want to have the "deprecation" label?

@weiji14
Copy link
Member Author

weiji14 commented Jul 9, 2024

Yeah, was wondering about that too. Putting it under 'maintenance' seems a bit weird though.

@seisman
Copy link
Member

seisman commented Jul 9, 2024

skip changelog?

@weiji14
Copy link
Member Author

weiji14 commented Jul 9, 2024

Prefer to have it in the changelog since there is a slight change in the output xarray.DataArray. How about labelling it as 'bug'?

@seisman
Copy link
Member

seisman commented Jul 9, 2024

ok to me

@seisman seisman added bug Something isn't working and removed deprecation Deprecating a feature labels Jul 9, 2024
@weiji14 weiji14 merged commit 3a32169 into main Jul 9, 2024
24 checks passed
@weiji14 weiji14 deleted the write_crs branch July 9, 2024 20:13
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants