Skip to content

Commit 491e741

Browse files
authored
Address DeprecationWarnings and suppress warnings for numpy 1.25+ (#426)
1 parent 590d668 commit 491e741

File tree

76 files changed

+344
-327
lines changed

Some content is hidden

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

76 files changed

+344
-327
lines changed

.github/workflows/python-publish.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@master
14+
uses: actions/checkout@v4
1515
- name: Create Release
1616
id: create_release
17-
uses: actions/create-release@v1
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
17+
uses: softprops/action-gh-release@v2
2018
with:
21-
tag_name: ${{ github.ref }}
22-
release_name: Release ${{ github.ref }}
2319
body: |
2420
Changes in this Release
2521
draft: false
22+
name: Release ${{ github.ref }}
2623
prerelease: false
24+
tag_name: ${{ github.ref }}
25+
token: ${{ secrets.GITHUB_TOKEN }}
2726
deploy:
2827
needs: release
2928
runs-on: ubuntu-latest
3029
steps:
31-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3231
- name: Set up Python
33-
uses: actions/setup-python@v3
32+
uses: actions/setup-python@v5
3433
with:
3534
python-version: "3.x"
3635
- name: Install dependencies
3736
run: |
3837
python -m pip install --upgrade pip
39-
pip install build
38+
python -m pip install build
4039
- name: Build and publish
41-
run: python -m build
40+
run: |
41+
python -m build
4242
- name: Publish package
43-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
43+
uses: pypa/gh-action-pypi-publish@v1.12.4
4444
with:
4545
user: __token__
4646
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/upstream-dev-ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:
27+
persist-credentials: false
2728
fetch-depth: 2
28-
- uses: xarray-contrib/ci-trigger@v1.1
29+
- uses: xarray-contrib/ci-trigger@v1.1.1
2930
id: detect-trigger
3031
with:
3132
keyword: "[test-upstream]"
@@ -57,9 +58,10 @@ jobs:
5758
- name: setup conda (micromamba)
5859
uses: mamba-org/setup-micromamba@v1
5960
with:
61+
cache-downloads: true
62+
cache-environment: true
6063
environment-file: ci/dev.yml
6164
environment-name: xskillscore-dev
62-
cache-environment: true
6365
create-args: >-
6466
python=${{ matrix.python-version }}
6567
pytest-reportlog
@@ -110,8 +112,10 @@ jobs:
110112
run:
111113
shell: bash
112114
steps:
113-
- uses: actions/checkout@v2
114-
- uses: actions/setup-python@v2
115+
- uses: actions/checkout@v4
116+
with:
117+
persist-credentials: false
118+
- uses: actions/setup-python@v5
115119
with:
116120
python-version: "3.x"
117121
- uses: actions/download-artifact@v2
@@ -127,7 +131,7 @@ jobs:
127131
wget https://raw.githubusercontent.com/pydata/xarray/master/.github/workflows/parse_logs.py
128132
python parse_logs.py logs/**/*-log
129133
- name: Report failures
130-
uses: actions/github-script@v3
134+
uses: actions/github-script@v6
131135
with:
132136
github-token: ${{ secrets.GITHUB_TOKEN }}
133137
script: |

.github/workflows/xskillscore_installs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
matrix:
3535
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3838
- name: Setup python
39-
uses: actions/setup-python@v2
39+
uses: actions/setup-python@v5
4040
with:
4141
python-version: 3.9
4242
- name: Install dependencies
4343
run: |
4444
python -m pip install --upgrade pip
45-
pip install -e .
45+
python -m pip install -e .
4646
python -c "import xskillscore"

.github/workflows/xskillscore_testing.yml

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ jobs:
1515
outputs:
1616
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
with:
20+
persist-credentials: false
2021
fetch-depth: 2
21-
- uses: xarray-contrib/ci-trigger@v1.1
22+
- uses: xarray-contrib/ci-trigger@v1.1.1
2223
id: detect-trigger
2324
with:
2425
keyword: "[skip-ci]"
2526

2627
test: # Runs testing suite on various python versions.
27-
name: Test xskillscore, python ${{ matrix.python-version }}
28+
name: Test xskillscore (Python ${{ matrix.python-version }})
2829
runs-on: ubuntu-latest
2930
needs: detect-ci-trigger
3031
if: needs.detect-ci-trigger.outputs.triggered == 'false'
@@ -34,24 +35,19 @@ jobs:
3435
strategy:
3536
fail-fast: false
3637
matrix:
37-
python-version: ["3.9", "3.10", "3.11"]
38+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3839
steps:
39-
- uses: actions/checkout@v2
40-
- name: Set up conda
41-
uses: conda-incubator/setup-miniconda@v2
40+
- uses: actions/checkout@v4
4241
with:
43-
auto-update-conda: true
44-
channels: conda-forge
45-
mamba-version: '*'
46-
activate-environment: xskillscore-minimum-tests
47-
python-version: ${{ matrix.python-version }}
48-
- name: Set up conda environment
49-
run: |
50-
mamba env update -f ci/minimum-tests.yml
51-
- name: Conda info
52-
run: conda info
53-
- name: Conda list
54-
run: conda list
42+
persist-credentials: false
43+
- name: Set up conda (micromamba)
44+
uses: mamba-org/setup-micromamba@v2.0.4
45+
with:
46+
cache-downloads: true
47+
cache-environment: true
48+
environment-file: ci/minimum-tests.yml
49+
create-args: >
50+
python=${{ matrix.python-version }}
5551
- name: Run tests
5652
run: |
5753
pytest -n 4 --cov=xskillscore --cov-report=xml --verbose
@@ -70,25 +66,25 @@ jobs:
7066
defaults:
7167
run:
7268
shell: bash -l {0}
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
python-version: [ "3.9", "3.13" ]
7373
steps:
74-
- uses: actions/checkout@v2
75-
- uses: conda-incubator/setup-miniconda@v2
74+
- uses: actions/checkout@v4
7675
with:
77-
auto-update-conda: true
78-
channels: conda-forge
79-
mamba-version: "*"
80-
activate-environment: xskillscore-minimum-tests
81-
python-version: 3.9
82-
- name: Set up conda environment
83-
run: |
84-
mamba env update -f ci/minimum-tests.yml
76+
persist-credentials: false
77+
- name: Set up conda (micromamba)
78+
uses: mamba-org/setup-micromamba@v2.0.4
79+
with:
80+
cache-downloads: true
81+
cache-environment: true
82+
environment-file: ci/minimum-tests.yml
83+
create-args: >
84+
python=${{ matrix.python-version }}
8585
- name: Install xskillscore
8686
run: |
8787
python -m pip install --no-deps -e .
88-
- name: Conda info
89-
run: conda info
90-
- name: Conda list
91-
run: conda list
9288
- name: Run doctests
9389
run: |
9490
python -m pytest --doctest-modules xskillscore --ignore xskillscore/tests
@@ -100,23 +96,24 @@ jobs:
10096
defaults:
10197
run:
10298
shell: bash -l {0}
99+
strategy:
100+
matrix:
101+
python-version: [ "3.9" ]
103102
steps:
104-
- uses: actions/checkout@v2
105-
- name: Set up conda
106-
uses: conda-incubator/setup-miniconda@v2
103+
- uses: actions/checkout@v4
107104
with:
108-
auto-update-conda: true
109-
channels: conda-forge
110-
mamba-version: "*"
111-
activate-environment: xskillscore-docs-notebooks
112-
python-version: 3.9
113-
- name: Set up conda environment
105+
persist-credentials: false
106+
- name: Set up conda (micromamba)
107+
uses: mamba-org/setup-micromamba@v2.0.4
108+
with:
109+
cache-downloads: true
110+
cache-environment: true
111+
environment-file: ci/docs_notebooks.yml
112+
create-args: >
113+
python=${{ matrix.python-version }}
114+
- name: Install xskillscore
114115
run: |
115-
mamba env update -f ci/docs_notebooks.yml
116-
- name: Conda info
117-
run: conda info
118-
- name: Conda list
119-
run: conda list
116+
python -m pip install --no-deps -e .
120117
- name: Test notebooks in docs
121118
run: |
122119
pushd docs

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ build
88
.ipynb_checkpoints/
99
.eggs/
1010

11+
# Visual Studio Code
1112
.vscode
1213

1314
# asv environments
1415
.asv
1516

1617
# Mac stuff
1718
.DS_Store
19+
20+
# JetBrains
21+
.idea
22+
23+
# Documentation
24+
docs/build/

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ci:
1515

1616
repos:
1717
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.5.0
18+
rev: v5.0.0
1919
hooks:
2020
- id: check-added-large-files
2121
- id: check-docstring-first
@@ -34,7 +34,7 @@ repos:
3434
- id: trailing-whitespace
3535

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

5151
- repo: https://github.com/PyCQA/doc8
52-
rev: v1.1.1
52+
rev: v1.1.2
5353
hooks:
5454
- id: doc8
5555
args:
@@ -62,14 +62,14 @@ repos:
6262
]
6363

6464
- repo: https://github.com/pre-commit/mirrors-mypy
65-
rev: "v1.9.0"
65+
rev: "v1.15.0"
6666
hooks:
6767
- id: mypy
6868
exclude: "asv_bench"
6969
additional_dependencies: [
7070
# Type stubs
7171
types-python-dateutil,
72-
types-pkg_resources,
72+
types-setuptools,
7373
types-PyYAML,
7474
types-pytz,
7575
typing-extensions,
@@ -78,7 +78,7 @@ repos:
7878
]
7979

8080
- repo: https://github.com/python-jsonschema/check-jsonschema
81-
rev: 0.28.1
81+
rev: 0.33.0
8282
hooks:
8383
- id: check-github-workflows
8484
- id: check-readthedocs

readthedocs.yml renamed to .readthedocs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

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

1717
sphinx:
18+
configuration: docs/source/conf.py
1819
fail_on_warning: false
1920

2021
formats: []
22+
23+
python:
24+
install:
25+
- method: pip
26+
path: .

0 commit comments

Comments
 (0)