Skip to content

Commit

Permalink
try tests on windows again
Browse files Browse the repository at this point in the history
  • Loading branch information
blaylockbk committed Jan 29, 2025
1 parent e146a48 commit bc676f4
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 39 deletions.
65 changes: 34 additions & 31 deletions .github/workflows/tests-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,58 +38,61 @@ jobs:
with:
fetch-depth: 2

- name: CACHING - Anaconda packages
uses: actions/cache@v3
id: cache-pkg
with:
path: ~/conda_pkgs_dir
key:
conda-pkg-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{
env.CACHE_NUMBER }}-${{ hashFiles('environment-test.yml') }}
env:
# Increase this value if `environment-test.yml` has not changed,
# but you still want to reset the cache.
CACHE_NUMBER: 0
#- name: CACHING - Anaconda packages
# uses: actions/cache@v3
# id: cache-pkg
# with:
# path: ~/conda_pkgs_dir
# key:
# conda-pkg-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{
# env.CACHE_NUMBER }}-${{ hashFiles('environment-test.yml') }}
# env:
# # Increase this value if `environment-test.yml` has not changed,
# # but you still want to reset the cache.
# CACHE_NUMBER: 0

- name: INSTALL - Anaconda setup (Mambaforge)
- name: INSTALL - Conda/Mamba setup (Miniforge)
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-version: latest
mamba-version: "*"
use-mamba: true
channels: conda-forge
channel-priority: true
activate-environment: herbie-test
environment-file: environment-test.yml
environment-file: ci/environment-test.yml
auto-activate-base: false
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

- name: CACHING - Anaconda environment
uses: actions/cache@v3
id: cache-env
with:
path: ${{ env.CONDA }}/envs
key:
conda-env-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{
env.CACHE_NUMBER }}-${{ hashFiles('environment-test.yml') }}
env:
# Increase this value if `environment-test.yml` has not changed,
# but you still want to reset the cache.
CACHE_NUMBER: 0
#- name: CACHING - Anaconda environment
# uses: actions/cache@v3
# id: cache-env
# with:
# path: ${{ env.CONDA }}/envs
# key:
# conda-env-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{
# env.CACHE_NUMBER }}-${{ hashFiles('environment-test.yml') }}
# env:
# # Increase this value if `environment-test.yml` has not changed,
# # but you still want to reset the cache.
# CACHE_NUMBER: 0

- name: DEBUG - Anaconda info
run: conda info
- name: DEBUG - Anaconda configuration
run: conda config --show
- name: DEBUG - mamba info
run: mamba info
- name: DEBUG - mamba list
run: mamba list
- name: DEBUG - mamba configuration
run: mamba config --show
- name: DEBUG - Environment variables
run: printenv | sort
- name: DEBUG - Program paths
run: |
command -v conda
command -v mamba
- name: INSTALL - Update Anaconda environment
- name: INSTALL - Update Mamba environment
run: mamba env update --name herbie-test --file environment-test.yml
if: steps.cache-env.outputs.cache-hit != 'true'

Expand Down
18 changes: 13 additions & 5 deletions ci/environment.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
name: herbie
# Used to for Herbie tests on Windows
# .github/workflows/tests-conda.yml

name: herbie-test
channels:
- conda-forge
dependencies:
- curl
- cfgrib>=0.9.10.4
- eccodes
- geos
- proj

- cartopy
- cfgrib>=0.9.10.4
- matplotlib>=3.8.2
- metpy
- numpy>=1.26.2
- pandas>=2.1.4
- pygrib>=2.1.6
- pytest
- pyproj
- requests>=2.31.0
- scikit-learn
- toml
- xarray>=2023.12.0
- flake8

- pytest
- pytest-conv
2 changes: 1 addition & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cfgrib>=0.9.15
metpy>=1.3.0
numpy>=1.22.3
pandas>=2.2.3
pygrib>=2.1.6
pyproj>=3.7.0
requests>=2.32.3
toml>=0.10.2
xarray>=2025.1.1
1 change: 0 additions & 1 deletion herbie/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
# NOTE: The config dict values are retrieved from __init__ and read
# from the file ${HOME}/.config/herbie/config.toml
# Path is imported from __init__ because it has my custom methods.
# Load custom xarray accessors

log = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metpy
numpy
pandas
pyproj
pygrib
scikit-learn
toml
xarray
Expand Down

0 comments on commit bc676f4

Please sign in to comment.