-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regridding functionalities (powered by xESMF) (#243)
* clisops.ops.regrid, clisops.core.regrid, clisops.core.Weights and clisops.core.Grid added. Allowing the remapping of geospatial data on various grids by applying the xESMF Regridder (https://pangeo-xesmf.readthedocs.io/en/latest/). * Extending the removal of redundant _FillValue attributes to all data variables and coordinates. * Extending the removal of redundant coordinates in the coordinates variable attribute from bounds to all data variables. * GitHub Workflows for upstream dependencies are now examined a schedule or via workflow_dispatch. * black steps are now called lint for clarity/inclusiveness of other linting hooks. * pre-commit hooks now include checks for TOML files, and for ReadTheDocs and GitHub Actions configuration files. --------- Co-authored-by: ellesmith88 <[email protected]> Co-authored-by: Ag Stephens <[email protected]> Co-authored-by: Eleanor Smith <[email protected]> Co-authored-by: Martin Schupfner <[email protected]> Co-authored-by: Trevor James Smith <[email protected]>
- Loading branch information
1 parent
37967bd
commit a999bcb
Showing
36 changed files
with
5,830 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,13 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
black: | ||
lint: | ||
name: Linting Suite | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
tox-env: | ||
- black | ||
- lint | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
|
@@ -28,8 +29,8 @@ jobs: | |
run: tox -e ${{ matrix.tox-env }} | ||
|
||
pypi: | ||
name: Pip with Python${{ matrix.python-version }} | ||
needs: black | ||
name: Python${{ matrix.python-version }} (PyPI + Tox) | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -61,17 +62,19 @@ jobs: | |
COVERALLS_SERVICE_NAME: github | ||
|
||
conda: | ||
name: Anaconda Build with Python${{ matrix.python-version }} (upstream=${{ matrix.upstream }}) | ||
needs: black | ||
name: Python${{ matrix.python-version }} (Anaconda, upstream=${{ matrix.upstream }}) | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: "3.9" | ||
upstream: true | ||
upstream: false | ||
- python-version: "3.10" | ||
upstream: false | ||
- python-version: "3.11" | ||
upstream: false | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Test Upstream Dependencies | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- HISTORY.rst | ||
- README.rst | ||
- pyproject.toml | ||
- setup.cfg | ||
- clisops/__init__.py | ||
schedule: | ||
- cron: "0 0 * * *" # Daily “At 00:00” UTC | ||
workflow_dispatch: # allows you to trigger the workflow run manually | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
upstream-dev: | ||
name: test-upstream-dev (Python${{ matrix.python-version }}) | ||
runs-on: ubuntu-latest | ||
if: | | ||
(github.event_name == 'schedule') || | ||
(github.event_name == 'workflow_dispatch') || | ||
(github.event_name == 'push') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.10" | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
cache-downloads: true | ||
cache-environment: true | ||
environment-file: environment.yml | ||
create-args: >- | ||
conda | ||
python=${{ matrix.python-version }} | ||
pytest-reportlog | ||
- name: Conda and Mamba versions | ||
run: | | ||
conda --version | ||
echo "micromamba: $(micromamba --version)" | ||
- name: Install upstream versions | ||
run: | | ||
python -m pip install -r requirements_upstream.txt | ||
- name: Install CLISOPS | ||
run: | | ||
python -m pip install --no-user --editable ".[dev]" | ||
- name: Install upstream versions | ||
run: | | ||
python -m pip install -r requirements_upstream.txt | ||
- name: Check versions | ||
run: | | ||
conda list | ||
python -m pip check || true | ||
- name: Run Tests | ||
if: success() | ||
id: status | ||
run: | | ||
python -m pytest --durations=10 --cov=clisops --cov-report=term-missing --report-log output-${{ matrix.python-version }}-log.jsonl | ||
- name: Generate and publish the report | ||
if: | | ||
failure() | ||
&& steps.status.outcome == 'failure' | ||
&& github.event_name == 'schedule' | ||
&& github.repository_owner == 'roocs' | ||
uses: xarray-contrib/issue-from-pytest-log@v1 | ||
with: | ||
log-path: output-${{ matrix.python-version }}-log.jsonl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: clisops | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python >=3.8,<3.12 | ||
- flit | ||
- bottleneck >=1.3.1 | ||
- cf_xarray >=0.8.5 | ||
- cftime >=1.4.1 | ||
- dask >=2.6.0 | ||
- gdal >=3.0 | ||
- geopandas >=0.11 | ||
- loguru >=0.5.3 | ||
- netCDF4 >=1.4 | ||
- numpy >=1.16 | ||
- packaging | ||
- pandas >=1.0.3 | ||
- pooch | ||
- poppler >=0.67 | ||
- pyproj >=3.3.0 | ||
- requests >=2.0 | ||
- roocs-grids>=0.1.2 | ||
- roocs-utils >=0.6.4,<0.7 | ||
- shapely >=1.9 | ||
- xarray >=0.21,<2023.3.0 # https://github.com/pydata/xarray/issues/7794 | ||
- xesmf >=0.8.2 | ||
- cartopy>=0.20.2 | ||
- jupyterlab | ||
- GitPython | ||
- matplotlib>=3.5.2 | ||
# Upstream | ||
- pip | ||
- pip: | ||
- psy-maps | ||
- clisops | ||
# - cf-xarray @ git+https://github.com/xarray-contrib/cf-xarray/@main#egg=cf-xarray | ||
# - roocs-utils @ git+https://github.com/roocs/roocs-utils.git@master#egg=roocs-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pip install matplotlib | ||
pip install . | ||
set -e | ||
|
||
git clone https://github.com/roocs/mini-esgf-data ~/.mini-esgf-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.