Skip to content

Commit

Permalink
ci: use mamba for builds
Browse files Browse the repository at this point in the history
ci: update import versions for deprecation errors
docs: update maps to use "region" instead of "granule"
  • Loading branch information
tsutterley committed Sep 5, 2023
1 parent dd950b3 commit 9407e91
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-update-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up conda ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/aws-container.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/python-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- name: Set up conda ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v3
- name: Set up mamba ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: icesat2_toolkit
micromamba-version: '1.3.1-0'
environment-file: environment.yml
- name: Create conda Test Environment
run: |
conda install flake8 pytest pytest-cov cython
init-shell: bash
environment-name: icesat2_toolkit
cache-environment: true
post-cleanup: 'all'
create-args: >-
python=${{ matrix.python-version }}
flake8
pytest
pytest-cov
cython
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
Binary file modified doc/source/_assets/ICESat-2_granules_global.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/_assets/ICESat-2_granules_polar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icesat2_toolkit/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# attempt imports
try:
import sklearn.neighbors
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("scikit-learn not available", ImportWarning)
# ignore warnings
Expand Down
6 changes: 3 additions & 3 deletions icesat2_toolkit/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
# attempt imports
try:
import osgeo.gdal, osgeo.osr, osgeo.gdalconst
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("GDAL not available", ImportWarning)
try:
import h5py
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("h5py not available", ImportWarning)
try:
import netCDF4
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("netCDF4 not available", ImportWarning)
# ignore warnings
Expand Down
2 changes: 1 addition & 1 deletion icesat2_toolkit/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
try:
import matplotlib.cm as cm
import matplotlib.colors as colors
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("matplotlib not available", ImportWarning)
# ignore warnings
Expand Down
4 changes: 2 additions & 2 deletions icesat2_toolkit/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
# attempt imports
try:
import boto3
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("boto3 not available", ImportWarning)
try:
import s3fs
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("s3fs not available", ImportWarning)
# ignore warnings
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2

# Configuration for the documentation build process
build:
os: ubuntu-20.04
os: "ubuntu-22.04"
tools:
python: "miniconda3-4.7"

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pyproj
python-dateutil
scipy
scp
timescale
2 changes: 1 addition & 1 deletion scripts/MPI_ICESat2_ATL03.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
try:
import sklearn.neighbors
import sklearn.cluster
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("scikit-learn not available", ImportWarning)
try:
Expand Down
2 changes: 1 addition & 1 deletion scripts/MPI_ICESat2_ATL03_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
try:
import sklearn.neighbors
import sklearn.cluster
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("scikit-learn not available", ImportWarning)
try:
Expand Down
2 changes: 1 addition & 1 deletion scripts/nsidc_icesat2_sync_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
# attempt imports
try:
import boto3
except (ImportError, ModuleNotFoundError) as exc:
except (AttributeError, ImportError, ModuleNotFoundError) as exc:
warnings.filterwarnings("module")
warnings.warn("boto3 not available", ImportWarning)
# ignore warnings
Expand Down

0 comments on commit 9407e91

Please sign in to comment.