From 2b59bb540ebc693f3531780d982d47aa56bdd5ae Mon Sep 17 00:00:00 2001 From: b8raoult <53792887+b8raoult@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:13:44 +0100 Subject: [PATCH 1/2] Update copyright notice --- CHANGELOG.md | 1 + README.md | 2 +- src/anemoi/utils/caching.py | 5 ++++- src/anemoi/utils/checkpoints.py | 4 +++- src/anemoi/utils/cli.py | 5 ++++- src/anemoi/utils/commands/config.py | 5 ++--- src/anemoi/utils/config.py | 5 ++++- src/anemoi/utils/dates.py | 4 +++- src/anemoi/utils/grib.py | 5 ++++- src/anemoi/utils/hindcasts.py | 4 +++- src/anemoi/utils/humanize.py | 5 +++-- src/anemoi/utils/provenance.py | 5 ++++- src/anemoi/utils/s3.py | 5 ++++- src/anemoi/utils/sanitise.py | 4 +++- src/anemoi/utils/sanitize.py | 5 ++++- src/anemoi/utils/text.py | 5 ++++- src/anemoi/utils/timer.py | 5 ++++- tests/test_dates.py | 5 ++++- tests/test_frequency.py | 5 ++++- tests/test_provenance.py | 4 +++- tests/test_sanetise.py | 4 +++- tests/test_utils.py | 4 +++- 22 files changed, 72 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f10cc5..f37c623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Keep it human-readable, your future self will thank you! - Fix pre-commit regex - ci: extend python versions [#23] (https://github.com/ecmwf/anemoi-utils/pull/23) +- Update copyright notice ## [0.4.0](https://github.com/ecmwf/anemoi-utils/compare/0.3.18...0.4.0) - 2024-10-11 diff --git a/README.md b/README.md index 405ab42..168dc39 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ $ pip install anemoi-utils ## License ``` -Copyright 2022, European Centre for Medium Range Weather Forecasts. +Copyright 2024, Anemoi contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/anemoi/utils/caching.py b/src/anemoi/utils/caching.py index c033fe6..c628b44 100644 --- a/src/anemoi/utils/caching.py +++ b/src/anemoi/utils/caching.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + import hashlib import json import os diff --git a/src/anemoi/utils/checkpoints.py b/src/anemoi/utils/checkpoints.py index 9c28704..085e4d1 100644 --- a/src/anemoi/utils/checkpoints.py +++ b/src/anemoi/utils/checkpoints.py @@ -1,11 +1,13 @@ -# (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. + """Read and write extra metadata in PyTorch checkpoints files. These files are zip archives containing the model weights. """ diff --git a/src/anemoi/utils/cli.py b/src/anemoi/utils/cli.py index 8599e95..de1f512 100644 --- a/src/anemoi/utils/cli.py +++ b/src/anemoi/utils/cli.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + import argparse import importlib import logging diff --git a/src/anemoi/utils/commands/config.py b/src/anemoi/utils/commands/config.py index cce32b5..549fbea 100644 --- a/src/anemoi/utils/commands/config.py +++ b/src/anemoi/utils/commands/config.py @@ -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 json diff --git a/src/anemoi/utils/config.py b/src/anemoi/utils/config.py index 9bc7e20..a6a9cb9 100644 --- a/src/anemoi/utils/config.py +++ b/src/anemoi/utils/config.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + from __future__ import annotations import json diff --git a/src/anemoi/utils/dates.py b/src/anemoi/utils/dates.py index 5113f5b..f7373cd 100644 --- a/src/anemoi/utils/dates.py +++ b/src/anemoi/utils/dates.py @@ -1,6 +1,8 @@ -# (C) Copyright 2024 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. diff --git a/src/anemoi/utils/grib.py b/src/anemoi/utils/grib.py index c1d851d..0b82ba8 100644 --- a/src/anemoi/utils/grib.py +++ b/src/anemoi/utils/grib.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + """Utilities for working with GRIB parameters. See https://codes.ecmwf.int/grib/param-db/ for more information. diff --git a/src/anemoi/utils/hindcasts.py b/src/anemoi/utils/hindcasts.py index efec630..2c74efc 100644 --- a/src/anemoi/utils/hindcasts.py +++ b/src/anemoi/utils/hindcasts.py @@ -1,6 +1,8 @@ -# (C) Copyright 2024 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. diff --git a/src/anemoi/utils/humanize.py b/src/anemoi/utils/humanize.py index 9d6c7c6..60384c9 100644 --- a/src/anemoi/utils/humanize.py +++ b/src/anemoi/utils/humanize.py @@ -1,11 +1,12 @@ -# (C) Copyright 2020 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. -# + """Generate human readable strings""" diff --git a/src/anemoi/utils/provenance.py b/src/anemoi/utils/provenance.py index 3f32a34..f53e13b 100644 --- a/src/anemoi/utils/provenance.py +++ b/src/anemoi/utils/provenance.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + """Collect information about the current environment, like: - The Python version diff --git a/src/anemoi/utils/s3.py b/src/anemoi/utils/s3.py index 4413738..66af693 100644 --- a/src/anemoi/utils/s3.py +++ b/src/anemoi/utils/s3.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + """This module provides functions to upload, download, list and delete files and folders on S3. The functions of this package expect that the AWS credentials are set up in the environment typicaly by setting the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables or diff --git a/src/anemoi/utils/sanitise.py b/src/anemoi/utils/sanitise.py index 587134e..ffd99c6 100644 --- a/src/anemoi/utils/sanitise.py +++ b/src/anemoi/utils/sanitise.py @@ -1,6 +1,8 @@ -# (C) Copyright 2024 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. diff --git a/src/anemoi/utils/sanitize.py b/src/anemoi/utils/sanitize.py index cfc005b..49f8ecf 100644 --- a/src/anemoi/utils/sanitize.py +++ b/src/anemoi/utils/sanitize.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + from .sanitise import sanitise as sanitize __all__ = ["sanitize"] diff --git a/src/anemoi/utils/text.py b/src/anemoi/utils/text.py index 33c4329..0d555d8 100644 --- a/src/anemoi/utils/text.py +++ b/src/anemoi/utils/text.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + """Text utilities""" import re diff --git a/src/anemoi/utils/timer.py b/src/anemoi/utils/timer.py index 5d93f11..327f60c 100644 --- a/src/anemoi/utils/timer.py +++ b/src/anemoi/utils/timer.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + """Logging utilities.""" import logging diff --git a/tests/test_dates.py b/tests/test_dates.py index 598f572..a285550 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -1,10 +1,13 @@ -# (C) Copyright 2024 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. + import datetime from textwrap import dedent diff --git a/tests/test_frequency.py b/tests/test_frequency.py index d446680..26b2f1d 100644 --- a/tests/test_frequency.py +++ b/tests/test_frequency.py @@ -1,10 +1,13 @@ -# (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. + import datetime from anemoi.utils.dates import frequency_to_string diff --git a/tests/test_provenance.py b/tests/test_provenance.py index b7ce712..38ae793 100644 --- a/tests/test_provenance.py +++ b/tests/test_provenance.py @@ -1,6 +1,8 @@ -# (C) Copyright 2024 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. diff --git a/tests/test_sanetise.py b/tests/test_sanetise.py index eeb940d..e0ea5aa 100644 --- a/tests/test_sanetise.py +++ b/tests/test_sanetise.py @@ -1,6 +1,8 @@ -# (C) Copyright 2024 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. diff --git a/tests/test_utils.py b/tests/test_utils.py index 7bab679..67d55de 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,6 +1,8 @@ -# (C) Copyright 2024 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. From a0f71e9755f7ca7c96c5acf4c52486a7774bb7f3 Mon Sep 17 00:00:00 2001 From: Florian Pinault Date: Thu, 24 Oct 2024 13:04:18 +0200 Subject: [PATCH 2/2] put shebang back --- src/anemoi/utils/commands/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/anemoi/utils/commands/config.py b/src/anemoi/utils/commands/config.py index 549fbea..167163f 100644 --- a/src/anemoi/utils/commands/config.py +++ b/src/anemoi/utils/commands/config.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # (C) Copyright 2024 Anemoi contributors. # # This software is licensed under the terms of the Apache Licence Version 2.0