forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] main from pydata:main #563
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…9045) * add link to CF conventions on packed data in doc/user-guide/io.rst * add whats-new.rst entry * add more details to type determination * fix whats-new.rst * remove a comma --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> Co-authored-by: Justus Magin <keewis@users.noreply.github.com>
* add order for polynomial, fixes #8762 * add bugfixes in whats_new.rst, fixes #8762 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix typo * Update xarray/core/resample.py setdefault "bounds_error", and not forcing it. Thanks @dcherian Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> * chore(test) : polynomial resample * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(setdefault) : change dict to arg * fix(test) : polynomial interpolate tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(test) : add comment using interp1d for polynomial * Update xarray/tests/test_groupby.py * Update doc/whats-new.rst * Update whats-new.rst * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deepak Cherian <deepak@cherian.net> Co-authored-by: Justus Magin <keewis@posteo.de> Co-authored-by: Justus Magin <keewis@users.noreply.github.com>
…e` (#9042) * (fix): don't handle time-dtypes as extension arrays * (fix): check series type * Add whats-new --------- Co-authored-by: Deepak Cherian <deepak@cherian.net> Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* conda instead of mamba * Make speedups using fastpath * Change core logic to apply_indexes_fast * Always have fastpath=True in one path * Remove basicindexer fastpath=True * Duplicate a comment * Add comments * revert asv changes * Avoid fastpath=True assignment * Remove changes to basicindexer * Do not do fast fastpath for IndexVariable * Remove one unecessary change * Remove one more fastpath * Revert uneeded change to PandasIndexingAdapter * Update xarray/core/indexes.py * Update whats-new.rst * Update whats-new.rst * fix whats-new --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> Co-authored-by: Deepak Cherian <deepak@cherian.net>
…9014) * open_datatree performance improvement on NetCDF files * fixing issue with forward slashes * fixing issue with pytest * open datatree in zarr format improvement * fixing incompatibility in returned object * passing group parameter to opendatatree method and reducing duplicated code * passing group parameter to opendatatree method - NetCDF * Update xarray/backends/netCDF4_.py renaming variables Co-authored-by: Tom Nicholas <tom@cworthy.org> * renaming variables * renaming variables * renaming group_store variable * removing _open_datatree_netcdf function not used anymore in open_datatree implementations * improving performance of open_datatree method * renaming 'i' variable within list comprehension in open_store method for zarr datatree * using the default generator instead of loading zarr groups in memory * fixing issue with group path to avoid using group[1:] notation. Adding group variable typing hints (str | Iterable[str] | callable) under the open_datatree for h5 files. Finally, separating positional from keyword args * fixing issue with group path to avoid using group[1:] notation and adding group variable typing hints (str | Iterable[str] | callable) under the open_datatree method for netCDF files * fixing issue with group path to avoid using group[1:] notation and adding group variable typing hints (str | Iterable[str] | callable) under the open_datatree method for zarr files * adding 'mode' parameter to open_datatree method * adding 'mode' parameter to H5NetCDFStore.open method * adding new entry related to open_datatree performance improvement * adding new entry related to open_datatree performance improvement * Getting rid of unnecessary parameters for 'open_datatree' method for netCDF4 and Hdf5 backends --------- Co-authored-by: Tom Nicholas <tom@cworthy.org> Co-authored-by: Kai Mühlbauer <kai.muehlbauer@uni-bonn.de>
* skip the roundtrip test with `pandas=3.0` * mention the relevant issue in the skip reason
* Add user survey announcement to docs * FIx styling --------- Co-authored-by: Justus Magin <keewis@users.noreply.github.com> Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Joe Hamman <joe@earthmover.io>
* Try fixing hypothesis CI trigger * [skip-ci] test * empty
* typo * update the version number * release notes * remove empty sections * update the list of contributors * core-dev spelling [skip-ci] * reflow * reword the release summary * note for `numpy` 2 compat * reword * punctuation [skip-ci] * list spacing [skip-ci] * broken PR link [skip-ci] * reword a entry * typo * update the release notes * core dev spelling [skip-ci]
* Move Sphinx directives out of `See also` This is potentially using the `See also` to not render the links? (Does anyone know this better? It doesn't seem easy to build the docs locally... * Update computation.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Move Groupers out to groupers.py * cleanup * missed one.
* adjust repr tests to account for different platforms (#9127) Adjust the expectations in repr tests to account for different object sizes and numpy type representations across platforms, particularly fixing the tests on 32-bit platforms. Firstly, this involves getting the object type size from NumPy and using it to adjust the expectations in DataArray and Dataset tests. The tests were already using int64 type consistently, so only the sizes used for Python objects needed to be adjusted. Secondly, this involves fixing `test_array_repr_dtypes_unix`. The test specifically focuses on testing a 32-bit, 64-bit and "native" data type, which affect both size and actual representation (NumPy skips the dtype attribute for the native data type). Get the expected size from NumPy for the native int type, and reuse `repr()` from NumPy for all array types. * Try combining Unix and Windows dtype repr tests
Bumps the actions group with 2 updates: [codecov/codecov-action](https://github.com/codecov/codecov-action) and [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish). Updates `codecov/codecov-action` from 4.4.1 to 4.5.0 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v4.4.1...v4.5.0) Updates `pypa/gh-action-pypi-publish` from 1.8.14 to 1.9.0 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@v1.8.14...v1.9.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Allow duplicate dimensions in chunking * Address review comments * fix whats-new * add comment * Update xarray/tests/test_dask.py --------- Co-authored-by: Deepak Cherian <deepak@cherian.net> Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* Do we want the zendoo badge? It currently isn't a badge and the link is broken? * Update README.md Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* Split out distributed writes in zarr docs This was under 'Modifying existing Zarr stores', which I understand from a dev perspective but isn't what folks will be scanning for * And some reorg * clarify dask is generally sufficient * .
* Remove internal use of IndexVariable * cleanup * cleanup more * cleanup
* Improve zarr chunks docs Makes them more structure, consistent. I think removes a mistake re the default chunks arg in `open_zarr` (it's not `None`, it's `auto`). Adds a comment re performance with `chunks=None`, closing #9111
* Include numbagg in type checks
* Remove mypy exclusions for a couple more libraries Also (unrelated) allow mypy passing without `array_api_strict` installed, which isn't in our dev dependencies...
* Add test for #9155 I can't get this to fail locally, so adding a test to assess what's going on. Alos excludes matplotlib from type exclusions * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add config to build mermaid diagrams in docs --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deepak Cherian <deepak@cherian.net>
* Improve DataTree repr * Adjust DataTree repr to include full path * More tweaks * Use "Group:" in repr instead of "DataTree:" * Fix errors in new repr tests * Fix repr on windows
* Change np.core.defchararray to np.char.chararray (#9165) Replace a reference to np.core.defchararray with np.char.chararray in xarray.testing.assertions, since the former no longer works on NumPy 2.0.0 and the latter is the "preferred alias" according to NumPy docs. See Issue #9165. * Add test for assert_allclose on dtype S (#9165) * Use np.char.decode, not np.char.chararray.decode ... in assertions._decode_string_data. See #9166. * List #9165 fix in whats-new.rst * cross-like the fixed function * Improve a parameter ID in tests.test_assertions Co-authored-by: Justus Magin <keewis@users.noreply.github.com> * whats-new normalization --------- Co-authored-by: Justus Magin <keewis@users.noreply.github.com>
…9182) * promote floating-point dates to 64-bit while decoding * add a test to make sure we don't regress * whats-new entry
* draft for setting `source` from pre-opened `fsspec` file objects * refactor to only import `fsspec` if we're actually going to check Could use `getattr(filename_or_obj, "path", filename_or_obj)` to avoid `isinstance` checks. * replace with a simple `getattr` on `"path"` * add a test * whats-new entry * open the file as a context manager
* move the attr comparison into a common function * check that we can actually diff objects with array attrs * whats-new entry * Add property test * Add more dtypes * Better test * Fix skip * Use simple attrs strategy --------- Co-authored-by: Deepak Cherian <deepak@cherian.net> Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* allow str in reindex * add whats-new
* Fix dark-theme in html tag * Add to release notes
* open_datatree performance improvement on NetCDF files * fixing issue with forward slashes * fixing issue with pytest * open datatree in zarr format improvement * fixing incompatibility in returned object * passing group parameter to opendatatree method and reducing duplicated code * passing group parameter to opendatatree method - NetCDF * Update xarray/backends/netCDF4_.py renaming variables Co-authored-by: Tom Nicholas <tom@cworthy.org> * renaming variables * renaming variables * renaming group_store variable * removing _open_datatree_netcdf function not used anymore in open_datatree implementations * improving performance of open_datatree method * renaming 'i' variable within list comprehension in open_store method for zarr datatree * using the default generator instead of loading zarr groups in memory * fixing issue with group path to avoid using group[1:] notation. Adding group variable typing hints (str | Iterable[str] | callable) under the open_datatree for h5 files. Finally, separating positional from keyword args * fixing issue with group path to avoid using group[1:] notation and adding group variable typing hints (str | Iterable[str] | callable) under the open_datatree method for netCDF files * fixing issue with group path to avoid using group[1:] notation and adding group variable typing hints (str | Iterable[str] | callable) under the open_datatree method for zarr files * adding 'mode' parameter to open_datatree method * adding 'mode' parameter to H5NetCDFStore.open method * adding new entry related to open_datatree performance improvement * adding new entry related to open_datatree performance improvement * Getting rid of unnecessary parameters for 'open_datatree' method for netCDF4 and Hdf5 backends * passing parent argument into _iter_zarr_groups instead of group[1:] for creating group path * adding benchmark test for opening a deeply nested data tree. This include a new class named 'IONestedDataTree' and another class for benchmarck named 'IOReadDataTreeNetCDF4' * Update doc/whats-new.rst --------- Co-authored-by: Tom Nicholas <tom@cworthy.org> Co-authored-by: Kai Mühlbauer <kai.muehlbauer@uni-bonn.de> Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
…datetime column (#9174) * use a `composite` to generate the dataframe with a tz-aware dt column * remove the `xfail`
* Inheritance of data coordinates * Simplify __init__ * Include path name in alignment errors * Fix some mypy errors * mypy fix * simplify DataTree data model * Add to_dataset(local=True) * Fix mypy failure in tests * Fix to_zarr for inherited coords * Fix to_netcdf for heirarchical coords * Add ChainSet * Revise internal data model; remove ChainSet * add another way to construct inherited indexes * Finish refactoring error message * include inherited dimensions in HTML repr, too * Construct ChainMap objects on demand. * slightly better error message with mis-aligned data trees * mypy fix * use float64 instead of float32 for windows * clean-up per review * Add note about inheritance to .ds docs
…rdinate diffs (#9157) * use `.xindexes` to construct the diff * check that the indexes are never converted to pandas indexes * deduplicate the various custom index dummy implementations * whats-new [skip-rtd] * fill in the pr number --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Some minor repetiton
* Fix two bugs in DataTree.update() 1. Fix handling of coordinates on a Dataset argument (previously these were silently dropped). 2. Do not copy inherited coordinates down to lower level nodes. * add mypy annotation
* Only use necessary dims when creating temporary dataarray * Update dataset_plot.py * Can't check only data_vars all corrds are no longer added by default * Update dataset_plot.py * Add tests * Update whats-new.rst * Update dataset_plot.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )