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

Use install-esmf-action #31

Merged
merged 9 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 8 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
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
bump_patch_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Conda (Micromamba)
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
name: test-${{ matrix.tox-env }} (Python${{ matrix.python-version }})
# needs: black
runs-on: ubuntu-latest
env:
ESMF_VERSION: "v8.5.0"
strategy:
matrix:
include:
Expand All @@ -57,7 +59,18 @@ jobs:
- tox-env: "py311"
python-version: "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install NetCDF
run: |
sudo apt-get -y update
sudo apt install libnetcdf-dev libnetcdff-dev
- name: Install ESMF
uses: esmf-org/install-esmf-action@v1
env:
ESMF_NETCDF: nc-config
with:
cache: true
version: ${{ env.ESMF_VERSION }}
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -67,6 +80,7 @@ jobs:
- name: Test with tox
run: tox -e ${{ matrix.tox-env }}
env:
ESMF_VERSION: ${{ env.ESMF_VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }}
COVERALLS_PARALLEL: true
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 @@ -10,7 +10,7 @@ jobs:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python3
uses: actions/setup-python@v4
with:
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 @@ -10,7 +10,7 @@ jobs:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python3
uses: actions/setup-python@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
"pint>=0.10",
"scipy>=1.2",
"tqdm",
# FIXME: This needs to be revisited. `xagg` should be an optional dependency, reliant on Anaconda.
# "xagg-no-xesmf-deps",
# "xagg",
"xagg",
"xarray>=2023.1",
"zarr>=2.11.1",
]
Expand Down
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ setenv =
PYTEST_ADDOPTS = "--color=yes"
PYTHONPATH = {toxinidir}
passenv =
COVERALLS_*
ESMFMKFILE
ESMF_VERSION
GITHUB_*
extras =
dev
download = True
install_command = python -m pip install --no-user {opts} {packages}
deps =
git+https://github.com/esmf-org/esmf.git@{env:ESMF_VERSION}\#subdirectory=src/addon/esmpy
; If you want to make tox run the tests with the same versions, create a
; requirements.txt with the pinned versions and uncomment the following line:
; -r{toxinidir}/requirements.txt
Expand Down