Skip to content

Commit

Permalink
Merge branch 'main' into dynamic-time-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre authored Feb 5, 2025
2 parents ab2fb7b + f615ef7 commit ca47063
Show file tree
Hide file tree
Showing 54 changed files with 615 additions and 374 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Generate App Token
id: token_generator
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1.11.2
with:
app-id: ${{ secrets.OURANOS_HELPER_BOT_ID }}
private-key: ${{ secrets.OURANOS_HELPER_BOT_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
pypi.org:443
- name: Generate App Token
id: token_generator
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1.11.2
with:
app-id: ${{ secrets.OURANOS_HELPER_BOT_ID }}
private-key: ${{ secrets.OURANOS_HELPER_BOT_KEY }}
Expand All @@ -58,7 +58,7 @@ jobs:
token: ${{ steps.token_generator.outputs.token }}
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.x"
- name: Import GPG Key
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
sum.golang.org:443
- name: Start Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -48,14 +48,14 @@ jobs:
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

- name: Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Dependency Review'
continue-on-error: true

- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
51 changes: 29 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
pypi.org:443
sum.golang.org:443
- name: Start Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -66,15 +66,15 @@ jobs:
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.x"
cache: 'pip'
- name: Install CI libraries
run: |
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Setup Python Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Environment setup (Python${{ matrix.python-version }}, lint)'
Expand All @@ -93,13 +93,13 @@ jobs:
run: |
python -m tox -e lint
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Lint (Python${{ matrix.python-version }})'
continue-on-error: true
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
raw.githubusercontent.com:443
sum.golang.org:443
- name: Start Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -143,15 +143,15 @@ jobs:
with:
persist-credentials: false
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install CI libraries
run: |
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Environment Setup Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Environment setup (Python${{ matrix.python-version }}, standard)'
Expand All @@ -171,13 +171,13 @@ jobs:
COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}-ubuntu-latest-preliminary
COVERALLS_PARALLEL: true
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Testing with tox (Python${{ matrix.python-version }})'
continue-on-error: true
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
Expand Down Expand Up @@ -210,6 +210,12 @@ jobs:
markers: -m 'not slow'
python-version: "3.12"
tox-env: standard
# Coverage is not yet supported on Python3.13 . See `tox.ini`.
- os: 'ubuntu-latest'
testdata-cache: '~/.cache/xclim-testdata'
markers: -m 'not slow'
python-version: "3.13"
tox-env: standard
# Windows builds
- os: 'windows-latest'
testdata-cache: 'C:\Users\runneradmin\AppData\Local\xclim-testdata\xclim-testdata\Cache'
Expand Down Expand Up @@ -254,13 +260,14 @@ jobs:
ip-api.com:80
ipapi.co:443
motd.ubuntu.com:443
objects.githubusercontent.com:443
proxy.golang.org:443
pypi.org:443
raw.githubusercontent.com:443
sum.golang.org:443
- name: Start Energy Measurement
if : ${{ matrix.os == 'ubuntu-latest' }}
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -275,7 +282,7 @@ jobs:
sudo apt-get update
sudo apt-get install libeigen3-dev
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -284,7 +291,7 @@ jobs:
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Environment Setup Energy Measurement
if : ${{ matrix.os == 'ubuntu-latest' }}
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Environment setup (Python${{ matrix.python-version }}, ${{ matrix.tox-env }})'
Expand Down Expand Up @@ -316,14 +323,14 @@ jobs:
COVERALLS_PARALLEL: true
- name: Tests measurement
if : ${{ matrix.os == 'ubuntu-latest' }}
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Testing with tox (Python${{ matrix.python-version }}, ${{ matrix.tox-env }})'
continue-on-error: true
- name: Show Energy Results
if : ${{ matrix.os == 'ubuntu-latest' }}
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
Expand Down Expand Up @@ -366,7 +373,7 @@ jobs:
raw.githubusercontent.com:443
sum.golang.org:443
- name: Start Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -398,7 +405,7 @@ jobs:
xclim show_version_info
python -m pip check || true
- name: Environment Setup Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Environment setup (conda, Python${{ matrix.python-version }})'
Expand All @@ -414,13 +421,13 @@ jobs:
COVERALLS_FLAG_NAME: run-{{ matrix.python-version }}-conda
COVERALLS_PARALLEL: true
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Testing with pytest (conda, Python${{ matrix.python-version }})'
continue-on-error: true
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
Expand Down Expand Up @@ -454,7 +461,7 @@ jobs:
pypi.org:443
sum.golang.org:443
- name: Start Energy Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand All @@ -464,13 +471,13 @@ jobs:
with:
parallel-finished: true
- name: Finish measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Finish Run'
continue-on-error: true
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/publish-mastodon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
CONTRIBUTORS: ${{ env.contributors }}

- name: Send toot to Mastodon
uses: cbrgm/mastodon-github-action@50b70e53ab0871a90fe364ff96e783c7e3633f15 # v2.1.11
uses: cbrgm/mastodon-github-action@e63ca54c7fe6e142917c5946620383200f376855 # v2.1.12
with:
url: ${{ secrets.MASTODON_URL }}
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.x"
- name: Install CI libraries
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.x"
- name: Install CI libraries
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
repo.anaconda.com:443
sum.golang.org:443
- name: Start Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: start-measurement
branch: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
xclim show_version_info
python -m pip check || true
- name: Setup Python Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Environment Setup (Upstream, Python${{ matrix.python-version }})'
Expand All @@ -125,13 +125,13 @@ jobs:
issue-title: "⚠️ Nightly upstream-dev CI failed for Python${{ matrix.python-version }} ⚠️"
log-path: output-${{ matrix.python-version }}-log.jsonl
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: get-measurement
label: 'Testing and Reporting (Upstream, Python${{ matrix.python-version }})'
continue-on-error: true
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@2c74a687e9cc4cc4579ae752404a8d54cc46a06a # v4.3.0
uses: green-coding-solutions/eco-ci-energy-estimation@7ff5628108e21227662ce881f10156eb9deab891 # v4.4
with:
task: display-results
continue-on-error: true
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ repos:
- id: yamllint
args: [ '--config-file=.yamllint.yaml' ]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.4
hooks:
- id: ruff
args: [ '--fix', '--show-fixes' ]
- repo: https://github.com/pylint-dev/pylint
rev: v3.3.3
rev: v3.3.4
hooks:
- id: pylint
args: [ '--rcfile=.pylintrc.toml', '--errors-only', '--jobs=0', '--disable=import-error' ]
Expand Down Expand Up @@ -82,19 +82,19 @@ repos:
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
rev: 0.7.22
hooks:
- id: mdformat
exclude: '.github/\w+.md|.github/publish-mastodon-template.md|docs/paper/paper.md'
- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc
additional_dependencies: [ 'black==24.10.0' ]
additional_dependencies: [ 'black==25.1.0' ]
exclude: '(src/xclim/indices/__init__.py|docs/installation.rst)'
- id: blackdoc-autoupdate-black
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: [ 'tomli' ]
Expand All @@ -106,11 +106,11 @@ repos:
# Exclude the missing submodule from the xclim.core, see:
exclude: ^docs/|^tests/|^src/xclim/sdba|^src/xclim/core/missing.py
- repo: https://github.com/gitleaks/gitleaks
rev: v8.22.1
rev: v8.23.3
hooks:
- id: gitleaks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
rev: 0.31.1
hooks:
- id: check-github-workflows
- id: check-readthedocs
Expand Down
Loading

0 comments on commit ca47063

Please sign in to comment.