Skip to content

Commit

Permalink
Test setup - Centralize list of dependencies.
Browse files Browse the repository at this point in the history
Creating central place for list of required test libs by listing them in
a dedicated 'extra_requires' section in the setup.py.
Now adding test libs can be done by using:
`pip install smrf[tests]`
and utilized by tox and the build scripts that way too.
  • Loading branch information
jomey committed Oct 15, 2020
1 parent 87b7913 commit 37cfb00
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
- CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014
- CIBW_TEST_REQUIRES=nose
- CIBW_TEST_COMMAND="NOT_ON_GOLD_HOST=yup nosetests -vv --exe smrf"
- CIBW_TEST_EXTRAS=tests
- CIBW_BUILD="cp3*-manylinux_x86_64 cp3*-macosx_x86_64"
- CIBW_SKIP="?p27* pp* cp35*"
- CIBW_BUILD_VERBOSITY=1
Expand All @@ -45,7 +46,7 @@ unittest: &unittest
packages:
- eccodes
- gcc@7
install:
install:
- python3 --version
- python3 -m pip install tox-travis cython
script: tox
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:
python: 3.6
install: skip
script: travis/build-sdist.sh

# Deploy on linux
- <<: *ci-build-wheels
name: Build and deploy Linux wheels
Expand Down
1 change: 0 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ pydata-sphinx-theme
sphinxcontrib-bibtex>=1.0
sphinxcontrib-websupport>=1.0.1
pygit2
mock
git+https://github.com/USDA-ARS-NWRC/goldmeister.git@main
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def finalize_options(self):
'sphinxcontrib-bibtex',
'sphinxcontrib-websupport',
'pydata-sphinx-theme'
],
'tests': [
'mock',
]
},
use_scm_version={
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ commands =
make clean-build clean-pyc
python3 setup.py test

extras =
tests

deps =
-rrequirements.txt
mock

whitelist_externals =
make
2 changes: 1 addition & 1 deletion travis/build-sdist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ if [ ! -z "$TRAVIS_TAG" ]
then
python3 -m pip install twine
python3 -m twine upload --skip-existing dist/*.tar.gz
fi
fi

0 comments on commit 37cfb00

Please sign in to comment.