Skip to content

Commit 5e04f99

Browse files
DeployDuckHCookie
andauthored
chore: synced file(s) with ecmwf/reusable-workflows (#25)
Co-authored-by: Harrison Cook <harrison.cook@ecmwf.int>
1 parent 8ef9eec commit 5e04f99

File tree

11 files changed

+115
-35
lines changed

11 files changed

+115
-35
lines changed

.github/workflows/pr-label-ats.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This workflow checks that the appropriate ATS labels are applied to a pull request:
2+
# - "ATS Approval Not Needed": pass
3+
# - "ATS Approved": pass
4+
# - "ATS Approval Needed": fail
5+
# - Missing ATS label: fail
6+
7+
name: "[PR] ATS labels"
8+
9+
on:
10+
pull_request:
11+
types:
12+
- opened
13+
- edited
14+
- reopened
15+
- labeled
16+
- unlabeled
17+
- synchronize
18+
19+
permissions:
20+
pull-requests: read
21+
22+
jobs:
23+
check:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Get PR details
27+
uses: actions/github-script@v7
28+
id: check-pr
29+
with:
30+
script: |
31+
const pr = await github.rest.pulls.get({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
pull_number: context.payload.pull_request.number,
35+
});
36+
const labels = pr.data.labels.map(label => label.name);
37+
core.setOutput('labels', JSON.stringify(labels));
38+
core.setOutput('author', context.payload.pull_request.user.login);
39+
40+
- name: Evaluate ATS labels
41+
run: |
42+
AUTHOR='${{ steps.check-pr.outputs.author }}'
43+
if [ "$AUTHOR" == "DeployDuck" ] || [ "$AUTHOR" == "pre-commit-ci[bot]" ]; then
44+
echo "Bot PR, skipping."
45+
exit 0
46+
fi
47+
LABELS=$(echo '${{ steps.check-pr.outputs.labels }}' | jq -r '.[]')
48+
echo "Labels found:"
49+
echo -e "$LABELS\n"
50+
echo "Result:"
51+
if echo "$LABELS" | grep -qi "ATS approval not needed"; then
52+
echo "ATS approval not needed. Passing."
53+
EXIT_CODE=0
54+
elif echo "$LABELS" | grep -qi "ATS approved"; then
55+
echo "ATS Approved. Passing."
56+
EXIT_CODE=0
57+
elif echo "$LABELS" | grep -qi "ATS approval needed"; then
58+
echo "ATS Approval Needed. Failing."
59+
EXIT_CODE=1
60+
else
61+
echo "No ATS approval labels found. Please assign the appropriate ATS label. Failing."
62+
EXIT_CODE=1
63+
fi
64+
echo -e "\nFor more information on ATS labels, see:"
65+
echo "https://anemoi.readthedocs.io/en/latest/contributing/guidelines.html#labelling-guidelines"
66+
exit $EXIT_CODE

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,8 @@ _version.py
141141
*.to_upload
142142
tempCodeRunnerFile.python
143143
Untitled-*.py
144+
trace.txt
145+
?/
146+
*.prof
147+
prof/
148+
*.gz

.pre-commit-config.yaml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
1111
additional_dependencies: [jupyter]
1212
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: v5.0.0
13+
rev: v6.0.0
1414
hooks:
1515
- id: check-yaml # Check YAML files for syntax errors only
1616
args: [--unsafe, --allow-multiple-documents]
@@ -20,19 +20,19 @@ repos:
2020
- id: no-commit-to-branch # Prevent committing to main / master
2121
- id: check-added-large-files # Check for large files added to git
2222
- id: check-merge-conflict # Check for files that contain merge conflict
23-
- repo: https://github.com/pre-commit/pygrep-hooks
24-
rev: v1.10.0 # Use the ref you want to point at
25-
hooks:
26-
- id: python-use-type-annotations # Check for missing type annotations
27-
- id: python-check-blanket-noqa # Check for # noqa: all
28-
- id: python-no-log-warn # Check for log.warn
23+
- repo: https://github.com/pre-commit/pygrep-hooks
24+
rev: v1.10.0 # Use the ref you want to point at
25+
hooks:
26+
- id: python-use-type-annotations # Check for missing type annotations
27+
- id: python-check-blanket-noqa # Check for # noqa: all
28+
- id: python-no-log-warn # Check for log.warn
2929
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 25.1.0
30+
rev: 25.9.0
3131
hooks:
3232
- id: black
3333
args: [--line-length=120]
3434
- repo: https://github.com/pycqa/isort
35-
rev: 6.0.1
35+
rev: 7.0.0
3636
hooks:
3737
- id: isort
3838
args:
@@ -41,7 +41,7 @@ repos:
4141
- --profile black
4242
- --project anemoi
4343
- repo: https://github.com/astral-sh/ruff-pre-commit
44-
rev: v0.12.7
44+
rev: v0.14.3
4545
hooks:
4646
- id: ruff
4747
args:
@@ -50,7 +50,7 @@ repos:
5050
- --exit-non-zero-on-fix
5151
- --exclude=docs/**/*_.py
5252
- repo: https://github.com/sphinx-contrib/sphinx-lint
53-
rev: v1.0.0
53+
rev: v1.0.1
5454
hooks:
5555
- id: sphinx-lint
5656
# For now, we use it. But it does not support a lot of sphinx features
@@ -65,20 +65,21 @@ repos:
6565
- id: docconvert
6666
args: ["numpy"]
6767
- repo: https://github.com/tox-dev/pyproject-fmt
68-
rev: "v2.6.0"
68+
rev: "v2.11.0"
6969
hooks:
7070
- id: pyproject-fmt
71-
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
72-
rev: v0.71.0
73-
hooks:
74-
- id: docsig
75-
args:
76-
- --ignore-no-params # Allow docstrings without parameters
77-
- --check-dunders # Check dunder methods
78-
- --check-overridden # Check overridden methods
79-
- --check-protected # Check protected methods
80-
- --check-class # Check class docstrings
81-
- --disable=SIG101,SIG102 # Disable empty docstrings
71+
args: ["--max-supported-python", "3.12"]
72+
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
73+
rev: v0.71.0
74+
hooks:
75+
- id: docsig
76+
args:
77+
- --ignore-no-params # Allow docstrings without parameters
78+
- --check-dunders # Check dunder methods
79+
- --check-overridden # Check overridden methods
80+
- --check-protected # Check protected methods
81+
- --check-class # Check class docstrings
82+
- --disable=SIG101,SIG102 # Disable empty docstrings
8283
ci:
8384
autoupdate_schedule: monthly
8485
autoupdate_commit_msg: "chore(deps): pre-commit.ci autoupdate"

CONTRIBUTORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## How to Contribute
22

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

55

66
## Contributors
@@ -10,4 +10,4 @@ Thank you to all the wonderful people who have contributed to Anemoi. Contributi
1010

1111
## Contributing Organisations
1212

13-
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/)
13+
Significant contributions have been made by the following organisations: [DMI](https://www.dmi.dk/), [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/), [Met Office](https://www.metoffice.gov.uk/), [Météo-France](https://meteofrance.com/) & [ECMWF](https://www.ecmwf.int/)

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
# anemoi-plugins
22

3-
**DISCLAIMER**
4-
This project is **BETA** and will be **Experimental** for the foreseeable future.
5-
Interfaces and functionality are likely to change, and the project itself may be scrapped.
6-
**DO NOT** use this software in any project/software that is operational.
3+
<p align="center">
4+
<a href="https://github.com/ecmwf/codex/raw/refs/heads/main/Project Maturity">
5+
<img src="https://github.com/ecmwf/codex/raw/refs/heads/main/Project Maturity/incubating_badge.svg" alt="Maturity Level">
6+
</a>
7+
<a href="https://opensource.org/licenses/apache-2-0">
8+
<img src="https://img.shields.io/badge/Licence-Apache 2.0-blue.svg" alt="Licence">
9+
</a>
10+
<a href="https://github.com/ecmwf/anemoi-plugins/releases">
11+
<img src="https://img.shields.io/github/v/release/ecmwf/anemoi-plugins?color=purple&label=Release" alt="Latest Release">
12+
</a>
13+
</p>
14+
15+
> \[!IMPORTANT\]
16+
> This software is **Incubating** and subject to ECMWF's guidelines on [Software Maturity](https://github.com/ecmwf/codex/raw/refs/heads/main/Project%20Maturity).
717
818

919

1020
## Documentation
1121

1222
The documentation can be found at https://anemoi-plugins.readthedocs.io/.
1323

24+
## Contributing
25+
26+
You can find information about contributing to Anemoi at our [Contribution page](https://anemoi.readthedocs.io/en/latest/contributing/contributing.html).
27+
1428
## Install
1529

1630
Install via `pip` with:

docs/examples/datasets-create-source-basic-source/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ classifiers = [
2929
"Programming Language :: Python :: 3.10",
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
32-
"Programming Language :: Python :: 3.13",
3332
"Programming Language :: Python :: Implementation :: CPython",
3433
"Programming Language :: Python :: Implementation :: PyPy",
3534
]

docs/examples/datasets-create-source-xarray-source/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ classifiers = [
2929
"Programming Language :: Python :: 3.10",
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
32-
"Programming Language :: Python :: 3.13",
3332
"Programming Language :: Python :: Implementation :: CPython",
3433
"Programming Language :: Python :: Implementation :: PyPy",
3534
]

plugins/inference/inputs/example/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ classifiers = [
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
24-
"Programming Language :: Python :: 3.13",
2524
"Programming Language :: Python :: Implementation :: CPython",
2625
"Programming Language :: Python :: Implementation :: PyPy",
2726
]

plugins/transform/filters/filter1/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ classifiers = [
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
24-
"Programming Language :: Python :: 3.13",
2524
"Programming Language :: Python :: Implementation :: CPython",
2625
"Programming Language :: Python :: Implementation :: PyPy",
2726
]

plugins/transform/filters/filter2/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ classifiers = [
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
24-
"Programming Language :: Python :: 3.13",
2524
"Programming Language :: Python :: Implementation :: CPython",
2625
"Programming Language :: Python :: Implementation :: PyPy",
2726
]

0 commit comments

Comments
 (0)