Skip to content

Commit 222e929

Browse files
Rework python-cmethods: replace the CMethods class by the new adjust function (#48)
1 parent 9878005 commit 222e929

File tree

202 files changed

+4713
-3121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+4713
-3121
lines changed

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
examples/input_data/*.nc filter=lfs diff=lfs merge=lfs -text
2+
tests/fixture/temperature_simh.zarr filter=lfs diff=lfs merge=lfs -text
3+
tests/fixture/temperature_simp.zarr filter=lfs diff=lfs merge=lfs -text
4+
tests/fixture/precipitation_obsh.zarr filter=lfs diff=lfs merge=lfs -text
5+
tests/fixture/precipitation_obsp.zarr filter=lfs diff=lfs merge=lfs -text
6+
tests/fixture/precipitation_simh.zarr filter=lfs diff=lfs merge=lfs -text
7+
tests/fixture/precipitation_simp.zarr filter=lfs diff=lfs merge=lfs -text
8+
tests/fixture/temperature_obsh.zarr filter=lfs diff=lfs merge=lfs -text
9+
tests/fixture/temperature_obsp.zarr filter=lfs diff=lfs merge=lfs -text

.github/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ coverage:
1818
comment:
1919
layout: "reach, diff, flags, files"
2020
behavior: default
21-
require_changes: true # if false: post the comment even if coverage dont change
21+
require_changes: true # if false: post the comment even if coverage don't change
2222
require_base: no # [yes :: must have a base report to post]
2323
require_head: yes # [yes :: must have a head report to post]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
python -m pip install --upgrade pip
35-
python -m pip install -r docs/requirements.txt
35+
python -m pip install -r doc/requirements.txt
3636
3737
- name: Build the documentation
38-
run: cd docs && make html
38+
run: cd doc && make html
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
run: python -m pip install ".[dev]"
3939

4040
- name: Run unit tests
41-
run: pytest tests
41+
run: pytest -vv tests

.github/workflows/cicd.yml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
push:
1212
branches:
1313
- "**"
14+
schedule:
15+
- cron: "20 4 * * 0"
16+
release:
17+
types: [created]
1418

1519
concurrency:
1620
group: CICD-${{ github.ref }}
@@ -20,24 +24,24 @@ jobs:
2024
## Checks the code logic, style and more
2125
##
2226
Pre-Commit:
23-
uses: ./.github/workflows/_pre_commit.yml
27+
uses: ./.github/workflows/_pre_commit.yaml
2428

2529
## Discover vulnerabilities
2630
##
2731
CodeQL:
28-
uses: ./.github/workflows/_codeql.yml
32+
uses: ./.github/workflows/_codeql.yaml
2933

3034
## Builds the package on multiple OS for multiple
3135
## Python versions
3236
##
3337
Build:
3438
needs: [Pre-Commit]
35-
uses: ./.github/workflows/_build.yml
39+
uses: ./.github/workflows/_build.yaml
3640
strategy:
3741
fail-fast: false
3842
matrix:
3943
os: [ubuntu-latest, macos-latest, windows-latest]
40-
python-version: ["3.8", "3.9", "3.10", "3.11"]
44+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
4145
with:
4246
os: ${{ matrix.os }}
4347
python-version: ${{ matrix.python-version }}
@@ -46,7 +50,7 @@ jobs:
4650
##
4751
Build-Doc:
4852
needs: [Pre-Commit]
49-
uses: ./.github/workflows/_build_doc.yml
53+
uses: ./.github/workflows/_build_doc.yaml
5054
with:
5155
os: ubuntu-latest
5256
python-version: "3.11"
@@ -55,34 +59,57 @@ jobs:
5559
##
5660
Test:
5761
needs: [Build]
58-
uses: ./.github/workflows/_test.yml
62+
uses: ./.github/workflows/_test.yaml
5963
strategy:
6064
matrix:
6165
os: [ubuntu-latest, windows-latest]
62-
python-version: ["3.8", "3.9", "3.10", "3.11"]
66+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
6367
with:
6468
os: ${{ matrix.os }}
6569
python-version: ${{ matrix.python-version }}
6670

71+
## Generates and uploads the coverage statistics to codecov
72+
##
73+
CodeCov:
74+
if: |
75+
success() &&
76+
github.actor == 'btschwertfeger' &&
77+
github.event_name == 'push'
78+
needs: [Test]
79+
uses: ./.github/workflows/_codecov.yaml
80+
with:
81+
os: ubuntu-latest
82+
python-version: "3.11"
83+
secrets: inherit
84+
6785
## Uploads the package to test.pypi.org on master if triggered by
6886
## a regular commit/push.
6987
##
7088
UploadTestPyPI:
71-
if: success() && github.ref == 'refs/heads/master'
89+
if: |
90+
success() &&
91+
github.actor == 'btschwertfeger' &&
92+
github.ref == 'refs/heads/master' &&
93+
github.event_name == 'push'
7294
needs: [Test]
7395
name: Upload current development version to Test PyPI
74-
uses: ./.github/workflows/_pypi_publish.yml
96+
uses: ./.github/workflows/_pypi_publish.yaml
7597
with:
7698
REPOSITORY_URL: https://test.pypi.org/legacy/
7799
secrets:
78100
API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
79101

80-
## Generates and uploads the coverage statistics to codecov
102+
## Upload the python-kraken-sdk to Production PyPI
81103
##
82-
CodeCov:
83-
needs: [Test]
84-
uses: ./.github/workflows/_codecov.yml
104+
UploadPyPI:
105+
if: |
106+
success() &&
107+
github.actor == 'btschwertfeger' &&
108+
github.event_name == 'release'
109+
needs: [UploadTestPyPI]
110+
name: Upload the current release to PyPI
111+
uses: ./.github/workflows/_pypi_publish.yaml
85112
with:
86-
os: ubuntu-latest
87-
python-version: "3.11"
88-
secrets: inherit
113+
REPOSITORY_URL: https://upload.pypi.org/legacy/
114+
secrets:
115+
API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)