Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.0 #65

Merged
merged 59 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c57f797
Fix (global version) (#12)
JPXKQX Jul 8, 2024
1c8f8a8
Merge branch 'develop' of github.com:ecmwf/anemoi-graphs into develop
JPXKQX Jul 9, 2024
6451902
fix: config nodes name
JPXKQX Jul 9, 2024
5b3bbe1
Merge pull request #14 from ecmwf/hotfix/config_node_name
JPXKQX Jul 9, 2024
746ea2b
6 generate graphs from icosahedral meshes (#11)
theissenhelen Jul 25, 2024
db2d327
[feature] add changelog (#21)
theissenhelen Jul 26, 2024
d510eb2
Skip no-commit-to-branch in code QA (#17)
gmertes Jul 26, 2024
7fd9c74
Clean nodes after building the graph (#23)
JPXKQX Jul 26, 2024
04e54ae
Make graph filename argument optional (#24)
JPXKQX Jul 30, 2024
f383756
doc: update CHANGELOG
theissenhelen Jul 31, 2024
eabb8f1
chore: add rtd pr preview
JesperDramsch Jul 31, 2024
bfdac7d
HEALPix nodes (#16)
JPXKQX Aug 5, 2024
863c489
25 integrate reusable workflows (#26)
theissenhelen Aug 7, 2024
d1a3298
Hotfix/clean graph (#28)
JPXKQX Aug 9, 2024
efac52a
Add binary dependencies to ci-config.yml (#29)
iainrussell Aug 9, 2024
3d8b1ea
ci: inherit pypi publish flow (#27)
theissenhelen Aug 9, 2024
20e21ff
Bugfix/31 ensure latlon input numpy array (#32)
Rilwan-Adewoyin Aug 14, 2024
80f0014
Remove bug in the graph cleaning function (#33)
theissenhelen Aug 15, 2024
fadddd7
Move to reusable workflows for QA and Testing (#34)
JesperDramsch Aug 15, 2024
95e144b
ci: add changelog release updater (#35)
JesperDramsch Aug 15, 2024
61ee1b4
ci: changelog updater PR (#36)
JesperDramsch Aug 15, 2024
2ebd296
ci: correct inputs typo
JesperDramsch Aug 15, 2024
69c83c0
ci: fix changelog updater
JesperDramsch Aug 15, 2024
261c82d
docs: ci fixes changelog
JesperDramsch Aug 15, 2024
a76c0f8
ci: premissions
JesperDramsch Aug 15, 2024
687e9dc
ci: typo
JesperDramsch Aug 15, 2024
76aed29
Ci/fix pr permission (#37)
theissenhelen Aug 16, 2024
a48a21b
ci: remove 3.9 tests (#39)
theissenhelen Aug 16, 2024
6426195
Fix support for Python 3.9 (#38)
JPXKQX Aug 19, 2024
31f3bdc
Ci/fix_double_notes (#40)
theissenhelen Aug 19, 2024
78eda56
Inspection tools (#22)
JPXKQX Aug 21, 2024
725aa21
[pre-commit.ci] pre-commit autoupdate (#41)
pre-commit-ci[bot] Sep 2, 2024
6e682dc
[pre-commit.ci] pre-commit autoupdate (#43)
pre-commit-ci[bot] Sep 3, 2024
5ccce3e
First version of documentation (#18)
JPXKQX Sep 3, 2024
7cbad1e
[Changelog] Update to 0.3.0 (#44)
github-actions[bot] Sep 3, 2024
dd1bce4
Chore/multiple fixes ci precommit (#49)
theissenhelen Sep 23, 2024
7a35e10
fix: triggering event in QA
JesperDramsch Sep 24, 2024
986ee9e
Local Area graphs (#30)
JPXKQX Oct 3, 2024
529035b
add link to transform (#59)
b8raoult Oct 15, 2024
04666b9
Update CODEOWNERS
b8raoult Oct 15, 2024
6debe81
[pre-commit.ci] pre-commit autoupdate (#55)
pre-commit-ci[bot] Oct 16, 2024
80f1de3
Merge pull request #61 from ecmwf/update/codeowners
b8raoult Oct 16, 2024
29510cb
Update .pre-commit-config.yaml (#58)
b8raoult Oct 16, 2024
e3797b9
Fix pre-commit regex
b8raoult Oct 20, 2024
f1bd2c6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 20, 2024
8ad4463
[bugfix] color when plotting isolated nodes (#63)
mpvginde Oct 21, 2024
aecb1ca
[feature] Stretched graphs (#51)
JPXKQX Oct 21, 2024
aaa2545
Merge branch 'develop' into bugfix/pre-commit-regex
JPXKQX Oct 21, 2024
235c1e9
Ci/pin python versions (#66)
theissenhelen Oct 22, 2024
ba41fdb
Refactor GraphCreator (#60)
JPXKQX Oct 23, 2024
78d34c5
Merge branch 'develop' into bugfix/pre-commit-regex
JPXKQX Oct 23, 2024
959dff0
Update copyright notice (#67)
b8raoult Oct 23, 2024
90a6a82
Merge branch 'develop' into bugfix/pre-commit-regex
JPXKQX Oct 23, 2024
d374a57
Fix __version__ import
HCookie Oct 25, 2024
7427324
Merge pull request #69 from ecmwf/fix/init-version-import
HCookie Oct 25, 2024
569cbc3
Merge branch 'develop' into bugfix/pre-commit-regex
HCookie Oct 25, 2024
d48ac7b
Merge pull request #64 from ecmwf/bugfix/pre-commit-regex
HCookie Oct 25, 2024
af6a840
Add contributors (#72)
mchantry Oct 28, 2024
009744e
[feature] Expand node attributes (#68)
JPXKQX Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md merge=union
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CODEOWNERS file

# Protect workflow files
/.github/ @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb @anaprietonem @HCookie @JPXKQX @mchantry
/.pre-commit-config.yaml @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb @anaprietonem @HCookie @JPXKQX @mchantry
/pyproject.toml @theissenhelen @jesperdramsch @gmertes @b8raoult @floriankrb @anaprietonem @HCookie @JPXKQX @mchantry
9 changes: 9 additions & 0 deletions .github/ci-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies: |
ecmwf/ecbuild
MathisRosenhauer/libaec@master
ecmwf/eccodes
ecmwf/eckit
ecmwf/odc
dependency_branch: develop
parallelism_factor: 8
self_build: false # Only for python packages
16 changes: 16 additions & 0 deletions .github/ci-hpc-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build:
modules:
- ninja
dependencies:
- ecmwf/ecbuild@develop
- ecmwf/eccodes@develop
- ecmwf/eckit@develop
- ecmwf/odc@develop
python_dependencies:
- ecmwf/anemoi-utils@develop
- ecmwf/anemoi-datasets@develop
parallel: 64

pytest_cmd: |
python -m pytest -vv -m 'not notebook and not no_cache_init' --cov=. --cov-report=xml
python -m coverage report
18 changes: 18 additions & 0 deletions .github/workflows/changelog-pr-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check Changelog Update on PR
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- develop
paths-ignore:
- .pre-commit-config.yaml
- .readthedocs.yaml
jobs:
Check-Changelog:
name: Check Changelog Action
runs-on: ubuntu-20.04
steps:
- uses: tarides/changelog-check-action@v2
with:
changelog: CHANGELOG.md
35 changes: 35 additions & 0 deletions .github/workflows/changelog-release-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .github/workflows/update-changelog.yaml
name: "Update Changelog"

on:
release:
types: [released]
workflow_dispatch: ~

permissions:
pull-requests: write
contents: write

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
heading-text: ${{ github.event.release.name }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: docs/changelog-update-${{ github.event.release.tag_name }}
title: '[Changelog] Update to ${{ github.event.release.tag_name }}'
add-paths: |
CHANGELOG.md
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ci

on:
# Trigger the workflow on push to master or develop, except tag creation
push:
branches:
- 'main'
- 'develop'
tags-ignore:
- '**'
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
- "README.md"

# Trigger the workflow on pull request
pull_request:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
- "README.md"

# Trigger the workflow manually
workflow_dispatch: ~

# Trigger after public PR approved for CI
pull_request_target:
types: [labeled]
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
- "README.md"

jobs:
# Run CI including downstream packages on self-hosted runners
downstream-ci:
name: downstream-ci
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
with:
anemoi-graphs: ecmwf/anemoi-graphs@${{ github.event.pull_request.head.sha || github.sha }}
codecov_upload: true
secrets: inherit

# Build downstream packages on HPC
downstream-ci-hpc:
name: downstream-ci-hpc
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
with:
anemoi-graphs: ecmwf/anemoi-graphs@${{ github.event.pull_request.head.sha || github.sha }}
secrets: inherit
10 changes: 10 additions & 0 deletions .github/workflows/label-public-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Manage labels of pull requests that originate from forks
name: label-public-pr

on:
pull_request_target:
types: [opened, synchronize]

jobs:
label:
uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2
65 changes: 9 additions & 56 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,24 @@
name: Upload Python Package

on:

push: {}

release:
types: [created]

jobs:
quality:
name: Code QA
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y pandoc # Needed by sphinx for notebooks
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected]
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
with:
skip-hooks: "no-commit-to-branch"

checks:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-latest", "macos-latest"]
python-version: ["3.10"]

name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install
run: |
pip install -e .[all,tests]
pip freeze

- name: Tests
run: pytest
python-version: ["3.9", "3.10", "3.11", "3.12"]
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
with:
python-version: ${{ matrix.python-version }}

deploy:

if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
needs: [checks, quality]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build
twine upload dist/*
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/python-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Code Quality checks for PRs

on:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
quality:
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
with:
skip-hooks: "no-commit-to-branch"

checks:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
with:
python-version: ${{ matrix.python-version }}
22 changes: 22 additions & 0 deletions .github/workflows/readthedocs-pr-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Read the Docs PR Preview
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
# Execute this action only on PRs that touch
# documentation files.
paths:
- "docs/**"

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "anemoi-graphs"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ celerybeat.pid
*.sage.py

# Environments
.envrc
.env
.venv
env/
Expand Down
40 changes: 27 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ repos:
- id: clear-notebooks-output
name: clear-notebooks-output
files: tools/.*\.ipynb$
stages: [commit]
stages: [pre-commit]
language: python
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
additional_dependencies: [jupyter]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml # Check YAML files for syntax errors only
args: [--unsafe, --allow-multiple-documents]
Expand All @@ -20,8 +20,14 @@ repos:
- id: no-commit-to-branch # Prevent committing to main / master
- id: check-added-large-files # Check for large files added to git
- id: check-merge-conflict # Check for files that contain merge conflict
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 # Use the ref you want to point at
hooks:
- id: python-use-type-annotations # Check for missing type annotations
- id: python-check-blanket-noqa # Check for # noqa: all
- id: python-no-log-warn # Check for log.warn
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
args: [--line-length=120]
Expand All @@ -34,18 +40,17 @@ repos:
- --force-single-line-imports
- --profile black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.6
rev: v0.6.9
hooks:
- id: ruff
# Next line if for documenation cod snippets
exclude: '^[^_].*_\.py$'
args:
- --line-length=120
- --fix
- --exit-non-zero-on-fix
- --preview
- --exclude=docs/**/*_.py
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
rev: v1.0.0
hooks:
- id: sphinx-lint
# For now, we use it. But it does not support a lot of sphinx features
Expand All @@ -59,12 +64,21 @@ repos:
hooks:
- id: docconvert
args: ["numpy"]
- repo: https://github.com/b8raoult/optional-dependencies-all
rev: "0.0.6"
hooks:
- id: optional-dependencies-all
args: ["--inplace", "--exclude-keys=dev,docs,tests", "--group=dev=all,docs,tests"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.1.3"
rev: "2.2.4"
hooks:
- id: pyproject-fmt
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
rev: v0.64.0
hooks:
- id: docsig
args:
- --ignore-no-params # Allow docstrings without parameters
- --check-dunders # Check dunder methods
- --check-overridden # Check overridden methods
- --check-protected # Check protected methods
- --check-class # Check class docstrings
- --disable=E113 # Disable empty docstrings
- --summary # Print a summary
ci:
autoupdate_schedule: monthly
Loading
Loading