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

Tests for the IO module #492

Merged
merged 40 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
82bf43c
first batch of tests
RondeauG Nov 7, 2024
0bfe1bd
more tests and fixes
RondeauG Nov 11, 2024
042b36f
more tests
RondeauG Nov 11, 2024
b1424c2
maybe fix lint
RondeauG Nov 12, 2024
2876f4a
maybe fix lint pt2
RondeauG Nov 12, 2024
4c0b4dd
fix some tests
RondeauG Nov 12, 2024
d15e740
try with previous flox version
RondeauG Nov 12, 2024
fa8206d
pin dask
RondeauG Nov 12, 2024
02f0d81
more explicit pins
RondeauG Nov 12, 2024
0081ead
upd changelog
RondeauG Nov 12, 2024
311965f
Update environment-dev.yml
RondeauG Nov 14, 2024
ffb66c1
Update environment.yml
RondeauG Nov 14, 2024
45ba4e8
Update pyproject.toml
RondeauG Nov 14, 2024
a085e79
Update environment-dev.yml
RondeauG Nov 14, 2024
abc2a40
Update environment.yml
RondeauG Nov 14, 2024
d0fb03d
Update pyproject.toml
RondeauG Nov 14, 2024
e7e9853
open_dataset to nimbus
RondeauG Nov 15, 2024
40f6075
more nimbus
RondeauG Nov 15, 2024
1a8e029
try to fix bad nimbus url
RondeauG Nov 15, 2024
184852d
revert change to nb
RondeauG Nov 15, 2024
e7dd5c3
address comments from code review
RondeauG Nov 18, 2024
f31b798
maybe fix nimbus
RondeauG Nov 18, 2024
7b9f8ad
Update docs/notebooks/4_ensembles.ipynb
RondeauG Nov 18, 2024
53a8aeb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 18, 2024
ebf7ded
try without zmetadata
RondeauG Nov 19, 2024
b04982f
Merge remote-tracking branch 'origin/road_to_90cov' into road_to_90cov
RondeauG Nov 19, 2024
c676877
revert
RondeauG Nov 19, 2024
c316993
comment it all
RondeauG Nov 19, 2024
2269cb1
remove subfunction
RondeauG Nov 19, 2024
5919bd4
more comments
RondeauG Nov 19, 2024
779a001
try to limit esmf
RondeauG Nov 19, 2024
93389c1
try without xesmf pin
RondeauG Nov 19, 2024
b09da87
switch pins
RondeauG Nov 19, 2024
a159f72
uncomment tests
RondeauG Nov 19, 2024
5c40c98
add pins
RondeauG Nov 19, 2024
71f6dda
explicit nimbus function
RondeauG Nov 19, 2024
623ce86
Update docs/notebooks/4_ensembles.ipynb
RondeauG Nov 20, 2024
4448bfa
add downloader
RondeauG Nov 20, 2024
fdf85d6
forgot pooch
RondeauG Nov 20, 2024
55720c2
cleanup
RondeauG Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@
Changelog
=========

v0.11.0 (unreleased)
--------------------
Contributors to this version: Gabriel Rondeau-Genesse (:user:`RondeauG`).

New features and enhancements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* N/A

Breaking changes
^^^^^^^^^^^^^^^^
* ``xs.utils.publish_release_notes`` and ``xs.utils.show_versions`` have been moved to ``xs.testing``. (:pull:`492`).

Bug fixes
^^^^^^^^^
* Added a missing library (``openpyxl``) to the requirements. (:pull:`492`).
* Fixed a bug in ``xs.io.subset_maxsize`` where the function would drop the last year. (:pull:`492`).
* Fixed a bug in ``xs.io.clean_incomplete`` where the `.zmetadata` file was not removed. (:pull:`492`).
* Fixed a bug in the saving of datasets where encoding was sometimes not applied, resulting for example in rechunking not being respected. (:pull:`492`).
* Fixed multiple bugs in ``xs.io.save_to_zarr`` with `mode='a'`. (:pull:`492`).
* Fixed a few minor bugs in ``xs.io.save_to_table``. (:pull:`492`).

