Skip to content

Commit 12051e9

Browse files
floriankrbmchantryb8raoultmariahpopetimothyas
authored
preparing release 0.5.9 (#130)
* Add contributors (#105) * Add contributors Co-authored-by: Mario Santa Cruz <[email protected]> * Feature/masks (#104) * add masks Co-authored-by: Florian Pinault <[email protected]> * Feature/new checkpoints (#106) * add masks * Feature/new datasets (#99) * main changes * bugfix * few bugs and add unit tests * work with more planetary computer ds * add optional dependencies * qa * make test optional when adls is not installed (#110) * make test optional when adls is not installed * changelog * tests * tests * split tests * Xarray-zarr example dataset recipe (#108) * add a working xarray-zarr example * [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: b8raoult <[email protected]> * missing copyrigths * missing copyrigths (#111) * missing copyrigths * fixing --test (changing only the behaviour of creating datasets with --test) * more on testing * fix tests * Feature/support multiple lams to the Cutout class (#113) * Enhance Cutout class to support multiple LAMs with hierarchical masking. --------- Co-authored-by: Paulina Met. <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (#112) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black-pre-commit-mirror: 24.8.0 → 24.10.0](psf/black-pre-commit-mirror@24.8.0...24.10.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.2](astral-sh/ruff-pre-commit@v0.6.9...v0.7.2) - [github.com/tox-dev/pyproject-fmt: 2.2.4 → v2.5.0](tox-dev/pyproject-fmt@2.2.4...v2.5.0) * [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> * Update .pre-commit-config.yaml (#120) * fix qa for the notebook on multilam (#123) * feature/fix qa (#124) * fix qa for the notebook on multilam * fix qa for the yaml for multilam * Naming guidelines not available to all users. fixing #119 (#125) * upload with ssh (#94) * add copy to ssh target * Feature/new checkpoints (#107) * add masks * save masks to checkpoint * name supporting_arrays * better support for cutout * force np.datetime64 is seconds --------- Co-authored-by: Florian Pinault <[email protected]> * Feature/merge (#126) * save masks to checkpoint * force np.datetime64 is seconds * Call filters from anemoi-transform * when merging datasets, consider missing dates * add gcd for frequency --------- Co-authored-by: Florian Pinault <[email protected]> * Feature/use anemoi transform (#127) * Call filters from anemoi-transform --------- Co-authored-by: Florian Pinault <[email protected]> * Revert "Feature/merge (#126)" "Feature/new checkpoints (#107)" "upload with ssh (#94)" * redo "Revert "Feature/merge (#126)" "Feature/new checkpoints (#107)" "upload with ssh (#94)" * fix merge * Update to documentation on using missing dates (#128) * Updated docs on using datasets with missing dates * Simplify ci: run on develop, and on sundays. And disable downstream-ci-hpc. And test only python 3.11. And test only once when PR are updated. And shortest name to read the full description on github.ci. And test with only ubuntu. (same change as for anemoi-utils ecmwf/anemoi-utils#42) (#129) * skipping long tests (#132) --------- Co-authored-by: Matthew Chantry <[email protected]> Co-authored-by: b8raoult <[email protected]> Co-authored-by: Mariah Pope <[email protected]> Co-authored-by: Timothy Smith <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Baudouin Raoult <[email protected]> Co-authored-by: paulina-t <[email protected]> Co-authored-by: Paulina Met. <[email protected]> Co-authored-by: Jesper Dramsch <[email protected]> Co-authored-by: Håvard Homleid Haugen <[email protected]>
1 parent a6bde90 commit 12051e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2152
-234
lines changed

Diff for: .github/workflows/ci.yml

+15-8
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,20 @@ jobs:
4242
with:
4343
anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
4444
codecov_upload: true
45+
skip_matrix_jobs: |
46+
gnu@debian-11
47+
48+
gnu@debian-11
49+
50+
51+
gnu@fedora-37
4552
secrets: inherit
4653

47-
# Build downstream packages on HPC
48-
downstream-ci-hpc:
49-
name: downstream-ci-hpc
50-
if: ${{ !contains(github.repository, 'private') && (!github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }}
51-
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
52-
with:
53-
anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
54-
secrets: inherit
54+
# # Build downstream packages on HPC
55+
# downstream-ci-hpc:
56+
# name: downstream-ci-hpc
57+
# if: ${{ !contains(github.repository, 'private') && (!github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }}
58+
# uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
59+
# with:
60+
# anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
61+
# secrets: inherit

Diff for: .github/workflows/python-pull-request.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# This workflow will upload a Python Package using Twine when a release is created
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

4-
name: Code Quality checks for PRs
4+
name: Test PR
55

66
on:
7-
push:
87
pull_request:
98
types: [opened, synchronize, reopened]
9+
push:
10+
branches:
11+
- develop
12+
schedule:
13+
- cron: "9 2 * * 0" # at 9:02 on sunday
14+
1015

1116
jobs:
1217
quality:
@@ -17,7 +22,7 @@ jobs:
1722
checks:
1823
strategy:
1924
matrix:
20-
python-version: ["3.9", "3.10", "3.11", "3.12"]
25+
python-version: ["3.11"]
2126
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
2227
with:
2328
python-version: ${{ matrix.python-version }}

Diff for: .pre-commit-config.yaml

+3-8
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
- id: python-check-blanket-noqa # Check for # noqa: all
2828
- id: python-no-log-warn # Check for log.warn
2929
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 24.8.0
30+
rev: 24.10.0
3131
hooks:
3232
- id: black
3333
args: [--line-length=120]
@@ -40,7 +40,7 @@ repos:
4040
- --force-single-line-imports
4141
- --profile black
4242
- repo: https://github.com/astral-sh/ruff-pre-commit
43-
rev: v0.6.9
43+
rev: v0.7.2
4444
hooks:
4545
- id: ruff
4646
args:
@@ -59,13 +59,8 @@ repos:
5959
hooks:
6060
- id: rstfmt
6161
exclude: 'cli/.*' # Because we use argparse
62-
- repo: https://github.com/b8raoult/pre-commit-docconvert
63-
rev: "0.1.5"
64-
hooks:
65-
- id: docconvert
66-
args: ["numpy"]
6762
- repo: https://github.com/tox-dev/pyproject-fmt
68-
rev: "2.2.4"
63+
rev: "v2.5.0"
6964
hooks:
7065
- id: pyproject-fmt
7166

Diff for: CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ Keep it human-readable, your future self will thank you!
1010

1111
## [Unreleased](https://github.com/ecmwf/anemoi-datasets/compare/0.5.8...HEAD)
1212

13+
14+
### Added
15+
16+
- Call filters from anemoi-transform
17+
- make test optional when adls is not installed Pull request #110
18+
19+
1320
## [0.5.8](https://github.com/ecmwf/anemoi-datasets/compare/0.5.7...0.5.8) - 2024-10-26
1421

1522
### Changed
@@ -25,9 +32,13 @@ Keep it human-readable, your future self will thank you!
2532
- Various bug fixes
2633
- Control compatibility check in xy/zip
2734
- Add `merge` feature
35+
- Add support for storing `supporting_arrays` in checkpoint files
36+
- Allow naming of datasets components
37+
- Contributors file (#105)
2838

2939
### Changed
3040

41+
- Upload with ssh (experimental)
3142
- Remove upstream dependencies from downstream-ci workflow (temporary) (#83)
3243
- ci: pin python versions to 3.9 ... 3.12 for checks (#93)
3344
- Fix `__version__` import in init

Diff for: CONTRIBUTORS.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## How to Contribute
2+
3+
Please see the [read the docs](https://anemoi-training.readthedocs.io/en/latest/dev/contributing.html).
4+
5+
6+
## Contributors
7+
8+
Thank you to all the wonderful people who have contributed to Anemoi. Contributions can come in many forms, including code, documentation, bug reports, feature suggestions, design, and more. A list of code-based contributors can be found [here](https://github.com/ecmwf/anemoi-datasets/graphs/contributors).
9+
10+
11+
## Contributing Organisations
12+
13+
Significant contributions have been made by the following organisations: [DWD](https://www.dwd.de/), [MET Norway](https://www.met.no/), [MeteoSwiss](https://www.meteoswiss.admin.ch/), [RMI](https://www.meteo.be/) & [ECMWF](https://www.ecmwf.int/)

Diff for: docs/building/sources/xarray-zarr.rst

+12
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,17 @@
22
xarray-zarr
33
#############
44

5+
Here is an example recipe that builds a dataset using one of the many
6+
regridded versions of ERA5 hosted by Google in Analysis-Ready, Cloud
7+
Optimized format. See `here
8+
<https://cloud.google.com/storage/docs/public-datasets/era5>`_ for more
9+
information.
10+
511
.. literalinclude:: yaml/xarray-zarr.yaml
612
:language: yaml
13+
14+
Note that unlike the ``mars`` examples, there is no need to include a
15+
``grid`` specification. Also, in order to subselect the vertical levels,
16+
it is necessary to use the :ref:`join <building-join>` operation to join
17+
separate lists containing 2D variables and 3D variables. If all vertical
18+
levels are desired, then it is OK to specify a single source.

Diff for: docs/building/sources/yaml/xarray-zarr.yaml

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
dates:
2+
start: 2021-01-01T00:00:00
3+
end: 2021-01-10T12:00:00
4+
frequency: 6h
5+
16
input:
2-
xarray-zarr:
3-
url: https://...
7+
join:
8+
- xarray-zarr:
9+
url: "gs://gcp-public-data-arco-era5/ar/1959-2022-6h-128x64_equiangular_conservative.zarr"
10+
param:
11+
- surface_pressure
12+
- 2m_temperature
13+
- 10m_u_component_of_wind
14+
- 10m_v_component_of_wind
15+
16+
- xarray-zarr:
17+
url: "gs://gcp-public-data-arco-era5/ar/1959-2022-6h-128x64_equiangular_conservative.zarr"
18+
param:
19+
- temperature
20+
level:
21+
- 1000
22+
- 500

Diff for: docs/using/missing.rst

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
Managing missing dates
55
########################
66

7+
*********************************************
8+
Managing missing dates with anemoi-training
9+
*********************************************
10+
11+
Anemoi-training has internal handling of missing dates, and will
12+
calculate the valid date indices used during training using the
13+
``missing`` property. Consequenctly, when training a model with
14+
anemoi-training, you should `not` specify a method to deal with missing
15+
dates in the dataloader configuration file.
16+
717
**************************************************
818
Filling the missing dates with artificial values
919
**************************************************

Diff for: pyproject.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
#!/usr/bin/env python
2-
# (C) Copyright 2024 ECMWF.
1+
# (C) Copyright 2024 Anemoi contributors.
32
#
43
# This software is licensed under the terms of the Apache Licence Version 2.0
54
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
#
66
# In applying this licence, ECMWF does not waive the privileges and immunities
77
# granted to it by virtue of its status as an intergovernmental organisation
88
# nor does it submit to any jurisdiction.
99

10-
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
11-
1210
[build-system]
1311
requires = [
1412
"setuptools>=60",
@@ -42,6 +40,7 @@ classifiers = [
4240
"Programming Language :: Python :: 3.10",
4341
"Programming Language :: Python :: 3.11",
4442
"Programming Language :: Python :: 3.12",
43+
"Programming Language :: Python :: 3.13",
4544
"Programming Language :: Python :: Implementation :: CPython",
4645
"Programming Language :: Python :: Implementation :: PyPy",
4746
]
@@ -97,6 +96,9 @@ optional-dependencies.tests = [
9796
optional-dependencies.xarray = [
9897
"gcsfs",
9998
"kerchunk",
99+
"pandas",
100+
"planetary-computer",
101+
"pystac-client",
100102
]
101103

102104
urls.Documentation = "https://anemoi-datasets.readthedocs.io/"

Diff for: src/anemoi/datasets/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# (C) Copyright 2023 European Centre for Medium-Range Weather Forecasts.
1+
# (C) Copyright 2024 Anemoi contributors.
2+
#
23
# This software is licensed under the terms of the Apache Licence Version 2.0
34
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
#
46
# In applying this licence, ECMWF does not waive the privileges and immunities
57
# granted to it by virtue of its status as an intergovernmental organisation
68
# nor does it submit to any jurisdiction.

Diff for: src/anemoi/datasets/__main__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#!/usr/bin/env python
2-
# (C) Copyright 2024 ECMWF.
1+
# (C) Copyright 2024 Anemoi contributors.
32
#
43
# This software is licensed under the terms of the Apache Licence Version 2.0
54
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
#
66
# In applying this licence, ECMWF does not waive the privileges and immunities
77
# granted to it by virtue of its status as an intergovernmental organisation
88
# nor does it submit to any jurisdiction.
9-
#
109

1110
from anemoi.utils.cli import cli_main
1211
from anemoi.utils.cli import make_parser

Diff for: src/anemoi/datasets/commands/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#!/usr/bin/env python
2-
# (C) Copyright 2024 ECMWF.
1+
# (C) Copyright 2024 Anemoi contributors.
32
#
43
# This software is licensed under the terms of the Apache Licence Version 2.0
54
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
#
66
# In applying this licence, ECMWF does not waive the privileges and immunities
77
# granted to it by virtue of its status as an intergovernmental organisation
88
# nor does it submit to any jurisdiction.
9-
#
109

1110
import os
1211

0 commit comments

Comments
 (0)