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

Upin xclim, package health #832

Merged
merged 94 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
5efa702
unpin xclim version
Zeitsperre Oct 3, 2023
272ef0f
update pre-commit, add a few relevant hooks
Zeitsperre Oct 3, 2023
c80ee98
sort binder environment dependencies
Zeitsperre Oct 3, 2023
38f8eeb
remove unmaintained nb_black
Zeitsperre Oct 3, 2023
3ada5d8
color and verbosity in pytest
Zeitsperre Oct 3, 2023
8ea6cb4
sort package metadata, add Python3.11
Zeitsperre Oct 3, 2023
24ebc52
roll back mypy update for typing extensions
Zeitsperre Oct 3, 2023
b8f35ab
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 3, 2023
47a96a5
exclude asv files
Zeitsperre Oct 3, 2023
94026fb
sort requirements, add numpy
Zeitsperre Oct 3, 2023
a1333a0
flake8 fixes
Zeitsperre Oct 3, 2023
d487c5c
trick pre-commit into running workflow by pushing automatic corrections
Zeitsperre Oct 3, 2023
32512a2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 3, 2023
78506f4
address pytest warnings
Zeitsperre Oct 3, 2023
b1f5de6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 3, 2023
a884b6a
CI dependencies and requirements.txt cleanup
Zeitsperre Oct 4, 2023
db67745
update CI workflows to newer conventions, sort and remove obsolete en…
Zeitsperre Oct 4, 2023
9fb9677
install climpred in ReadTheDocs
Zeitsperre Oct 4, 2023
6436273
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2023
1a2e605
address importlib.metadata comment
Zeitsperre Oct 4, 2023
f4be00d
fix erroneous environment file
Zeitsperre Oct 4, 2023
b0a2ff1
fix spacing
Zeitsperre Oct 4, 2023
4faa1d7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2023
1a13048
reset xarray pins to earlier version
Zeitsperre Oct 4, 2023
e3bfc3f
sort recipes, add pooch to dependencies,
Zeitsperre Oct 4, 2023
130d8c2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2023
ac3c102
Merge branch 'main' into upin-xclim
aaronspring Oct 7, 2023
db23721
add warning cv=LOO und skip some related tests
aaronspring Oct 9, 2023
155581b
not testing DetrendedQuantileMapping and but raise issue
aaronspring Oct 9, 2023
1347ac5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
ec52081
Update CHANGELOG.rst
aaronspring Oct 9, 2023
5fc3e24
Apply suggestions from code review
aaronspring Oct 9, 2023
2265aae
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
7396a07
Update climpred/classes.py
aaronspring Oct 9, 2023
845e75b
Update climpred/classes.py
aaronspring Oct 9, 2023
2d352ba
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
3248920
Update climpred/classes.py
aaronspring Oct 9, 2023
2ddc506
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
cf460a1
Update climpred/classes.py
aaronspring Oct 9, 2023
e112fe7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
5ae9d96
unpin xarray in climpred-dev recipe
Zeitsperre Oct 10, 2023
5373d65
add an upstream build to regular CI
Zeitsperre Oct 10, 2023
efdb45d
fox workflow formatting
Zeitsperre Oct 10, 2023
23fcf4a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 10, 2023
ae635eb
update pre-commit, trigger build
Zeitsperre Oct 24, 2023
cae9568
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 24, 2023
ba4b431
Update classes.py
aaronspring Oct 25, 2023
56d730f
Fix doctest
aaronspring Oct 25, 2023
3bd6c17
Trigger CI
aaronspring Oct 25, 2023
ba8c96c
Again
aaronspring Oct 26, 2023
e5540a3
Update setup.py pin xclim>=0.46 for testing
aaronspring Oct 26, 2023
1b33260
Apply suggestiounoun xclim and don’t run tests in parallel to not cra…
aaronspring Oct 26, 2023
c1ceaec
Update .github/workflows/climpred_testing.yml
aaronspring Oct 26, 2023
b9672a4
Update .github/workflows/climpred_testing.yml
aaronspring Oct 26, 2023
a856bc4
Try h5py
aaronspring Oct 28, 2023
3aa926d
Update climpred_testing.yml
aaronspring Oct 28, 2023
076c58c
Update climpred_testing.yml
aaronspring Oct 28, 2023
872cba5
Update climpred_testing.yml
aaronspring Oct 28, 2023
ae92dc9
h5netcdf works
aaronspring Oct 28, 2023
a20a7a4
Update climpred_testing.yml
aaronspring Oct 28, 2023
6f58a03
Update setup.py xclim>=0.46
aaronspring Oct 28, 2023
088b5b4
Update README.rst [skip-ci]
aaronspring Oct 28, 2023
dde8a8a
Update climpred_testing.yml
aaronspring Oct 28, 2023
e1868e2
no -n and pip install h5 xarray for max tests
aaronspring Oct 28, 2023
3f8eb25
Update climpred_testing.yml
aaronspring Oct 28, 2023
69dadd0
Silence quantile delta mapping
aaronspring Oct 28, 2023
6dd90cb
Update climpred_testing.yml
aaronspring Oct 28, 2023
b1a86c0
Update climpred_testing.yml
aaronspring Oct 28, 2023
0f2091f
Update climpred_testing.yml
aaronspring Oct 28, 2023
216b283
Update climpred_testing.yml
aaronspring Oct 28, 2023
34997c4
Update climpred_testing.yml
aaronspring Oct 28, 2023
792b145
Update climpred_testing.yml
aaronspring Oct 28, 2023
720f627
Update climpred_testing.yml
aaronspring Oct 28, 2023
9c7ce13
Update climpred_testing.yml
aaronspring Oct 28, 2023
87b1935
Update maximum-tests.yml
aaronspring Oct 28, 2023
41e5e86
h5netcdf in maximum-tests.yml
aaronspring Oct 28, 2023
a85c37a
Update climpred_testing.yml
aaronspring Oct 28, 2023
ee93056
Update climpred_testing.yml
aaronspring Oct 28, 2023
04dd31f
Update minimum-tests.yml
aaronspring Oct 28, 2023
9b92c9c
Update climpred_testing.yml
aaronspring Oct 28, 2023
1f86dda
Update graphics.py to prevent cm.get_cmap warning
aaronspring Oct 29, 2023
f5559e8
Update test_options.py idx singleton dim only for py<3.11
aaronspring Oct 29, 2023
0c59c98
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2023
8db6b94
Update graphics.py
aaronspring Oct 29, 2023
35c135d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2023
6bc5cc5
Update graphics.py
aaronspring Oct 29, 2023
9e169f3
Update graphics.py
aaronspring Oct 29, 2023
576a7c1
Update graphics.py fix
aaronspring Oct 29, 2023
6f9d989
Update graphics.py fix
aaronspring Oct 29, 2023
86d61ea
Update graphics.py
aaronspring Oct 29, 2023
8820a36
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2023
db586fb
Update graphics.py
aaronspring Oct 29, 2023
d6b1136
Update graphics.py
aaronspring Oct 29, 2023
7515895
Update setup.py [skip-ci]
aaronspring Oct 30, 2023
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
25 changes: 12 additions & 13 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@ name: climpred-docs-notebooks
channels:
- conda-forge
dependencies:
- python>=3.9
- xarray>=0.19.0
- dask-core>=2021.10.0
- cftime>=1.5.0
- xskillscore>=0.0.20
- cf_xarray>=0.6.0
- xesmf
- python >=3.9
- bias_correction >=0.4
- cf_xarray >=0.6.0
- cftime >=1.5.0
- dask-core >=2021.10.0
- esmpy
- pydap
- esmtools >=1.1.3
- matplotlib-base
- nc-time-axis>=1.4.0
- nc-time-axis >=1.4.0
- netcdf4 # ==1.5.1 # see https://github.com/pydata/xarray/issues/4925
- pydap
- toolz
- xarray >=0.19.0
- xclim !=0.30.0
- xesmf
- xrft
- esmtools>=1.1.3
- xclim!=0.30.0
- bias_correction>=0.4
- xskillscore >=0.0.20
- pip
- pip:
- git+https://github.com/pangeo-data/climpred.git # latest climpred version
- nb_black
12 changes: 6 additions & 6 deletions .github/workflows/climpred_installs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: xarray-contrib/[email protected]
Expand All @@ -34,8 +34,8 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v3
- name: Setup python
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
Expand All @@ -54,10 +54,10 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Setup python
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
Expand Down
126 changes: 73 additions & 53 deletions .github/workflows/climpred_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: xarray-contrib/[email protected]
Expand All @@ -27,40 +27,45 @@ jobs:
keyword: "[skip-ci]"

