Skip to content

Commit 1b25139

Browse files
committed
first commit
0 parents  commit 1b25139

31 files changed

+1219
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md merge=union

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# CODEOWNERS file
2+
3+
# Protect workflow files
4+
/.github/ @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb
5+
/.pre-commit-config.yaml @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb
6+
/pyproject.toml @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb

.github/ci-hpc-config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
python: '3.10'
3+
modules:
4+
- ninja
5+
parallel: 64
6+
7+
pytest_cmd: |
8+
python -m pytest -vv -m 'not notebook and not no_cache_init' --cov=. --cov-report=xml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check Changelog Update on PR
2+
on:
3+
pull_request:
4+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
5+
branches:
6+
- main
7+
- develop
8+
paths-ignore:
9+
- .pre-commit-config.yaml
10+
- .readthedocs.yaml
11+
jobs:
12+
Check-Changelog:
13+
name: Check Changelog Action
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- uses: tarides/changelog-check-action@v2
17+
with:
18+
changelog: CHANGELOG.md
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# .github/workflows/update-changelog.yaml
2+
name: "Update Changelog"
3+
4+
on:
5+
release:
6+
types: [released]
7+
workflow_dispatch: ~
8+
9+
permissions:
10+
pull-requests: write
11+
contents: write
12+
13+
jobs:
14+
update:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.release.target_commitish }}
22+
23+
- name: Update Changelog
24+
uses: stefanzweifel/changelog-updater-action@v1
25+
with:
26+
latest-version: ${{ github.event.release.tag_name }}
27+
heading-text: ${{ github.event.release.name }}
28+
29+
- name: Create Pull Request
30+
uses: peter-evans/create-pull-request@v6
31+
with:
32+
branch: docs/changelog-update-${{ github.event.release.tag_name }}
33+
title: '[Changelog] Update to ${{ github.event.release.tag_name }}'
34+
add-paths: |
35+
CHANGELOG.md

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ci
2+
3+
on:
4+
# Trigger the workflow on push to master or develop, except tag creation
5+
push:
6+
branches:
7+
- 'main'
8+
- 'develop'
9+
tags-ignore:
10+
- '**'
11+
paths:
12+
- "src/**"
13+
- "tests/**"
14+
15+
# Trigger the workflow on pull request
16+
pull_request: ~
17+
18+
# Trigger the workflow manually installs
19+
workflow_dispatch: ~
20+
21+
# Trigger after public PR approved for CI
22+
pull_request_target:
23+
types: [labeled]
24+
25+
jobs:
26+
# Run CI including downstream packages on self-hosted runners
27+
downstream-ci:
28+
name: downstream-ci
29+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
30+
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
31+
with:
32+
anemoi-transform: ecmwf/anemoi-transform@${{ github.event.pull_request.head.sha || github.sha }}
33+
codecov_upload: true
34+
secrets: inherit
35+
36+
# Build downstream packages on HPC
37+
downstream-ci-hpc:
38+
name: downstream-ci-hpc
39+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
40+
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
41+
with:
42+
anemoi-transform: ecmwf/anemoi-transform@${{ github.event.pull_request.head.sha || github.sha }}
43+
secrets: inherit

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Manage labels of pull requests that originate from forks
2+
name: label-public-pr
3+
4+
on:
5+
pull_request_target:
6+
types: [opened, synchronize]
7+
8+
jobs:
9+
label:
10+
uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2

.github/workflows/python-publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
quality:
12+
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
13+
with:
14+
skip-hooks: "no-commit-to-branch"
15+
16+
checks:
17+
strategy:
18+
matrix:
19+
python-version: ["3.9", "3.10"]
20+
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
deploy:
25+
needs: [checks, quality]
26+
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
27+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Code Quality checks for PRs
5+
6+
on:
7+
push:
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
quality:
13+
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
14+
with:
15+
skip-hooks: "no-commit-to-branch"
16+
17+
checks:
18+
strategy:
19+
matrix:
20+
python-version: ["3.9", "3.10"]
21+
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Read the Docs PR Preview
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# Execute this action only on PRs that touch
9+
# documentation files.
10+
paths:
11+
- "docs/**"
12+
13+
permissions:
14+
pull-requests: write
15+
16+
jobs:
17+
documentation-links:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: readthedocs/actions/preview@v1
21+
with:
22+
project-slug: "anemoi-transform"

.gitignore

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
111+
112+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113+
__pypackages__/
114+
115+
# Celery stuff
116+
celerybeat-schedule
117+
celerybeat.pid
118+
119+
# SageMath parsed files
120+
*.sage.py
121+
122+
# Environments
123+
.env
124+
.envrc
125+
.venv
126+
env/
127+
venv/
128+
ENV/
129+
env.bak/
130+
venv.bak/
131+
132+
# Spyder project settings
133+
.spyderproject
134+
.spyproject
135+
136+
# Rope project settings
137+
.ropeproject
138+
139+
# mkdocs documentation
140+
/site
141+
142+
# mypy
143+
.mypy_cache/
144+
.dmypy.json
145+
dmypy.json
146+
147+
# Pyre type checker
148+
.pyre/
149+
150+
# pytype static type analyzer
151+
.pytype/
152+
153+
# Cython debug symbols
154+
cython_debug/
155+
156+
# PyCharm
157+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159+
# and can be added to the global gitignore or merged into this file. For a more nuclear
160+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161+
#.idea/
162+
163+
*.grib
164+
*.onnx
165+
*.ckpt
166+
*.swp
167+
*.npy
168+
*.download
169+
?
170+
?.*
171+
foo
172+
bar
173+
*.grib
174+
*.nc
175+
*.npz
176+
*.json
177+
*.zarr/
178+
~$images.pptx
179+
test.py
180+
cutout.png
181+
*.out
182+
183+
_build/
184+
?
185+
?.*
186+
~*
187+
*.sync
188+
_version.py
189+
*.code-workspace

0 commit comments

Comments
 (0)