Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
draft: false
name: Release ${{ github.ref }}
prerelease: false
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m pip install build
- name: Build and publish
run: python -m build
run: |
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
14 changes: 9 additions & 5 deletions .github/workflows/upstream-dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
- uses: xarray-contrib/[email protected]
- uses: xarray-contrib/[email protected].1
id: detect-trigger
with:
keyword: "[test-upstream]"
Expand Down Expand Up @@ -57,9 +58,10 @@ jobs:
- name: setup conda (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
environment-file: ci/dev.yml
environment-name: xskillscore-dev
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
pytest-reportlog
Expand Down Expand Up @@ -110,8 +112,10 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/download-artifact@v2
Expand All @@ -127,7 +131,7 @@ jobs:
wget https://raw.githubusercontent.com/pydata/xarray/master/.github/workflows/parse_logs.py
python parse_logs.py logs/**/*-log
- name: Report failures
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/xskillscore_installs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
python -m pip install -e .
python -c "import xskillscore"
91 changes: 44 additions & 47 deletions .github/workflows/xskillscore_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
- uses: xarray-contrib/[email protected]
- uses: xarray-contrib/[email protected].1
id: detect-trigger
with:
keyword: "[skip-ci]"

test: # Runs testing suite on various python versions.
name: Test xskillscore, python ${{ matrix.python-version }}
name: Test xskillscore (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
Expand All @@ -34,24 +35,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
with:
auto-update-conda: true
channels: conda-forge
mamba-version: '*'
activate-environment: xskillscore-minimum-tests
python-version: ${{ matrix.python-version }}
- name: Set up conda environment
run: |
mamba env update -f ci/minimum-tests.yml
- name: Conda info
run: conda info
- name: Conda list
run: conda list
persist-credentials: false
- name: Set up conda (micromamba)
uses: mamba-org/[email protected]
with:
cache-downloads: true
cache-environment: true
environment-file: ci/minimum-tests.yml
create-args: >
python=${{ matrix.python-version }}
- name: Run tests
run: |
pytest -n 4 --cov=xskillscore --cov-report=xml --verbose
Expand All @@ -70,25 +66,25 @@ jobs:
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.13" ]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
with:
auto-update-conda: true
channels: conda-forge
mamba-version: "*"
activate-environment: xskillscore-minimum-tests
python-version: 3.9
- name: Set up conda environment
run: |
mamba env update -f ci/minimum-tests.yml
persist-credentials: false
- name: Set up conda (micromamba)
uses: mamba-org/[email protected]
with:
cache-downloads: true
cache-environment: true
environment-file: ci/minimum-tests.yml
create-args: >
python=${{ matrix.python-version }}
- name: Install xskillscore
run: |
python -m pip install --no-deps -e .
- name: Conda info
run: conda info
- name: Conda list
run: conda list
- name: Run doctests
run: |
python -m pytest --doctest-modules xskillscore --ignore xskillscore/tests
Expand All @@ -100,23 +96,24 @@ jobs:
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: [ "3.9" ]
steps:
- uses: actions/checkout@v2
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
with:
auto-update-conda: true
channels: conda-forge
mamba-version: "*"
activate-environment: xskillscore-docs-notebooks
python-version: 3.9
- name: Set up conda environment
persist-credentials: false
- name: Set up conda (micromamba)
uses: mamba-org/[email protected]
with:
cache-downloads: true
cache-environment: true
environment-file: ci/docs_notebooks.yml
create-args: >
python=${{ matrix.python-version }}
- name: Install xskillscore
run: |
mamba env update -f ci/docs_notebooks.yml
- name: Conda info
run: conda info
- name: Conda list
run: conda list
python -m pip install --no-deps -e .
- name: Test notebooks in docs
run: |
pushd docs
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ build
.ipynb_checkpoints/
.eggs/

# Visual Studio Code
.vscode

# asv environments
.asv

# Mac stuff
.DS_Store

# JetBrains
.idea

# Documentation
docs/build/
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
Expand All @@ -34,7 +34,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
rev: "v0.11.8"
hooks:
- id: ruff
args: ["--select", "E,F,I001"]
Expand All @@ -49,7 +49,7 @@ repos:
additional_dependencies: ["black==23.10.1"]

- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
rev: v1.1.2
hooks:
- id: doc8
args:
Expand All @@ -62,14 +62,14 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
rev: "v1.15.0"
hooks:
- id: mypy
exclude: "asv_bench"
additional_dependencies: [
# Type stubs
types-python-dateutil,
types-pkg_resources,
types-setuptools,
types-PyYAML,
types-pytz,
typing-extensions,
Expand All @@ -78,7 +78,7 @@ repos:
]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.1
rev: 0.33.0
hooks:
- id: check-github-workflows
- id: check-readthedocs
10 changes: 8 additions & 2 deletions readthedocs.yml → .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: "ubuntu-22.04"
os: "ubuntu-24.04"
tools:
python: "mambaforge-22.9"
python: "mambaforge-23.11"
jobs:
post_checkout:
- (git --no-pager log --pretty="tformat:%s" -1 | grep -vqF "[skip-rtd]") || exit 183
Expand All @@ -15,6 +15,12 @@ conda:
environment: ci/doc.yml

sphinx:
configuration: docs/source/conf.py
fail_on_warning: false

formats: []

python:
install:
- method: pip
path: .
Loading
Loading