Skip to content

Commit 2402f10

Browse files
DeployDuckpre-commit-ci[bot]VeraChristina
authored
chore: synced file(s) with ecmwf-actions/reusable-workflows (#113)
* chore: synced local './' with remote 'sync-files/general/python/' Triggered from common files on https://github.com/ecmwf-actions/reusable-workflows * chore: created local './.release-please-manifest.json' from remote 'sync-files/anemoi/.release-please-manifest.json' Triggered from common files on https://github.com/ecmwf-actions/reusable-workflows * chore: synced local './' with remote 'sync-files/anemoi/' Triggered from common files on https://github.com/ecmwf-actions/reusable-workflows * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix old sync files * delete leftover workflows * update release-please manifest * delete leftover workflows2 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Vera Gahlen <[email protected]>
1 parent 5d2dd47 commit 2402f10

24 files changed

+353
-208
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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](https://anemoi.readthedocs.io/projects/training/en/latest/dev/testing.html) suite locally, and they pass
26+
27+
<!-- In case this affects the model sharding or other specific components please describe these here. -->
28+
29+
### Dependencies
30+
31+
- [ ] I have ensured that the code is still pip-installable after the changes and runs
32+
- [ ] I have tested that new dependencies themselves are pip-installable.
33+
34+
<!-- List any new dependencies that are required for this change and the justification to add them. -->
35+
36+
### Documentation
37+
38+
- [ ] My code follows the style guidelines of this project
39+
- [ ] I have updated the documentation and docstrings to reflect the changes
40+
- [ ] I have added comments to my code, particularly in hard-to-understand areas
41+
42+
<!-- Describe any major updates to the documentation -->
43+
44+
## Additional Notes
45+
46+
<!-- Include any additional information, caveats, or considerations that the reviewer should be aware of. -->

.github/ci-config.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
# - package-ecosystem: "github-actions"
8+
# directory: "/"
9+
# schedule:
10+
# interval: "monthly"

.github/labeler.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This is the configuration file for the labeler action.
2+
# It assigns labels to pull requests based on the files changed in the PR.
3+
# See more here: https://github.com/actions/labeler
4+
dependencies:
5+
- changed-files:
6+
- any-glob-to-any-file:
7+
- "**/requirements.txt"
8+
- "**/setup.py"
9+
- "**/pyproject.toml"
10+
- "**/Pipfile"
11+
- "**/Pipfile.lock"
12+
- "**/requirements/*.txt"
13+
- "**/requirements/*.in"
14+
15+
documentation:
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- "**/docs/**/*"
19+
- "*.md"
20+
- "*.rst"
21+
22+
config:
23+
- changed-files:
24+
- any-glob-to-any-file:
25+
- "**/src/**/config/**/*"
26+
27+
CI/CD:
28+
- changed-files:
29+
- any-glob-to-any-file:
30+
- "**/.pre-commit-config.yaml"
31+
- ".github/**/*"
32+
- "tox.ini"
33+
- ".coveragerc"
34+
35+
tests:
36+
- changed-files:
37+
- any-glob-to-any-file:
38+
- "**/tests/**/*"
39+
- "**/test/**/*"
40+
- "**/test_*.py"
41+
- "**/test.py"
42+
- "**/conftest.py"

.github/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# .github/release.yml
2+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
3+
4+
changelog:
5+
exclude:
6+
labels:
7+
- ignore-for-release
8+
- no-changelog
9+
authors:
10+
- pre-commit-ci
11+
categories:
12+
- title: Breaking Changes 🛠
13+
labels:
14+
- "breaking change"
15+
- title: Exciting New Features 🎉
16+
labels:
17+
- enhancement
18+
- title: Config Changes 📑
19+
labels:
20+
- config
21+
- title: Other Changes 🔗
22+
labels:
23+
- "*"

.github/workflows/changelog-pr-update.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/changelog-release-update.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/ci.yml renamed to .github/workflows/downstream-ci-hpc.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: ci
1+
# This workflow triggers tests on dependent packages.
2+
# The dependency tree itself is defined in ecmwf-actions/downstream-ci/
3+
name: Test downstream dependent packages on HPC
24

35
on:
46
# Trigger the workflow on push to main or develop, except tag creation
@@ -8,19 +10,28 @@ on:
810
- 'develop'
911
tags-ignore:
1012
- '**'
11-
paths:
12-
- "src/**"
13-
- "tests/**"
13+
paths-ignore:
14+
- "docs/**"
15+
- "CHANGELOG.md"
16+
- "README.md"
1417

1518
# Trigger the workflow on pull request
16-
pull_request: ~
19+
pull_request:
20+
paths-ignore:
21+
- "docs/**"
22+
- "CHANGELOG.md"
23+
- "README.md"
1724

1825
# Trigger the workflow manually
1926
workflow_dispatch: ~
2027

2128
# Trigger after public PR approved for CI
2229
pull_request_target:
2330
types: [labeled]
31+
paths-ignore:
32+
- "docs/**"
33+
- "CHANGELOG.md"
34+
- "README.md"
2435

2536
jobs:
2637
# Run CI including downstream packages on self-hosted runners
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow ensures that the PR title follows the Conventional Commit format.
2+
name: "[Pull Request] Ensure Conventional Commit in PR title"
3+
4+
on:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- edited
9+
- synchronize
10+
- reopened
11+
12+
permissions:
13+
pull-requests: read
14+
15+
jobs:
16+
main:
17+
name: Validate PR title
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: amannn/action-semantic-pull-request@v5
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow assigns labels to a pull request based on the Conventional Commits format.
2+
# This is necessary for release-please to work properly.
3+
name: "[Pull Request] Label Conventional Commits"
4+
5+
on:
6+
pull_request:
7+
branches: [main]
8+
types:
9+
[opened, reopened, labeled, unlabeled]
10+
11+
permissions:
12+
pull-requests: write
13+
14+
jobs:
15+
assign-labels:
16+
runs-on: ubuntu-latest
17+
name: Assign labels in pull request
18+
if: github.event.pull_request.merged == false
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Assign labels from Conventional Commits
22+
id: action-assign-labels
23+
uses: mauroalderete/action-assign-labels@v1
24+
with:
25+
pull-request-number: ${{ github.event.pull_request.number }}
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
conventional-commits: |
28+
conventional-commits:
29+
- type: 'fix'
30+
nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed']
31+
labels: ['bug']
32+
- type: 'feature'
33+
nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat']
34+
labels: ['enhancement']
35+
- type: 'breaking_change'
36+
nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR']
37+
labels: ['breaking change']
38+
- type: 'documentation'
39+
nouns: ['doc','docs','docu','document','documentation']
40+
labels: ['documentation']
41+
- type: 'build'
42+
nouns: ['build','rebuild','ci']
43+
labels: ['CI/CD']
44+
- type: 'config'
45+
nouns: ['config', 'conf', 'configuration']
46+
labels: ['config']
47+
maintain-labels-not-matched: false
48+
apply-changes: true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This workflow assigns labels to a pull request based on the files changed in the PR.
2+
# The labels are defined in the `.github/labels.yml` file.
3+
name: "[Pull Request] Label File-based"
4+
on:
5+
pull_request_target:
6+
types: [opened, synchronize]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
jobs:
13+
labeler:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Assign labels from file changes
17+
uses: actions/labeler@v5

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Manage labels of pull requests that originate from forks
2-
name: label-public-pr
2+
name: "[Pull Request] Label PRs from public forks"
33

44
on:
55
pull_request_target:

.github/workflows/python-publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
# This workflow will upload a Python Package using Twine when a release is created
32
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
43

.github/workflows/python-pull-request.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
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
1+
# This workflow runs pre-commit checks and pytest tests against multiple platforms and Python versions.
2+
name: Code Quality checks and Testing
53

64
on:
7-
push:
85
pull_request:
96
types: [opened, synchronize, reopened]
7+
push:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "9 2 * * 0" # at 9:02 on sunday
1012

1113
jobs:
1214
quality:

.github/workflows/readthedocs-pr-update.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This workflow adds a link to the experimental documentation build to the PR.
2+
# This does NOT trigger a build of the documentation, this is handled through webhooks.
13
name: Read the Docs PR Preview
24
on:
35
pull_request_target:

.github/workflows/release-please.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow uses an action to run Release Please to create a release PR.
2+
# It is governed by the config and manifest in the root of the repo.
3+
# For more information see: https://github.com/googleapis/release-please
4+
name: Run Release Please
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- hotfix/*
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
release-please:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
with:
21+
# this assumes that you have created a personal access token
22+
# (PAT) and configured it as a GitHub action secret named
23+
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
24+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
25+
# optional. customize path to .release-please-config.json
26+
config-file: .release-please-config.json
27+
# Currently releases are done from main
28+
target-branch: ${{ github.ref_name }}

0 commit comments

Comments
 (0)