Skip to content

Commit 8f37af7

Browse files
authored
Merge pull request #141 from ecmwf-actions/feature/anemoi-templates
feature: Anemoi templates and file broadcasting infrastructure
2 parents 67cecf7 + 3c7b7eb commit 8f37af7

18 files changed

+864
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Sync Files to Different Repos
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'sync-files/**' # Only trigger on changes in sync-files directory
8+
workflow_dispatch: # Keep manual trigger capability
9+
jobs:
10+
sync:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
- name: Run Repo File Sync Action
16+
uses: BetaHuhn/repo-file-sync-action@v1
17+
with:
18+
GH_PAT: ${{ secrets.REPO_SYNC_ACTION_PAT }}
19+
CONFIG_PATH: sync-files/sync.yml
20+
COMMIT_PREFIX: "chore: "
21+
BRANCH_PREFIX: "chore/file-broadcast/"
22+
COMMIT_BODY: "Triggered from common files on https://github.com/ecmwf-actions/reusable-workflows"

ecmwf-sites-upload/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
- uses: actions/setup-python@v5
2020
with:
2121
python-version: '3.x'
22-
22+
2323
- shell: bash
2424
run: pip install sites-toolkit --upgrade --index-url https://get.ecmwf.int/repository/pypi-all/simple
2525

sync-files/anemoi/.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 @anaprietonem @HCookie @JPXKQX @mchantry
5+
/.pre-commit-config.yaml @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb @anaprietonem @HCookie @JPXKQX @mchantry
6+
/pyproject.toml @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb @anaprietonem @HCookie @JPXKQX @mchantry
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## Description
2+
3+
<!-- Provide a brief summary of the changes introduced in this pull request. -->
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
12+
## Issue Number
13+
14+
<!-- Link the Issue number this change addresses, ideally in one of the "magic format" such as Closes #XYZ -->
15+
16+
<!-- Alternatively, explain the motivation behind the changes and the context in which they are being made. -->
17+
18+
## Code Compatibility
19+
20+
- [ ] I have performed a self-review of my code
21+
22+
### Code Performance and Testing
23+
24+
- [ ] I have added tests that prove my fix is effective or that my feature works
25+
- [ ] I ran the complete Pytest test suite locally, and they pass
26+
- [ ] I have tested the changes on a single GPU
27+
- [ ] I have tested the changes on multiple GPUs / multi-node setups
28+
- [ ] I have run the Benchmark Profiler against the old version of the code
29+
30+
<!-- In case this affects the model sharding or other specific components please describe these here. -->
31+
32+
### Dependencies
33+
34+
- [ ] I have ensured that the code is still pip-installable after the changes and runs
35+
- [ ] I have not introduced new dependencies in the inference portion of the model
36+
- [ ] I have tested that new dependencies themselves are pip-installable.
37+
38+
<!-- List any new dependencies that are required for this change and the justification to add them. -->
39+
40+
### Documentation
41+
42+
- [ ] My code follows the style guidelines of this project
43+
- [ ] I have updated the documentation and docstrings to reflect the changes
44+
- [ ] I have added comments to my code, particularly in hard-to-understand areas
45+
46+
<!-- Describe any major updates to the documentation -->
47+
48+
## Additional Notes
49+
50+
<!-- Include any additional information, caveats, or considerations that the reviewer should be aware of. -->
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: ci
2+
3+
on:
4+
# Trigger the workflow on push to main or develop, except tag creation
5+
push:
6+
branches:
7+
- 'main'
8+
- 'develop'
9+
tags-ignore:
10+
- '**'
11+
paths-ignore:
12+
- "docs/**"
13+
- "CHANGELOG.md"
14+
- "README.md"
15+
16+
# Trigger the workflow on pull request
17+
pull_request:
18+
paths-ignore:
19+
- "docs/**"
20+
- "CHANGELOG.md"
21+
- "README.md"
22+
23+
# Trigger the workflow manually
24+
workflow_dispatch: ~
25+
26+
# Trigger after public PR approved for CI
27+
pull_request_target:
28+
types: [labeled]
29+
paths-ignore:
30+
- "docs/**"
31+
- "CHANGELOG.md"
32+
- "README.md"
33+
34+
jobs:
35+
# Run CI including downstream packages on self-hosted runners
36+
downstream-ci:
37+
name: downstream-ci
38+
if: {% raw %}${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}{% endraw %}
39+
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
40+
with:
41+
{{ repo_name }}: ecmwf/{{ repo_name }}{% raw %}@${{ github.event.pull_request.head.sha || github.sha }}{% endraw %}
42+
codecov_upload: true
43+
secrets: inherit
44+
45+
# Build downstream packages on HPC
46+
downstream-ci-hpc:
47+
name: downstream-ci-hpc
48+
if: {% raw %}${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}{% endraw %}
49+
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
50+
with:
51+
{{ repo_name }}: ecmwf/{{ repo_name }}{% raw %}@${{ github.event.pull_request.head.sha || github.sha }}{% endraw %}
52+
secrets: inherit
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
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Ensure Conventional Commit in PR title"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- reopened
10+
11+
permissions:
12+
pull-requests: read
13+
14+
jobs:
15+
main:
16+
name: Validate PR title
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: amannn/action-semantic-pull-request@v5
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
# This workflow will upload a Python Package using Twine when a release is created
3+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
4+
5+
name: Upload Python Package
6+
7+
on:
8+
release:
9+
types: [created]
10+
11+
jobs:
12+
deploy:
13+
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
14+
secrets: inherit
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Code Quality checks for PRs
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
jobs:
9+
quality:
10+
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
11+
with:
12+
skip-hooks: "no-commit-to-branch"
13+
14+
checks:
15+
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
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: "{{ repo_name }}"

0 commit comments

Comments
 (0)