Skip to content

Commit c8ef029

Browse files
authored
Merge pull request #147 from ecmwf-actions/fix/update-and-fix-sync-files
[Anemoi] Update and fix specific files for sync
2 parents 8f37af7 + 723e2ae commit c8ef029

12 files changed

+220
-121
lines changed

.github/workflows/sync-files-to-repos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
uses: BetaHuhn/repo-file-sync-action@v1
1717
with:
1818
GH_PAT: ${{ secrets.REPO_SYNC_ACTION_PAT }}
19+
GIT_EMAIL: "[email protected]"
1920
CONFIG_PATH: sync-files/sync.yml
2021
COMMIT_PREFIX: "chore: "
2122
BRANCH_PREFIX: "chore/file-broadcast/"

sync-files/anemoi/.github/workflows/pr-conventional-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
steps:
1919
- uses: amannn/action-semantic-pull-request@v5
2020
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{% raw %}name: Push to private repository
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
push_changes:
10+
if: ${{ !contains(github.repository, 'private') }}{% endraw %}
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout source repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
fetch-tags: true
19+
20+
- name: Set up Git configuration
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
25+
- name: Setup SSH key
26+
uses: webfactory/[email protected]
27+
with:
28+
ssh-private-key: ${{ secrets.KEY_TO_PRIVATE }}
29+
30+
- name: Push changes to private repository
31+
run: |
32+
git remote add private [email protected]:${{ github.repository }}-private.git
33+
git push --set-upstream private main
34+
{% endraw %}
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
name: Code Quality checks for PRs
1+
{% raw %}name: Code Quality checks for PRs
22

33
on:
4-
push:
54
pull_request:
65
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
schedule:
10+
- cron: "9 2 * * 0" # at 9:02 on sunday
711

812
jobs:
913
quality:
@@ -12,4 +16,10 @@ jobs:
1216
skip-hooks: "no-commit-to-branch"
1317

1418
checks:
19+
strategy:
20+
matrix:
21+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1522
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
{% endraw %}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{% raw %}name: Run Release Please
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- hotfix
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
# this assumes that you have created a personal access token
19+
# (PAT) and configured it as a GitHub action secret named
20+
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
21+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
22+
# optional. customize path to .release-please-config.json
23+
config-file: .release-please-config.json
24+
# Currently releases are done from main
25+
target-branch: ${{ github.ref_name }}
26+
{% endraw %}

sync-files/anemoi/.gitignore

Lines changed: 60 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# Byte-compiled / optimized / DLL files
1+
# Python
22
__pycache__/
33
*.py[cod]
44
*$py.class
5-
6-
# C extensions
75
*.so
6+
.Python
7+
__pypackages__/
88

99
# Distribution / packaging
10-
.Python
1110
build/
1211
develop-eggs/
1312
dist/
@@ -26,17 +25,7 @@ share/python-wheels/
2625
*.egg
2726
MANIFEST
2827

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
28+
# Testing and coverage
4029
htmlcov/
4130
.tox/
4231
.nox/
@@ -51,74 +40,12 @@ coverage.xml
5140
.pytest_cache/
5241
cover/
5342

54-
# Translations
43+
# Documentation
44+
docs/_build/
45+
/site
5546
*.mo
5647
*.pot
5748

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-
12249
# Environments
12350
.env
12451
.envrc
@@ -129,60 +56,80 @@ ENV/
12956
env.bak/
13057
venv.bak/
13158

132-
# Spyder project settings
59+
# IDEs
60+
.idea/
13361
.spyderproject
13462
.spyproject
135-
136-
# Rope project settings
13763
.ropeproject
64+
.vscode/
65+
*.code-workspace
66+
*.sublime-project
67+
*.sublime-workspace
13868

139-
# mkdocs documentation
140-
/site
69+
# Jupyter Notebook
70+
.ipynb_checkpoints
14171

142-
# mypy
72+
# Type checking
14373
.mypy_cache/
14474
.dmypy.json
14575
dmypy.json
146-
147-
# Pyre type checker
14876
.pyre/
149-
150-
# pytype static type analyzer
15177
.pytype/
15278

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-
79+
# Data files
16380
*.grib
16481
*.onnx
16582
*.ckpt
166-
*.swp
16783
*.npy
84+
*.npz
85+
*.zarr/
86+
*.nc
87+
*.h5
88+
*.hdf5
89+
*.pkl
90+
*.parquet
91+
*.csv
92+
*.xlsx
93+
*.xls
94+
95+
# ML artifacts
96+
wandb/
97+
mlruns/
98+
lightning_logs/
99+
*.ckpt
100+
*.pt
101+
*.pth
102+
runs/
103+
checkpoints/
104+
105+
# Temporary and system files
106+
*.swp
168107
*.download
108+
*.out
109+
*.sync
110+
*.dot
111+
*.tmp
112+
*.log
113+
*.log.*
114+
.DS_Store
115+
~*
116+
tmp/
117+
temp/
118+
logs/
119+
_dev/
120+
outputs/
121+
*tmp_data/
122+
123+
# Project specific
169124
?
170125
?.*
171126
foo
172127
bar
173-
*.grib
174-
*.nc
175-
*.npz
176-
*.zarr/
177128
~$images.pptx
178129
test.py
130+
test.ipynb
179131
cutout.png
180-
*.out
181-
182-
_build/
183-
?
184-
?.*
185-
~*
186-
*.sync
187132
_version.py
188-
outputs/
133+
*.to_upload
134+
tempCodeRunnerFile.python
135+
Untitled-*.py

sync-files/anemoi/.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ repos:
4040
- --force-single-line-imports
4141
- --profile black
4242
- repo: https://github.com/astral-sh/ruff-pre-commit
43-
rev: v0.8.1
43+
rev: v0.8.6
4444
hooks:
4545
- id: ruff
4646
args:
@@ -64,7 +64,7 @@ repos:
6464
hooks:
6565
- id: pyproject-fmt
6666
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
67-
rev: v0.65.0
67+
rev: v0.66.1
6868
hooks:
6969
- id: docsig
7070
args:

sync-files/anemoi/.readthedocs.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ sphinx:
1010

1111
python:
1212
install:
13-
- requirements: docs/requirements.txt
1413
- method: pip
1514
path: .
1615
extra_requirements:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": ""
3+
}

0 commit comments

Comments
 (0)