Skip to content

Commit 4627887

Browse files
BordawilliamFalcon
authored andcommitted
CI buils with minimal and latest requirements (#500)
* install nim req. * update requirements * drop Cython
1 parent bdebe18 commit 4627887

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

.travis.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,16 @@ language: python
1616

1717
matrix:
1818
include:
19-
# - dist: xenial # Ubuntu 16.04
20-
# python: 3.5
21-
# env: TOXENV=py35
19+
- dist: xenial # Ubuntu 16.04
20+
python: 3.6
21+
env:
22+
- TOXENV=py36
23+
- MIN_REQUIREMENTS=1
24+
- dist: xenial # Ubuntu 16.04
25+
python: 3.7
26+
env:
27+
- TOXENV=py37
28+
- MIN_REQUIREMENTS=1
2229
- dist: bionic # Ubuntu 18.04
2330
python: 3.6
2431
env: TOXENV=py36
@@ -51,6 +58,15 @@ install:
5158
- pip install future # needed for `builtins`
5259
- sudo pip install tox
5360

61+
before_script:
62+
# rewrite all minimal requirements as strict
63+
- if [[ "${MIN_REQUIREMENTS}" == "1" ]]; then
64+
python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements-ci.txt', 'w').write(req)" ;
65+
else
66+
cp requirements.txt requirements-ci.txt ;
67+
fi
68+
- pip install -r requirements-ci.txt -U
69+
5470
script:
5571
# integration
5672
- tox --sitepackages

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
scikit-learn==0.20.2
2-
tqdm==4.35.0
3-
numpy==1.16.4
1+
scikit-learn>=0.20.2
2+
tqdm>=4.35.0
3+
numpy>=1.16.4
44
torch>=1.1
55
torchvision>=0.3.0
6-
pandas>=0.20.3
6+
pandas>=0.24 # lower version do not support py3.7
77
test-tube>=0.6.9
8-
# future>=0.17.1 # required for buildins in setup.py
8+
# future>=0.17.1 # required for buildins in setup.py

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,15 @@ omit =
5252
[flake8]
5353
# TODO: this should be 88 or 100 according PEP8
5454
max-line-length = 120
55-
exclude = .tox,*.egg,build,temp,examples/*
55+
exclude = .tox,*.egg,build,temp
5656
select = E,W,F
5757
doctests = True
5858
verbose = 2
5959
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
6060
format = pylint
6161
ignore = E731,W504,F401,F841
6262

63+
# setup.cfg or tox.ini
6364
[check-manifest]
6465
ignore =
6566
.travis.yml

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ basepython =
3131
py37: python3.7
3232
py38: python3.8
3333
deps =
34-
-r requirements.txt
34+
-r requirements-ci.txt
3535
-r ./tests/requirements.txt
3636
commands =
3737
pip list
38-
check-manifest
38+
check-manifest --ignore requirements-ci.txt
3939
python setup.py check --metadata --strict
4040
coverage run --source pytorch_lightning -m py.test pytorch_lightning tests pl_examples -v --doctest-modules
4141
flake8 .

0 commit comments

Comments
 (0)