Skip to content

Commit

Permalink
Relax ruamel.yaml dependancy cap and support python 3.7 (#831)
Browse files Browse the repository at this point in the history
* migrate off of deprecated [tox:travis]
* Only require typing for python < 3.7
* add workaround for lxml on py37-windows
  • Loading branch information
ThomasHickman authored and mr-c committed Jul 19, 2018
1 parent 8d72da0 commit 7f8a62c
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 26 deletions.
20 changes: 14 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dist: trusty
sudo: true
sudo: required
services:
- docker

Expand All @@ -17,18 +17,26 @@ cache:
pip: true
directories:
- .mypy_cache
python:
- 2.7
- 3.4
- 3.5
- 3.6

os:
- linux
install:
- pip install tox-travis
jobs:
include:
- stage: test
python: "2.7"
- stage: test
python: "3.4"
- stage: test
python: "3.5"
- stage: test
python: "3.6"
- stage: test
python: "3.7"
dist: xenial
- stage: release-test
python: "2.7"
script: RELEASE_SKIP=head ${TRAVIS_BUILD_DIR}/release-test.sh
script: tox
branches:
Expand Down
12 changes: 10 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,28 @@ environment:
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"

install:
- ps: 'Install-Product node 0.12 x64'
- "%PYTHON%\\python.exe -m pip install -U wheel pytest mock"
- "%PYTHON%\\python.exe -m pip show setuptools"
- "%PYTHON%\\python.exe -m pip install -U setuptools^>=20.3"
# Note the use of a `^` to escape the `>`
#- "%PYTHON%\\python.exe -m pip install -U wheel pytest pytest-xdist mock"

for:
- matrix:
only: [ { PYTHON_VERSION: "3.7.x" } ]
before_build:
- "%PYTHON%\\python.exe -m pip install https://download.lfd.uci.edu/pythonlibs/l8ulg3xw/lxml-4.2.3-cp37-cp37m-win_amd64.whl"

build_script:
- "%PYTHON%\\python.exe -m pip install ."

test_script:
- "%PYTHON%\\python.exe -m pytest --verbose -p no:cacheprovider --junit-xml=tests.xml"
#- "%PYTHON%\\python.exe -m pytest --verbose -p no:cacheprovider --junit-xml=tests.xml -n2"

on_finish:
- ps: |
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
requests>=2.4.3
ruamel.yaml>=0.12.4,<0.15
ruamel.yaml>=0.12.4,<0.16
rdflib>=4.2.2,<4.3
shellescape>=3.4.1,<3.5
schema-salad>=2.6.20170927145003,<3
typing>=3.5.3
typing>=3.5.3; python_version < "3.7"
pathlib2==2.3.2; python_version<"3"
prov==1.5.1
bagit==1.6.4
mypy-extensions
psutil
subprocess32 >= 3.5.0; os.name=="posix"
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@
install_requires=[
'setuptools',
'requests >= 2.4.3',
'ruamel.yaml >= 0.12.4, < 0.15',
'ruamel.yaml >= 0.12.4, < 0.16',
'rdflib >= 4.2.2, < 4.3.0',
'shellescape >= 3.4.1, < 3.5',
'schema-salad >= 2.6.20170927145003, < 3',
'typing >= 3.5.3',
'mypy-extensions',
'six >= 1.8.0',
'psutil',
Expand All @@ -65,6 +64,7 @@
extras_require={
':os.name=="posix"': ['subprocess32 >= 3.5.0'],
':python_version<"3"': ['pathlib2 == 2.3.2'],
':python_version<"3.7"': ['typing >= 3.5.3'],
'deps': ["galaxy-lib >= 17.09.3"]
},
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4',
Expand Down Expand Up @@ -99,6 +99,7 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
"Programming Language :: Python :: 3.7"
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Astronomy',
Expand Down
36 changes: 22 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py{27,34,35,36}-lint,
py{27,34,35,36}-unit,
py{27,34,35,36,37}-lint,
py{27,34,35,36,37}-unit,
py35-mypy{2,3},
py27-pipconflictchecker,
py27-lint-readme,
Expand All @@ -10,27 +10,35 @@ envlist =
skipsdist = True
skip_missing_interpreters = True

[tox:travis]
2.7 = py27
3.4 = py34
3.5 = py35
3.6 = py36
[travis]
python =
2.7: py27
3.4: py34
3.5: py35
3.6: py36
3.7: py37

[testenv]
passenv = CI TRAVIS TRAVIS_*
deps =
-rrequirements.txt
py{27,34,35,36}-unit: codecov
py{27,34,35,36}-unit: pytest-xdist
py{27,34,35,36}-lint: flake8
py{27,34,35,36,37}-unit: codecov
py{27,34,35,36,37}-unit: pytest-xdist
py{27,34,35,36,37}-unit: pytest-cov
py{27,34,35,36,37}-unit: mock
py{27,34,35,36,37}-lint: flake8

setenv =
py{27,34,35,36,37}-unit: LC_ALL = C

commands =
py{27,34,35,36}-unit: python setup.py test --addopts "--cov-report xml --cov cwltool {posargs}"
py{27,34,35,36}-unit: codecov
py{27,34,35,36}-lint: flake8 schema_salad setup.py
py{27,34,35,36,37}-unit: pip install .[deps]
py{27,34,35,36,37}-unit: py.test --cov-report xml --cov cwltool {posargs}
py{27,34,35,36,37}-unit: codecov
py{27,34,35,36,37}-lint: flake8 schema_salad setup.py

whitelist_externals =
py{27,34,35,36}-lint: flake8
py{27,34,35,36,37}-lint: flake8

[testenv:py35-mypy2]
commands = make mypy2
Expand Down

0 comments on commit 7f8a62c

Please sign in to comment.