Skip to content

Commit

Permalink
Use a conda environment to ensure package versions for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Jan 11, 2021
1 parent 2d3bbb5 commit 6505b77
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,8 @@ install:
# Useful for debugging any issues with conda

# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION stoner pandas image-registration python-dateutil
- conda env create -f tests/test-env.yml
- conda activate test-environment
# This will ensure we collect all the necessary dependencies so long as master doesn't change them!
# Hyperspy is now an optional dependency for 3.6 onwards
- conda install hyperspy
- conda install pytest pytest-runner pytest-cov pytest-forked pytest-xdist
# Now we unistall the stable stoner - use force to stop downgrading packages!
- conda remove --yes --force stoner
- pip install coveralls
- pip install --no-deps .

Expand Down
29 changes: 29 additions & 0 deletions tests/test-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: test-environment
channels:
- defaults
- phygbu
- conda-forge
dependencies:
- anaconda
- python=3.7
- hyperspy
- pytest-xdist
- pytest-cov
- pytest-runner
- pytest
- pytest-forked
- scikit-image=0.17
- h5py<3.0
- cycler>=0.10.0
- filemagic>=1.6
- image-registration>=0.2.1
- lmfit>=0.9.7
- memoization>=0.1.4
- npTDMS>=0.11
- python-dateutil>=2.7.0
- statsmodels
- tabulate>=0.8
- imreg_dft>=2.0
- multiprocess>=0.70
- dill>=0.2.8

0 comments on commit 6505b77

Please sign in to comment.