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

Add mode='a-': Do not overwrite coordinates when appending to Zarr with append_dim #8428

Merged
merged 9 commits into from
Dec 1, 2023

Conversation

rabernat
Copy link
Contributor

@rabernat rabernat commented Nov 8, 2023

This implements the 1b option described in #8427.

@github-actions github-actions bot added topic-backends topic-zarr Related to zarr storage library io labels Nov 8, 2023
Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

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

Looks great.

One thing we could consider adding (not to this PR), is some logging on what exactly gets written. I can imagine this being a bit confusing, and in my own code I've found logging the dataset that's about to be written quite helpful. It would be the first place we add logging to xarray though...

@rabernat
Copy link
Contributor Author

What is up with the "CI / macos-latest py3.11" test? It's taking hours. Is this a known issue?

@max-sixty
Copy link
Collaborator

What is up with the "CI / macos-latest py3.11" test? It's taking hours. Is this a known issue?

I've had it occasionally get stuck. It'll never finish and then timeout. So don't wait for it... I'm not sure what's causing it.

* main:
  [skip-ci] dev whats-new (pydata#8467)
  2023.11.0 Whats-new (pydata#8461)
  migrate the other CI to python 3.11 (pydata#8416)
  preserve vlen string dtypes, allow vlen string fill_values (pydata#7869)
  Pin mypy < 1.7 (pydata#8458)
  Fix typos found by codespell (pydata#8457)
  [skip-ci] Small updates to IO docs. (pydata#8452)
  Deprecate certain cftime frequency strings following pandas (pydata#8415)
  Added driver parameter for h5netcdf (pydata#8360)
  Raise exception in to_dataset if resulting variable is also the name of a coordinate (pydata#8433)
  Automatic region detection and transpose for `to_zarr()` (pydata#8434)
  remove `cdms2` (pydata#8441)
  Remove PseudoNetCDF (pydata#8446)
  Pin pint to >=0.22 (pydata#8445)
  Remove keep_attrs from resample signature (pydata#8444)
  Rename `to_array` to `to_dataarray` (pydata#8438)
  Add missing DataArray.dt.total_seconds() method (pydata#8435)
  Declare Dataset, DataArray, Variable, GroupBy unhashable (pydata#8392)
* 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)
@dcherian dcherian added the plan to merge Final call for comments label Nov 29, 2023
@dcherian dcherian changed the title Do not overwrite coordinates when appending to Zarr with append_dim Add mode='a-': Do not overwrite coordinates when appending to Zarr with append_dim Nov 29, 2023
@andersy005 andersy005 enabled auto-merge (squash) December 1, 2023 02:25
@andersy005 andersy005 merged commit c93b31a into pydata:main Dec 1, 2023
27 of 28 checks passed
@rabernat
Copy link
Contributor Author

rabernat commented Dec 1, 2023

Have not actually done an Xarray PR in quite a while. 😊 Thanks for your help everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io plan to merge Final call for comments topic-backends topic-typing topic-zarr Related to zarr storage library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ambiguous behavior with coordinates when appending to Zarr store with append_dim
4 participants