From 8eb8dd544f453d8635f10a1e2a2a6bdb43318489 Mon Sep 17 00:00:00 2001 From: undefined <150700357+DeployDuck@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:16:33 +0000 Subject: [PATCH 1/2] chore: synced local './' with remote 'sync-files/anemoi/all/' Triggered from common files on https://github.com/ecmwf/reusable-workflows --- .github/CODEOWNERS | 1 + .github/labeler.yml | 43 ++++++ .github/pull_request_template.md | 15 ++ .github/workflows/pr-conventional-commit.yml | 22 +++ .github/workflows/pr-label-ats.yml | 66 ++++++++ .../pr-label-conventional-commits.yml | 48 ++++++ .github/workflows/pr-label-file-based.yml | 17 ++ .github/workflows/pr-label-public.yml | 10 ++ .github/workflows/python-publish.yml | 13 ++ .github/workflows/python-pull-request.yml | 25 +++ .github/workflows/readthedocs-pr-update.yml | 2 +- .github/workflows/release-please.yml | 28 ++++ .gitignore | 145 +++++++++++++++++- .pre-commit-config.yaml | 8 +- .release-please-config.json | 25 +++ CONTRIBUTORS.md | 6 +- README.md | 133 ++++------------ 17 files changed, 493 insertions(+), 114 deletions(-) create mode 100644 .github/labeler.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/pr-conventional-commit.yml create mode 100644 .github/workflows/pr-label-ats.yml create mode 100644 .github/workflows/pr-label-conventional-commits.yml create mode 100644 .github/workflows/pr-label-file-based.yml create mode 100644 .github/workflows/pr-label-public.yml create mode 100644 .github/workflows/python-publish.yml create mode 100644 .github/workflows/python-pull-request.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 .release-please-config.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ec88fc8..f218aea 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,3 +4,4 @@ # Project configs /pyproject.toml @ecmwf/AnemoiSecurity /.pre-commit-config.yaml @ecmwf/AnemoiSecurity +/.release-please-config.json @ecmwf/AnemoiSecurity diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..2912bb1 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,43 @@ +# This is the configuration file for the labeler action. +# It assigns labels to pull requests based on the files changed in the PR. +# See more here: https://github.com/actions/labeler +dependencies: +- changed-files: + - any-glob-to-any-file: + - "**/requirements.txt" + - "**/setup.py" + - "**/pyproject.toml" + - "**/Pipfile" + - "**/Pipfile.lock" + - "**/requirements/*.txt" + - "**/requirements/*.in" + +documentation: +- changed-files: + - any-glob-to-any-file: + - "**/docs/**/*" + - "*.md" + - "*.rst" + +config: +- changed-files: + - any-glob-to-any-file: + - "**/src/**/config/**/*" + - "**/src/anemoi/inference/config.py" + +CI/CD: +- changed-files: + - any-glob-to-any-file: + - "**/.pre-commit-config.yaml" + - ".github/**/*" + - "tox.ini" + - ".coveragerc" + +tests: +- changed-files: + - any-glob-to-any-file: + - "**/tests/**/*" + - "**/test/**/*" + - "**/test_*.py" + - "**/test.py" + - "**/conftest.py" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..879ff85 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +## Description + + +## What problem does this change solve? + + +## What issue or task does this change relate to? + + +## Additional notes ## + + +***As a contributor to the Anemoi framework, please ensure that your changes include unit tests, updates to any affected dependencies and documentation, and have been tested in a parallel setting (i.e., with multiple GPUs). As a reviewer, you are also responsible for verifying these aspects and requesting changes if they are not adequately addressed. For guidelines about those please refer to https://anemoi.readthedocs.io/en/latest/*** + +By opening this pull request, I affirm that all authors agree to the [Contributor License Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md) diff --git a/.github/workflows/pr-conventional-commit.yml b/.github/workflows/pr-conventional-commit.yml new file mode 100644 index 0000000..0bc4819 --- /dev/null +++ b/.github/workflows/pr-conventional-commit.yml @@ -0,0 +1,22 @@ +# This workflow ensures that the PR title follows the Conventional Commit format. +name: "[PR] Ensure Conventional Commit Title" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-label-ats.yml b/.github/workflows/pr-label-ats.yml new file mode 100644 index 0000000..3730c18 --- /dev/null +++ b/.github/workflows/pr-label-ats.yml @@ -0,0 +1,66 @@ +# This workflow checks that the appropriate ATS labels are applied to a pull request: +# - "ATS Approval Not Needed": pass +# - "ATS Approved": pass +# - "ATS Approval Needed": fail +# - Missing ATS label: fail + +name: "[PR] ATS labels" + +on: + pull_request: + types: + - opened + - edited + - reopened + - labeled + - unlabeled + - synchronize + +permissions: + pull-requests: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Get PR details + uses: actions/github-script@v7 + id: check-pr + with: + script: | + const pr = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const labels = pr.data.labels.map(label => label.name); + core.setOutput('labels', JSON.stringify(labels)); + core.setOutput('author', context.payload.pull_request.user.login); + + - name: Evaluate ATS labels + run: | + AUTHOR='${{ steps.check-pr.outputs.author }}' + if [ "$AUTHOR" == "DeployDuck" ] || [ "$AUTHOR" == "pre-commit-ci[bot]" ]; then + echo "Bot PR, skipping." + exit 0 + fi + LABELS=$(echo '${{ steps.check-pr.outputs.labels }}' | jq -r '.[]') + echo "Labels found:" + echo -e "$LABELS\n" + echo "Result:" + if echo "$LABELS" | grep -qi "ATS approval not needed"; then + echo "ATS approval not needed. Passing." + EXIT_CODE=0 + elif echo "$LABELS" | grep -qi "ATS approved"; then + echo "ATS Approved. Passing." + EXIT_CODE=0 + elif echo "$LABELS" | grep -qi "ATS approval needed"; then + echo "ATS Approval Needed. Failing." + EXIT_CODE=1 + else + echo "No ATS approval labels found. Please assign the appropriate ATS label. Failing." + EXIT_CODE=1 + fi + echo -e "\nFor more information on ATS labels, see:" + echo "https://anemoi.readthedocs.io/en/latest/contributing/guidelines.html#labelling-guidelines" + exit $EXIT_CODE diff --git a/.github/workflows/pr-label-conventional-commits.yml b/.github/workflows/pr-label-conventional-commits.yml new file mode 100644 index 0000000..641b2f5 --- /dev/null +++ b/.github/workflows/pr-label-conventional-commits.yml @@ -0,0 +1,48 @@ +# This workflow assigns labels to a pull request based on the Conventional Commits format. +# This is necessary for release-please to work properly. +name: "[PR] Label Conventional Commits" + +on: + pull_request: + branches: [main] + types: + [opened, reopened, labeled, unlabeled] + +permissions: + pull-requests: write + +jobs: + assign-labels: + runs-on: ubuntu-latest + name: Assign labels in pull request + if: github.event.pull_request.merged == false + steps: + - uses: actions/checkout@v3 + - name: Assign labels from Conventional Commits + id: action-assign-labels + uses: mauroalderete/action-assign-labels@v1 + with: + pull-request-number: ${{ github.event.pull_request.number }} + github-token: ${{ secrets.GITHUB_TOKEN }} + conventional-commits: | + conventional-commits: + - type: 'fix' + nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed'] + labels: ['bug'] + - type: 'feature' + nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat'] + labels: ['enhancement'] + - type: 'breaking_change' + nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR'] + labels: ['breaking change'] + - type: 'documentation' + nouns: ['doc','docs','docu','document','documentation'] + labels: ['documentation'] + - type: 'build' + nouns: ['build','rebuild','ci'] + labels: ['CI/CD'] + - type: 'config' + nouns: ['config', 'conf', 'configuration'] + labels: ['config'] + maintain-labels-not-matched: true + apply-changes: true diff --git a/.github/workflows/pr-label-file-based.yml b/.github/workflows/pr-label-file-based.yml new file mode 100644 index 0000000..8da8b08 --- /dev/null +++ b/.github/workflows/pr-label-file-based.yml @@ -0,0 +1,17 @@ +# This workflow assigns labels to a pull request based on the files changed in the PR. +# The labels are defined in the `.github/labels.yml` file. +name: "[PR] Label File-based" +on: + pull_request_target: + types: [opened, synchronize] + +permissions: + contents: read + pull-requests: write + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - name: Assign labels from file changes + uses: actions/labeler@v5 diff --git a/.github/workflows/pr-label-public.yml b/.github/workflows/pr-label-public.yml new file mode 100644 index 0000000..677dbce --- /dev/null +++ b/.github/workflows/pr-label-public.yml @@ -0,0 +1,10 @@ +# Manage labels of pull requests that originate from forks +name: "[PR] Label Forks" + +on: + pull_request_target: + types: [opened, synchronize] + +jobs: + label: + uses: ecmwf/reusable-workflows/.github/workflows/label-pr.yml@v2 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..e4519c1 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,13 @@ +# 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: Upload Python Package to PyPI + +on: + release: + types: [created] + +jobs: + deploy: + uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi.yml@v2 + secrets: inherit diff --git a/.github/workflows/python-pull-request.yml b/.github/workflows/python-pull-request.yml new file mode 100644 index 0000000..d63006c --- /dev/null +++ b/.github/workflows/python-pull-request.yml @@ -0,0 +1,25 @@ +# This workflow runs pre-commit checks and pytest tests against multiple platforms and Python versions. +name: Code Quality and Testing + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - main + schedule: + - cron: "9 2 * * 0" # at 9:02 on sunday + +jobs: + quality: + uses: ecmwf/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2 + with: + skip-hooks: "no-commit-to-branch" + + checks: + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + uses: ecmwf/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2 + with: + python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/readthedocs-pr-update.yml b/.github/workflows/readthedocs-pr-update.yml index 4c96b3a..d470f7e 100644 --- a/.github/workflows/readthedocs-pr-update.yml +++ b/.github/workflows/readthedocs-pr-update.yml @@ -1,6 +1,6 @@ # This workflow adds a link to the experimental documentation build to the PR. # This does NOT trigger a build of the documentation, this is handled through webhooks. -name: Read the Docs PR Preview +name: "[PR] Read the Docs Preview" on: pull_request_target: types: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..2f2620c --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,28 @@ +# This workflow uses an action to run Release Please to create a release PR. +# It is governed by the config and manifest in the root of the repo. +# For more information see: https://github.com/googleapis/release-please +name: Run Release Please +on: + push: + branches: + - main + - hotfix/* + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + # this assumes that you have created a personal access token + # (PAT) and configured it as a GitHub action secret named + # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + # optional. customize path to .release-please-config.json + config-file: .release-please-config.json + # Currently releases are done from main + target-branch: ${{ github.ref_name }} diff --git a/.gitignore b/.gitignore index fe5bfb8..f3777cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,143 @@ -_build/ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +__pypackages__/ + +# Distribution / packaging +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Testing and coverage +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Documentation +docs/_build/ +docs/_api/ +/site +*.mo +*.pot + +# Environments +.env +.envrc +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# IDEs +.idea/ +.spyderproject +.spyproject +.ropeproject +.vscode/ +*.code-workspace +*.sublime-project +*.sublime-workspace + +# Jupyter Notebook +.ipynb_checkpoints + +# Type checking +.mypy_cache/ +.dmypy.json +dmypy.json +.pyre/ +.pytype/ + +# Data files +*.grib +*.grib1 +*.grib2 +*.onnx +*.ckpt +*.npy +*.npz +*.zarr/ +*.nc +*.h5 +*.hdf5 +*.pkl +*.parquet +*.csv +*.xlsx +*.xls +*.json +*.txt +*.zip +*.db +*.tgz + +# ML artifacts +wandb/ +mlruns/ +lightning_logs/ +*.ckpt +*.pt +*.pth +runs/ +checkpoints/ + +# Temporary and system files +*.swp +*.download +*.out +*.sync +*.dot +*.tmp +*.log +*.log.* +.DS_Store +~* +tmp/ +temp/ +logs/ +_dev/ +_api/ +./outputs +*tmp_data/ + +# Project specific ? ?.* -~* -*.egg-info/ -__pycache__/ +foo +bar +~$images.pptx +test.py +test.ipynb +_version.py +*.to_upload +tempCodeRunnerFile.python +Untitled-*.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ad6724..fa1cfb1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,6 +39,7 @@ repos: - -l 120 - --force-single-line-imports - --profile black + - --project anemoi - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.12.11 hooks: @@ -57,7 +58,12 @@ repos: rev: v0.0.14 hooks: - id: rstfmt - exclude: 'cli/.*' # Because we use argparse + exclude: '(cli|schemas)/.*' # Because we use argparse and pydantic sphinx directives +- 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: "v2.6.0" hooks: diff --git a/.release-please-config.json b/.release-please-config.json new file mode 100644 index 0000000..1861a3e --- /dev/null +++ b/.release-please-config.json @@ -0,0 +1,25 @@ +{ + "release-type": "python", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "separate-pull-requests": true, + "always-update": true, + "changelog-type": "default", + "include-component-in-tag": false, + "include-v-in-tag": false, + "draft-pull-request": true, + "pull-request-title-pattern": "chore${scope}: Release${component} ${version}", + "pull-request-header": ":robot: Automated Release PR\n\nThis PR was created by `release-please` to prepare the next release. Once merged:\n\n1. A new version tag will be created\n2. A GitHub release will be published\n3. The changelog will be updated\n\nChanges to be included in the next release:", + "pull-request-footer": "> [!IMPORTANT]\n> Please do not change the PR title, manifest file, or any other automatically generated content in this PR unless you understand the implications. Changes here can break the release process.\n> :warning: Merging this PR will:\n> - Create a new release\n> - Trigger deployment pipelines\n> - Update package versions\n\n **Before merging:**\n - Ensure all tests pass\n - Review the changelog carefully\n - Get required approvals\n\n [Release-please documentation](https://github.com/googleapis/release-please)", + "packages": { + ".": { + "package-name": "anemoi" + } + }, + "plugins": [ + { + "type": "sentence-case" + } + ], + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +} diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1642494..52f0005 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,13 +1,13 @@ ## How to Contribute -Please see the [read the docs](https://anemoi-training.readthedocs.io/en/latest/dev/contributing.html). +Please see the [read the docs](https://anemoi.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-docs/graphs/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/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/) +Significant contributions have been made by the following organisations: [DWD](https://www.dwd.de/), [FMI](https://www.ilmatieteenlaitos.fi/), [KNMI](https://www.knmi.nl), [MET Norway](https://www.met.no/), [MeteoSwiss](https://www.meteoswiss.admin.ch/), [RMI](https://www.meteo.be/) & [ECMWF](https://www.ecmwf.int/) diff --git a/README.md b/README.md index d533424..35339ff 100644 --- a/README.md +++ b/README.md @@ -1,119 +1,42 @@ -Anemoi Framework -================ +# anemoi -[**Overview**](#overview) | [**Features**](#features) | [**Installation**](#installation) | [**Contributing**](#contributing) | [**Roadmap**](#roadmap) | [**Community**](#community) | [**License**](#license) | [**Other resources & References**](#other-resources--references) +**DISCLAIMER** +This project is **BETA** and will be **Experimental** for the foreseeable future. +Interfaces and functionality are likely to change, and the project itself may be scrapped. +**DO NOT** use this software in any project/software that is operational. -Anemoi is an open-source, Python-based framework developed collaboratively by ECMWF and several European national meteorological services. It is designed to facilitate the development, training, and deployment of machine learning (ML) models for weather forecasting. As an 'end to end' framework, it provides a comprehensive toolkit that spans data preparation, model training, and inference, enabling meteorological organizations to leverage their own data for ML-based weather prediction. -![Anemoi Logo](docs/_static/logo.png) +## Documentation -- [Anemoi - A new framework for Weather Forecasting based on Machine Learning](https://www.ecmwf.int/en/about/media-centre/news/2024/anemoi-new-framework-weather-forecasting-based-machine-learning) +The documentation can be found at https://anemoi.readthedocs.io/. +## Install -Overview --------- -The `anemoi` repository aims, for now, to provide a centralized overview of the entire framework. -Additionally, it contains the [Anemoi Documentation](https://anemoi.readthedocs.io/en/latest/) and system-level tests that assess the interfaces and ensure all components work well with each other. +Install via `pip` with: -Anemoi offers a modular architecture composed of several packages, each targeting different components necessary for constructing data-driven weather models: +``` +$ pip install anemoi +``` -- **[anemoi-datasets](https://github.com/ecmwf/anemoi-datasets)**: Tools for handling and preprocessing meteorological datasets. -- **[anemoi-graphs](https://github.com/ecmwf/anemoi-core/tree/main/graphs)**: Utilities for constructing graph representations of meteorological data. -- **[anemoi-models](https://github.com/ecmwf/anemoi-core/tree/main/models)**: Core components for defining and training ML models, including graph neural networks (GNNs) and graph transformers. -- **[anemoi-training](https://github.com/ecmwf/anemoi-core/tree/main/training)**: Framework for training ML models, including support for distributed training. -- **[anemoi-inference](https://github.com/ecmwf/anemoi-inference)**: Tools for deploying trained models and performing inference. -- **[anemoi-transform](https://github.com/ecmwf/anemoi-transform)**: Utilities for data transformation and augmentation. -- **[anemoi-utils](https://github.com/ecmwf/anemoi-utils)**: Miscellaneous utility functions. -- **[anemoi-registry](https://github.com/ecmwf/anemoi-registry)**: Centralized registry for storing and accessing model configurations and metadata. +## License -Each package collects metadata that can be used by subsequent packages, facilitating a seamless workflow from data ingestion to operational model deployment. +``` +Copyright 2024-2025, Anemoi Contributors. -The diagram below shows the relationship of these packages in terms of dependencies.\ -![Anemoi Dependencies](docs/_static/dependencies.png) +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -The diagram below represents the main packages in the Anemoi framework and the general workflow for using them: + http://www.apache.org/licenses/LICENSE-2.0 -![Anemoi Workflow](docs/_static/anemoi_packages_workflow.png) +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -Summary of workflow: -- Start by building a dataset with `anemoi-datasets`. -- Train a model using `anemoi-core` (central yellow boxes inside a black rectangle): This repository groups three distinct but related packages to support model development: - - `anemoi-modes`: Contains definitions for different machine learning models. - - `anemoi-training`: Provides the training framework and utilities for fitting models on prepared datasets. - - `anemoi-graphs`: Supports graph-based representations for modeling meteorological data. -These three packages are separated to make development easier, but they all live under the [anemoi-core GitHub repository](https://github.com/ecmwf/anemoi-core). -- Perform predictions with `anemoi-inference`. -- Any domain-specific transformations and code that can be shared across datasets, training, and inference is handled by `anemoi-transform` -- Helper functions and domain-agnostic general purpose utilities are included in `anemoi-utils`. - -This structure separates concerns clearly, promotes reusability, and makes development modular while keeping core components organized under `anemoi-core`. - -Each package collects metadata that can be used by subsequent packages, facilitating a seamless workflow from data ingestion to operational model deployment. - - -Features --------- - -- **Modular Design**: Easily extendable components for various stages of the ML pipeline. -- **Customizable Configurations**: Flexible configuration system using Hydra for model and training parameters. -- **Distributed Training Support**: Leverage PyTorch Lightning for scalable and efficient training. -- **Interoperability**: Built on top of established Python tools including PyTorch, Lightning, Hydra, Zarr, Xarray, and Earthkit. -- **Open-Source Collaboration**: Developed in collaboration with multiple European meteorological services. - -Installation ------------- - -To install the Anemoi framework, clone the repository and install the required dependencies (e.g. for anemoi-transform) : - - $ git clone https://github.com/ecmwf/anemoi-transform.git - $ cd anemoi-transform - $ pip install -e - -Or one can also install each of the packages directly from PyPI - - $ pip install anemoi-transform - - -For detailed installation instructions and environment setup, refer to the [Installation Guide](https://anemoi.readthedocs.io/en/latest/installation/). - -Contributing ------------- - -We welcome contributions to the Anemoi framework! If you’d like to get involved, please follow the [Contributing Guide](https://anemoi.readthedocs.io/projects/training/en/stable/dev/contributing.html#), which outlines the full development workflow — from setting up your environment, to branching and committing, to opening pull requests and going through review. We encourage opening issues as way to discuss any ideas or new features as a first-step! - -If you’re new to Anemoi, we recommend starting with the [Getting Started Tour](https://anemoi.readthedocs.io/en/latest/getting-started/tour.html) for a quick overview of the framework before diving into development. - - -Roadmap -------- - -The development of the Anemoi framework follows a structured roadmap to ensure continuous improvement and feature development. -For a detailed view of planned milestones, priorities, and upcoming features, see the [Development Roadmap](https://anemoi.readthedocs.io/en/latest/contributing/roadmap.html#development-roadmap). - - -Community ---------- - -The Anemoi framework fosters an open and collaborative community. Governance is guided by clear principles to ensure transparency and inclusiveness, described in the [Governance Documentation](https://anemoi.readthedocs.io/en/latest/contributing/governance.html). - - -Community members are encouraged to participate in regular interactions such as the [Anemoi Community Meetings](https://anemoi.readthedocs.io/en/latest/contributing/roadmap.html#anemoi-community-meeting), where updates, discussions take place. - -License -------- - -Anemoi is licensed under the Apache License 2.0. -See the [LICENSE](https://github.com/ecmwf/anemoi-core/blob/main/LICENSE) file for more details. - -For more information, visit the [Anemoi Documentation](https://anemoi.readthedocs.io/en/latest/). - -Other resources & References ----------------------------- - -Additional resources for using and understanding Anemoi: - -- Documentation for each package within the framework: [Anemoi Packages Docs](https://anemoi.readthedocs.io/en/latest/) -- Anemoi webinars: [Anemoi Webinars](https://events.ecmwf.int/event/446/) -- `anemoi-configs` package for example configurations: [Anemoi Configs](https://github.com/ecmwf/anemoi-configs) -- Citation information: [How to Cite Anemoi](https://anemoi.readthedocs.io/en/latest/index.html#how-to-cite-anemoi) +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 a891bae16c5ba57ffe6014ebb923e4f501c6f9e2 Mon Sep 17 00:00:00 2001 From: undefined <150700357+DeployDuck@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:16:33 +0000 Subject: [PATCH 2/2] chore: created local 'LICENSE' from remote 'sync-files/general/python/LICENSE' Triggered from common files on https://github.com/ecmwf/reusable-workflows --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7b28688 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024-2025 Anemoi Contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.