diff --git a/.travis.yml b/.travis.yml index 30e9cccc30..70ebfbb908 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/requirements.txt b/requirements.txt index 48475c67ca..53f623e764 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 40283b196d..366b2355e7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,7 +52,7 @@ 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 @@ -60,6 +60,7 @@ verbose = 2 format = pylint ignore = E731,W504,F401,F841 +# setup.cfg or tox.ini [check-manifest] ignore = .travis.yml diff --git a/tox.ini b/tox.ini index 1db46c9b03..6f4550f532 100644 --- a/tox.ini +++ b/tox.ini @@ -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 .