Internal changes
^^^^^^^^^^^^^^^^
* Added a new parameter `latest` to ``xs.testing.publish_release_notes`` to only print the latest release notes. (:pull:`492`).
* The estimation method in ``xs.io.estimate_chunks`` has been improved. (:pull:`492`).
* A new parameter `incomplete` has been added to ``xs.io.clean_incomplete`` to remove incomplete variables. (:pull:`492`).
* Continued work on adding tests. (:pull:`492`).


v0.10.1 (2024-11-04)
--------------------
Contributors to this version: Gabriel Rondeau-Genesse (:user:`RondeauG`), Pascal Bourgault (:user:`aulemahal`), Éric Dupuis (:user:`coxipi`).
Expand Down
8 changes: 6 additions & 2 deletions docs/notebooks/4_ensembles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"metadata": {},
"outputs": [],
"source": [
"from xclim.testing import open_dataset\n",
"import xarray as xr\n",
"from xclim.testing.utils import nimbus\n",
"\n",
"import xscen as xs\n",
"\n",
Expand All @@ -53,7 +54,10 @@
"}\n",
"\n",
"for d in datasets:\n",
" ds = open_dataset(datasets[d]).isel(lon=slice(0, 4), lat=slice(0, 4))\n",
" file = nimbus(repo=\"https://github.com/Ouranosinc/xclim-testdata\").fetch(\n",
RondeauG marked this conversation as resolved.
Show resolved Hide resolved
" datasets[d]\n",
" )\n",
" ds = xr.open_dataset(file).isel(lon=slice(0, 4), lat=slice(0, 4))\n",
" ds = xs.climatological_op(\n",
" ds,\n",
" op=\"mean\",\n",
Expand Down
5 changes: 3 additions & 2 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies:
- cftime
- cf_xarray >=0.7.6
- clisops >=0.10
- dask
- flox
- dask >=2024.8.1,<2024.11 # FIXME: https://github.com/Ouranosinc/xclim/issues/1992
- flox !=0.9.14 # FIXME: 0.9.14 is a broken version. This pin could be removed eventually.
- fsspec
- geopandas
- h5netcdf
Expand All @@ -21,6 +21,7 @@ dependencies:
- netCDF4
- numcodecs
- numpy >=1.24
- openpyxl
- pandas >=2.2
- parse
- pyyaml
Expand Down
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies:
- cftime
- cf_xarray >=0.7.6
- clisops >=0.10
- dask
- flox
- dask >=2024.8.1,<2024.11 # FIXME: https://github.com/Ouranosinc/xclim/issues/1992
- flox !=0.9.14 # FIXME: 0.9.14 is a broken version. This pin could be removed eventually.
- fsspec
- geopandas
- h5netcdf
Expand All @@ -21,6 +21,7 @@ dependencies:
- netCDF4
- numcodecs
- numpy >=1.24
- openpyxl
- pandas >=2.2
- parse
- pyyaml
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ dependencies = [
"cftime",
"cf_xarray >=0.7.6",
"clisops >=0.10",
"dask",
"flox",
"dask >=2024.8.1,<2024.11", # FIXME: https://github.com/Ouranosinc/xclim/issues/1992
"flox !=0.9.14", # FIXME: 0.9.14 is a broken version. This pin could be removed eventually.
"fsspec",
"geopandas",
"h5netcdf",
Expand All @@ -54,6 +54,7 @@ dependencies = [
"netCDF4",
"numcodecs",
"numpy >=1.24",
"openpyxl",
"pandas >=2.2",
"parse",
# Used when opening catalogs.
Expand Down
Binary file modified src/xscen/data/fr/LC_MESSAGES/xscen.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions src/xscen/data/fr/LC_MESSAGES/xscen.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ msgstr "Description"
msgid "Units"
msgstr "Unités"

msgid "Content"
msgstr "Contenu"

msgid "Global attributes"
msgstr "Attributs globaux"

msgid "Content"
msgstr "Contenu"
Loading
Loading