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

Start renaming dims to dim #8487

Merged
merged 5 commits into from
Nov 28, 2023
Merged

Start renaming dims to dim #8487

merged 5 commits into from
Nov 28, 2023

Conversation

max-sixty
Copy link
Collaborator

Begins the process of #6646. I don't think it's feasible / enjoyable to do this for everything at once, so I would suggest we do it gradually, while keeping the warnings quite quiet, so by the time we convert to louder warnings, users can do a find/replace easily.

Begins the process of pydata#6646. I don't think it's feasible / enjoyable to do this for everything at once, so I would suggest we do it gradually, while keeping the warnings quite quiet, so by the time we convert to louder warnings, users can do a find/replace easily.
Copy link
Collaborator

@headtr1ck headtr1ck left a comment

Choose a reason for hiding this comment

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

Clean start, looks good!

xarray/util/deprecation_helpers.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

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

This looks good to me, but I think we don't have to warn for internal functions / methods (or if this would have been something a user would be able to influence, I think we should warn directly in the function / method that was called).

Additionally, would it make sense to use emit_user_level_warning instead of warnings.warn with a constant stack level?

xarray/core/alignment.py Show resolved Hide resolved
xarray/core/variable.py Show resolved Hide resolved
xarray/core/dataarray.py Show resolved Hide resolved
@max-sixty
Copy link
Collaborator Author

Additionally, would it make sense to use emit_user_level_warning instead of warnings.warn with a constant stack level?

Good idea, done

@max-sixty max-sixty merged commit e7e8c38 into pydata:main Nov 28, 2023
28 checks passed
@max-sixty max-sixty deleted the dim-dims branch November 28, 2023 21:04
dcherian added a commit to rabernat/xarray that referenced this pull request Nov 29, 2023
* upstream/main:
  Raise an informative error message when object array has mixed types (pydata#4700)
  Start renaming `dims` to `dim` (pydata#8487)
  Reduce redundancy between namedarray and variable tests (pydata#8405)
  Fix Zarr region transpose (pydata#8484)
  Refine rolling_exp error messages (pydata#8485)
  Use numbagg for `ffill` by default (pydata#8389)
  Fix bug for categorical pandas index with categories with EA dtype (pydata#8481)
  Improve "variable not found" error message (pydata#8474)
  Add whatsnew for pydata#8475 (pydata#8478)
  Allow `rank` to run on dask arrays (pydata#8475)
  Fix mypy tests (pydata#8476)
  Use concise date format when plotting (pydata#8449)
  Fix `map_blocks` docs' formatting (pydata#8464)
  Consolidate `_get_alpha` func (pydata#8465)
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.

3 participants