minimum-test: # Runs testing suite with minimal dependencies
name: Test minimum dependencies, python 3.9
name: Test minimum dependencies, Python3.9
runs-on: ubuntu-latest
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
- name: Set up conda (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: false
channels: conda-forge
miniforge-variant: Mambaforge
activate-environment: climpred-minimum-tests
python-version: 3.9
- name: Set up conda environment
run: |
mamba env update -f ci/requirements/minimum-tests.yml
environment-file: ci/requirements/minimum-tests.yml
environment-name: climpred-minimum-tests
cache-environment: true
create-args: >-
python=3.9
conda
- name: Install climpred
run: |
python -m pip install -e .
python -m pip uninstall netcdf4 -y
- name: Conda info
run: conda info
run: |
conda info
- name: Conda list
run: conda list
run: |
conda list
- name: Cache datasets # pytest-xdist fails otherwise
run: |
python -c "import climpred; climpred.tutorial._cache_all()"
- name: Run tests
run: pytest -n 4 --durations=20
run: |
pytest -n 4 --durations=20
aaronspring marked this conversation as resolved.
Show resolved Hide resolved

maximum-test: # Runs testing suite with all optional dependencies
name: Test optional dependencies, python ${{ matrix.python-version }}
name: Test optional dependencies, Python${{ matrix.python-version }}
runs-on: ubuntu-latest
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
Expand All @@ -70,7 +75,6 @@ jobs:
strategy:
fail-fast: false
matrix:
# python-version: [ "3.9", "3.10"]
env: [""]
include:
- env: "climpred-maximum-tests"
Expand All @@ -79,11 +83,14 @@ jobs:
- env: "climpred-maximum-tests"
python-version: "3.10"
os: ubuntu-latest
- env: "climpred-maximum-tests-upstream"
python-version: "3.11"
os: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Setup micromamba
- name: Setup conda (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/requirements/maximum-tests.yml
Expand All @@ -93,18 +100,26 @@ jobs:
create-args: >-
python=${{matrix.python-version}}
conda
- name: Install climpred[complete]
run: |
python -m pip install -e .[complete]
python -m pip uninstall netcdf4 -y
- name: Install bleeding edge
if: matrix.env == 'climpred-maximum-tests-upstream'
run: |
python -m pip install -r requirements_upstream.txt
- name: Conda info
run: conda info
run: |
conda info
- name: Conda list
run: conda list
- name: install
run: |
python -m pip install -e .[complete]
conda list xclim
conda list
- name: Cache datasets # pytest-xdist fails otherwise
run: python -c "import climpred; climpred.tutorial._cache_all()"
run: |
python -c "import climpred; climpred.tutorial._cache_all()"
- name: Run tests
run: pytest -n 4 --durations=20 --cov=climpred --cov-report=xml
run: |
pytest -n 4 --durations=20 --cov=climpred --cov-report=xml
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
Expand All @@ -113,56 +128,61 @@ jobs:
fail_ci_if_error: false

doctest: # tests all docstrings
name: Doctests
name: Doctests, Python3.9
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- name: Setup conda (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
channels: conda-forge
miniforge-variant: Mambaforge
activate-environment: climpred-maximum-tests
auto-update-conda: false
python-version: 3.9
- name: Install conda dependencies
run: |
mamba env update -f ci/requirements/maximum-tests.yml
- name: Install climpred
environment-file: ci/requirements/maximum-tests.yml
environment-name: climpred-maximum-tests
cache-environment: true
create-args: >-
python=3.9
conda
- name: Install climpred[complete]
run: |
python -m pip install -e .[complete]
- name: Conda info
run: conda info
run: |
conda info
- name: Conda list
run: conda list
run: |
conda list
- name: Run doctests
run: |
python -m pytest --doctest-modules climpred --ignore climpred/tests

notebooks: # Checks that pre-compiled notebooks in docs still work.
name: Notebooks, Python3.9
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- name: Set up conda (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: false
channels: conda-forge
miniforge-variant: Mambaforge
activate-environment: climpred-docs
python-version: 3.9
- name: Set up conda environment
run: |
mamba env update -f ci/requirements/docs.yml
environment-file: ci/requirements/docs.yml
environment-name: climpred-docs
cache-environment: true
create-args: >-
python=3.9
conda
- name: Install climpred
run: |
python -m pip install -e .
- name: Conda info
run: conda info
run: |
conda info
- name: Conda list
run: conda list
run: |
conda list
- name: Test notebooks in docs
run: |
pushd docs
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/upstream-dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: xarray-contrib/[email protected]
Expand Down Expand Up @@ -48,27 +48,29 @@ jobs:
outputs:
artifacts_availability: ${{ steps.status.outputs.ARTIFACTS_AVAILABLE }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda environment
uses: mamba-org/provision-with-micromamba@f347426e5745fe3dfc13ec5baf20496990d0281f
- name: Set up conda (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/requirements/climpred-dev.yml
environment-name: climpred-dev
extra-specs: |
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
pytest-reportlog
conda
- name: Set up conda environment
run: |
bash ci/install-upstream-wheels.sh
- name: Install climpred
- name: Install climpred (no deps)
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
- name: Conda info
run: conda info -a
- name: Conda list
run: conda list
- name: import climpred
run: |
python -c 'import climpred; climpred.show_versions()'
Expand Down
Loading