diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 879ff85..4eef7f0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,4 +12,4 @@ ***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) +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/.gitignore b/.gitignore index 2e7d22a..1942896 100644 --- a/.gitignore +++ b/.gitignore @@ -102,6 +102,9 @@ dmypy.json *.tgz *.odb +# Keep the copyright notice used by pre-commit (overrides *.txt above) +!tools/pre-commit-copyright-notice.txt + # ML artifacts wandb/ mlruns/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bd8c031..e71f518 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,6 +58,18 @@ repos: hooks: - id: docconvert args: ["numpy"] +- repo: https://github.com/b8raoult/pre-commit-copyright-notice + rev: "0.3.0" + hooks: + - id: copyright-notice + args: + - --exclude=docs/**/*.py + - --fix + - --exit-non-zero-on-fix + - --holder + - Anemoi contributors + - --license + - tools/pre-commit-copyright-notice.txt - repo: https://github.com/tox-dev/pyproject-fmt rev: "v2.23.0" hooks: diff --git a/tests/system-level/anemoi_test/__init__.py b/tests/system-level/anemoi_test/__init__.py index e69de29..74e3f96 100644 --- a/tests/system-level/anemoi_test/__init__.py +++ b/tests/system-level/anemoi_test/__init__.py @@ -0,0 +1,8 @@ +# (C) Copyright 2026 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. diff --git a/tests/system-level/anemoi_test/config.py b/tests/system-level/anemoi_test/config.py index 32e3fe7..e765e62 100644 --- a/tests/system-level/anemoi_test/config.py +++ b/tests/system-level/anemoi_test/config.py @@ -1,3 +1,12 @@ +# (C) Copyright 2026 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 import wellies as wl diff --git a/tests/system-level/anemoi_test/nodes.py b/tests/system-level/anemoi_test/nodes.py index 8ac0dc0..8aba088 100644 --- a/tests/system-level/anemoi_test/nodes.py +++ b/tests/system-level/anemoi_test/nodes.py @@ -1,3 +1,12 @@ +# (C) Copyright 2026 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 from pathlib import Path from typing import Optional diff --git a/tests/system-level/deploy.py b/tests/system-level/deploy.py index ce4b9da..9689951 100755 --- a/tests/system-level/deploy.py +++ b/tests/system-level/deploy.py @@ -1,4 +1,13 @@ #!/usr/bin/env python3 +# (C) Copyright 2026 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. + # isort: skip_file """Deploy script for anemoi_test suite. This has been generated by the wellies-quickstart and the following versions: diff --git a/tools/github-stats.py b/tools/github-stats.py index 52e8ba7..33236f2 100755 --- a/tools/github-stats.py +++ b/tools/github-stats.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# (C) Copyright 2024 Anemoi contributors. +# (C) Copyright 2024-2026 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. diff --git a/tools/pre-commit-copyright-notice.txt b/tools/pre-commit-copyright-notice.txt new file mode 100644 index 0000000..dc6918c --- /dev/null +++ b/tools/pre-commit-copyright-notice.txt @@ -0,0 +1,6 @@ +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.