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

merge develop to main for 0.5.9 #133

Merged
merged 29 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3620e8d
Add contributors (#105)
mchantry Oct 28, 2024
94a89e0
Feature/masks (#104)
b8raoult Oct 28, 2024
e5ec079
Feature/new checkpoints (#106)
b8raoult Oct 28, 2024
e1303ad
Feature/new datasets (#99)
mariahpope Oct 30, 2024
65485a4
qa
floriankrb Oct 31, 2024
88a8a27
make test optional when adls is not installed (#110)
floriankrb Oct 31, 2024
44c1b99
Xarray-zarr example dataset recipe (#108)
timothyas Nov 1, 2024
41243db
missing copyrigths
b8raoult Nov 3, 2024
7e03f10
missing copyrigths (#111)
b8raoult Nov 4, 2024
bd793a9
fixing --test (changing only the behaviour of creating datasets with …
floriankrb Nov 5, 2024
88441c3
more on testing
floriankrb Nov 6, 2024
32a2fa9
fix tests
floriankrb Nov 6, 2024
e1ab0b8
Feature/support multiple lams to the Cutout class (#113)
paulina-t Nov 8, 2024
b6d24da
[pre-commit.ci] pre-commit autoupdate (#112)
pre-commit-ci[bot] Nov 8, 2024
b2bfb22
Update .pre-commit-config.yaml (#120)
JesperDramsch Nov 11, 2024
c2264c4
fix qa for the notebook on multilam (#123)
floriankrb Nov 11, 2024
f5e0900
feature/fix qa (#124)
floriankrb Nov 11, 2024
6cb6689
Naming guidelines not available to all users. fixing #119 (#125)
floriankrb Nov 12, 2024
4c0213e
upload with ssh (#94)
floriankrb Nov 14, 2024
87a7b97
Feature/new checkpoints (#107)
b8raoult Nov 14, 2024
87dd985
Feature/merge (#126)
b8raoult Nov 14, 2024
a5a9ff7
Feature/use anemoi transform (#127)
b8raoult Nov 14, 2024
008a12d
Revert "Feature/merge (#126)" "Feature/new checkpoints (#107)" "uploa…
floriankrb Nov 14, 2024
9d6aba2
redo "Revert "Feature/merge (#126)" "Feature/new checkpoints (#107)" …
floriankrb Nov 14, 2024
7ca6358
fix merge
floriankrb Nov 14, 2024
bc374e0
Update to documentation on using missing dates (#128)
havardhhaugen Nov 14, 2024
10063ea
Merge branch 'develop' of github.com:ecmwf/anemoi-datasets into develop
b8raoult Nov 14, 2024
eee24e4
Simplify ci: run on develop, and on sundays. And disable downstream-c…
floriankrb Nov 15, 2024
78dd2ae
skipping long tests (#132)
floriankrb Nov 15, 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
23 changes: 15 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ jobs:
with:
anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
codecov_upload: true
skip_matrix_jobs: |
gnu@debian-11
[email protected]
gnu@debian-11
[email protected]
[email protected]
gnu@fedora-37
secrets: inherit

# Build downstream packages on HPC
downstream-ci-hpc:
name: downstream-ci-hpc
if: ${{ !contains(github.repository, 'private') && (!github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
with:
anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
secrets: inherit
# # Build downstream packages on HPC
# downstream-ci-hpc:
# name: downstream-ci-hpc
# if: ${{ !contains(github.repository, 'private') && (!github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci') }}
# uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
# with:
# anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
# secrets: inherit
11 changes: 8 additions & 3 deletions .github/workflows/python-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Code Quality checks for PRs
name: Test PR

on:
push:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- develop
schedule:
- cron: "9 2 * * 0" # at 9:02 on sunday


jobs:
quality:
Expand All @@ -17,7 +22,7 @@ jobs:
checks:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.11"]
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
with:
python-version: ${{ matrix.python-version }}
11 changes: 3 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: python-check-blanket-noqa # Check for # noqa: all
- id: python-no-log-warn # Check for log.warn
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
args: [--line-length=120]
Expand All @@ -40,7 +40,7 @@ repos:
- --force-single-line-imports
- --profile black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.2
hooks:
- id: ruff
args:
Expand All @@ -59,13 +59,8 @@ repos:
hooks:
- id: rstfmt
exclude: 'cli/.*' # Because we use argparse
- repo: https://github.com/b8raoult/pre-commit-docconvert
rev: "0.1.5"
hooks:
- id: docconvert
args: ["numpy"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.4"
rev: "v2.5.0"
hooks:
- id: pyproject-fmt

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ Keep it human-readable, your future self will thank you!

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


### Added

- Call filters from anemoi-transform
- make test optional when adls is not installed Pull request #110


## [0.5.8](https://github.com/ecmwf/anemoi-datasets/compare/0.5.7...0.5.8) - 2024-10-26

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

### Changed

- Upload with ssh (experimental)
- Remove upstream dependencies from downstream-ci workflow (temporary) (#83)
- ci: pin python versions to 3.9 ... 3.12 for checks (#93)
- Fix `__version__` import in init
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## How to Contribute

Please see the [read the docs](https://anemoi-training.readthedocs.io/en/latest/dev/contributing.html).


## Contributors

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).


## Contributing Organisations

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/)
12 changes: 12 additions & 0 deletions docs/building/sources/xarray-zarr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@
xarray-zarr
#############

Here is an example recipe that builds a dataset using one of the many
regridded versions of ERA5 hosted by Google in Analysis-Ready, Cloud
Optimized format. See `here
<https://cloud.google.com/storage/docs/public-datasets/era5>`_ for more
information.

.. literalinclude:: yaml/xarray-zarr.yaml
:language: yaml

Note that unlike the ``mars`` examples, there is no need to include a
``grid`` specification. Also, in order to subselect the vertical levels,
it is necessary to use the :ref:`join <building-join>` operation to join
separate lists containing 2D variables and 3D variables. If all vertical
levels are desired, then it is OK to specify a single source.
23 changes: 21 additions & 2 deletions docs/building/sources/yaml/xarray-zarr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
dates:
start: 2021-01-01T00:00:00
end: 2021-01-10T12:00:00
frequency: 6h

input:
xarray-zarr:
url: https://...
join:
- xarray-zarr:
url: "gs://gcp-public-data-arco-era5/ar/1959-2022-6h-128x64_equiangular_conservative.zarr"
param:
- surface_pressure
- 2m_temperature
- 10m_u_component_of_wind
- 10m_v_component_of_wind

- xarray-zarr:
url: "gs://gcp-public-data-arco-era5/ar/1959-2022-6h-128x64_equiangular_conservative.zarr"
param:
- temperature
level:
- 1000
- 500
10 changes: 10 additions & 0 deletions docs/using/missing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
Managing missing dates
########################

*********************************************
Managing missing dates with anemoi-training
*********************************************

Anemoi-training has internal handling of missing dates, and will
calculate the valid date indices used during training using the
``missing`` property. Consequenctly, when training a model with
anemoi-training, you should `not` specify a method to deal with missing
dates in the dataloader configuration file.

**************************************************
Filling the missing dates with artificial values
**************************************************
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#!/usr/bin/env python
# (C) Copyright 2024 ECMWF.
# (C) Copyright 2024 Anemoi contributors.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

[build-system]
requires = [
"setuptools>=60",
Expand Down Expand Up @@ -42,6 +40,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -97,6 +96,9 @@ optional-dependencies.tests = [
optional-dependencies.xarray = [
"gcsfs",
"kerchunk",
"pandas",
"planetary-computer",
"pystac-client",
]

urls.Documentation = "https://anemoi-datasets.readthedocs.io/"
Expand Down
4 changes: 3 additions & 1 deletion src/anemoi/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# (C) Copyright 2023 European Centre for Medium-Range Weather Forecasts.
# (C) Copyright 2024 Anemoi contributors.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
Expand Down
5 changes: 2 additions & 3 deletions src/anemoi/datasets/__main__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env python
# (C) Copyright 2024 ECMWF.
# (C) Copyright 2024 Anemoi contributors.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#

from anemoi.utils.cli import cli_main
from anemoi.utils.cli import make_parser
Expand Down
5 changes: 2 additions & 3 deletions src/anemoi/datasets/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env python
# (C) Copyright 2024 ECMWF.
# (C) Copyright 2024 Anemoi contributors.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#

import os

Expand Down
Loading
Loading