Skip to content

Commit

Permalink
Update Mamba based CI (#362)
Browse files Browse the repository at this point in the history
* Update Mamba based CI

* Update ci.yaml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update environment.yml

* Update environment-upstream-dev.yml

* Update whats-new.rst

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jbusecke and pre-commit-ci[bot] authored Jun 25, 2024
1 parent f1773fe commit f31885e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Create conda environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1
with:
cache-environment: true
cache-downloads: true
cache-env: true
micromamba-version: 'latest'
environment-file: ci/environment.yml
extra-specs: |
create-args: >-
python=${{ matrix.python-version }}
- name: Install xMIP
run: |
Expand Down Expand Up @@ -80,14 +80,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
cache-environment: true
cache-downloads: true
cache-env: true
micromamba-version: 'latest'
environment-file: ci/environment-upstream-dev.yml
extra-specs: |
python=3.10
create-args: >-
python=3.11
- name: Install xMIP
run: |
python -m pip install -e . --no-deps
Expand All @@ -103,8 +103,6 @@ jobs:
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
- name: Check Machine Config
run: lscpu
- name: Run Tests
run: |
pytest -n auto --ignore=tests/test_preprocessing_cloud.py
Expand All @@ -126,29 +124,18 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
cache-environment: true
cache-downloads: true
cache-env: true
micromamba-version: 'latest'
environment-file: ci/environment-upstream-dev.yml
extra-specs: |
python=3.10
environment-file: ci/environment.yml
create-args: >-
python=3.11
- name: Install xMIP
run: |
python -m pip install -e . --no-deps
conda list
- name: Run Tests
run: |
pytest -n auto --cov=./ --cov-report=xml --ignore=tests/test_preprocessing_cloud.py
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
- name: Check Machine Config
run: lscpu
- name: Run Tests
Expand Down
1 change: 0 additions & 1 deletion ci/environment-upstream-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies:
- pip
- cartopy #installing this without conda is a nightmare, so ill leave it here
- xesmf # same here
- esmf<=8.3.1 #See https://github.com/pangeo-data/xESMF/issues/246
- rasterio # Trying to get around an apparent bug with py 3.10 + pip + rasterio (https://github.com/jbusecke/cmip6_preprocessing/pull/231#issuecomment-1132190649)
- pip:
- codecov
Expand Down
1 change: 0 additions & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies:
- regionmask
- cartopy
- xesmf
- esmf<=8.3.1 #See https://github.com/pangeo-data/xESMF/issues/246
- xarrayutils>=2.0.0 #TODO remove when the new xarray polyfit is implemented
- pint
- cf_xarray>=0.6.0
Expand Down
1 change: 1 addition & 0 deletions docs/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Internal Changes
- Updated pre-commit linting to use ruff (:pull:`359`). By `Julius Busecke <https://github.com/jbusecke>`
- Modernized packaging workflow, that runs on each PR (:pull:`361`). By `Julius Busecke <https://github.com/jbusecke>`
- Added 'nvertices' -> 'vertex' to renaming preprocessor (:pull:`357`). By `Julius Busecke <https://github.com/jbusecke>`
- Updated mamba CI + testing py311/py312 (:issue:`360`, :pull:`362`). By `Julius Busecke <https://github.com/jbusecke>`

.. _whats-new.0.7.2:

Expand Down

0 comments on commit f31885e

Please sign in to comment.