Skip to content

Commit

Permalink
chore: updated conda env
Browse files Browse the repository at this point in the history
  • Loading branch information
jlerat committed May 1, 2024
1 parent bf28d4a commit ae7ef02
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .azure_devops/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ strategy:
python.version: '3.8'

variables:
CONDA_ENV: env_mini
CONDA_ENV: env_mini_v2
CONDA_HOME: /usr/share/miniconda/envs/$(CONDA_ENV)/
BUILD_DIR: $(System.DefaultWorkingDirectory)

Expand All @@ -27,11 +27,11 @@ steps:
- task: Cache@2
displayName: Use cached Anaconda environment
inputs:
key: conda | env_mini.yml
key: conda | env_mini_v2.yml
path: $(CONDA_HOME)
cacheHitVar: CONDA_CACHE_RESTORED

- bash: conda env create --file env_mini.yml
- bash: conda env create --file env_mini_v2.yml
displayName: Create Anaconda environment (if not restored from cache)
condition: eq(variables.CONDA_CACHE_RESTORED, 'false')

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:
- name: Create conda environment if needed
run: |
source $CONDA/etc/profile.d/conda.sh
conda env create -f env_mini.yml
conda env create -f env_mini_v2.yml
- name : Install hydrodiy package in conda env
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate env_mini
conda activate env_mini_v2
pip install -e .
- name: Run tests
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate env_mini
conda activate env_mini_v2
pytest --cov=hydrodiy --cov-config=.coveragerc --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html hydrodiy
- name: Upload pytest test results
Expand All @@ -57,6 +57,6 @@ jobs:
- name: Run examples
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate env_mini
conda activate env_mini_v2
python examples/run_all_examples.py
20 changes: 20 additions & 0 deletions env_mini_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: env_mini_v2
channels:
- conda-forge
- defaults
dependencies:
- cython=3.0.10
- matplotlib=3.8.4
- numpy=1.26.4
- pandas=2.2.1
- pip
- pyproj=3.5.0
- pyshp=2.3.1
- pytest=7.2.0
- pytest-cov
- python=3.10.6
- requests=2.28.1
- scipy=1.13.0
- pip:
- versioneer
- pytest-allclose

0 comments on commit ae7ef02

Please sign in to comment.