Skip to content

Commit

Permalink
CI buils with minimal and latest requirements (#500)
Browse files Browse the repository at this point in the history
* install nim req.

* update requirements

* drop Cython
  • Loading branch information
Borda authored and williamFalcon committed Nov 25, 2019
1 parent bdebe18 commit 4627887
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
22 changes: 19 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ language: python

matrix:
include:
# - dist: xenial # Ubuntu 16.04
# python: 3.5
# env: TOXENV=py35
- dist: xenial # Ubuntu 16.04
python: 3.6
env:
- TOXENV=py36
- MIN_REQUIREMENTS=1
- dist: xenial # Ubuntu 16.04
python: 3.7
env:
- TOXENV=py37
- MIN_REQUIREMENTS=1
- dist: bionic # Ubuntu 18.04
python: 3.6
env: TOXENV=py36
Expand Down Expand Up @@ -51,6 +58,15 @@ install:
- pip install future # needed for `builtins`
- sudo pip install tox

before_script:
# rewrite all minimal requirements as strict
- if [[ "${MIN_REQUIREMENTS}" == "1" ]]; then
python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements-ci.txt', 'w').write(req)" ;
else
cp requirements.txt requirements-ci.txt ;
fi
- pip install -r requirements-ci.txt -U

script:
# integration
- tox --sitepackages
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
scikit-learn==0.20.2
tqdm==4.35.0
numpy==1.16.4
scikit-learn>=0.20.2
tqdm>=4.35.0
numpy>=1.16.4
torch>=1.1
torchvision>=0.3.0
pandas>=0.20.3
pandas>=0.24 # lower version do not support py3.7
test-tube>=0.6.9
# future>=0.17.1 # required for buildins in setup.py
# future>=0.17.1 # required for buildins in setup.py
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ omit =
[flake8]
# TODO: this should be 88 or 100 according PEP8
max-line-length = 120
exclude = .tox,*.egg,build,temp,examples/*
exclude = .tox,*.egg,build,temp
select = E,W,F
doctests = True
verbose = 2
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
format = pylint
ignore = E731,W504,F401,F841

# setup.cfg or tox.ini
[check-manifest]
ignore =
.travis.yml
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ basepython =
py37: python3.7
py38: python3.8
deps =
-r requirements.txt
-r requirements-ci.txt
-r ./tests/requirements.txt
commands =
pip list
check-manifest
check-manifest --ignore requirements-ci.txt
python setup.py check --metadata --strict
coverage run --source pytorch_lightning -m py.test pytorch_lightning tests pl_examples -v --doctest-modules
flake8 .
Expand Down

0 comments on commit 4627887

Please sign in to comment.