Skip to content

Commit 8004370

Browse files
authored
Merge branch 'master' into fix-823
2 parents 39fb1b3 + 1ed01a1 commit 8004370

25 files changed

+386
-175
lines changed

.travis.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dist: trusty
2-
sudo: true
2+
sudo: required
33
services:
44
- docker
55

@@ -17,18 +17,26 @@ cache:
1717
pip: true
1818
directories:
1919
- .mypy_cache
20-
python:
21-
- 2.7
22-
- 3.4
23-
- 3.5
24-
- 3.6
20+
2521
os:
2622
- linux
2723
install:
2824
- pip install tox-travis
2925
jobs:
3026
include:
27+
- stage: test
28+
python: "2.7"
29+
- stage: test
30+
python: "3.4"
31+
- stage: test
32+
python: "3.5"
33+
- stage: test
34+
python: "3.6"
35+
- stage: test
36+
python: "3.7"
37+
dist: xenial
3138
- stage: release-test
39+
python: "2.7"
3240
script: RELEASE_SKIP=head ${TRAVIS_BUILD_DIR}/release-test.sh
3341
script: tox
3442
branches:

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ MODULE=cwltool
2626
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2727
# `[[` conditional expressions.
2828
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
29-
DEVPKGS=pycodestyle diff_cover autopep8 pylint coverage pydocstyle flake8 pytest isort mock
29+
DEVPKGS=pycodestyle diff_cover autopep8 pylint coverage pydocstyle flake8 pytest isort
3030
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3131
python-flake8 python-mock shellcheck
3232
VERSION=1.0.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
@@ -50,7 +50,7 @@ help: Makefile
5050

5151
## install-dep : install most of the development dependencies via pip
5252
install-dep:
53-
pip install --upgrade $(DEVPKGS)
53+
pip install --upgrade $(DEVPKGS) -rtest-requirements.txt
5454

5555
## install-deb-dep: install most of the dev dependencies via apt-get
5656
install-deb-dep:
@@ -134,12 +134,11 @@ coverage.html: htmlcov/index.html
134134
htmlcov/index.html: .coverage
135135
coverage html
136136

137-
diff-cover: coverage-gcovr.xml coverage.xml
138-
diff-cover coverage-gcovr.xml coverage.xml
137+
diff-cover: coverage.xml
138+
diff-cover $^
139139

140-
diff-cover.html: coverage-gcovr.xml coverage.xml
141-
diff-cover coverage-gcovr.xml coverage.xml \
142-
--html-report diff-cover.html
140+
diff-cover.html: coverage.xml
141+
diff-cover $^ --html-report diff-cover.html
143142

144143
## test : run the ${MODULE} test suite
145144
test: $(pysources)

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ To run the basis tests after installing `cwltool` execute the following:
7676

7777
.. code:: bash
7878
79-
pip install pytest mock
79+
pip install -rtest-requirements.txt
8080
py.test --ignore cwltool/schemas/ --pyarg cwltool
8181
8282
To run various tests in all supported Python environments we use `tox <https://github.com/common-workflow-language/cwltool/tree/master/tox.ini>`_. To run the test suite in all supported Python environments

appveyor.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,30 @@ environment:
2424
PYTHON_VERSION: "3.6.x"
2525
PYTHON_ARCH: "64"
2626

27+
- PYTHON: "C:\\Python37-x64"
28+
PYTHON_VERSION: "3.7.x"
29+
PYTHON_ARCH: "64"
30+
2731
install:
2832
- ps: 'Install-Product node 0.12 x64'
29-
- "%PYTHON%\\python.exe -m pip install -U wheel pytest mock"
30-
- "%PYTHON%\\python.exe -m pip show setuptools"
31-
- "%PYTHON%\\python.exe -m pip install -U setuptools^>=20.3"
33+
- "set PATH=%PYTHON%\\Scripts;%PATH%"
34+
- "%PYTHON%\\python.exe -m pip install -U pip setuptools^>=20.3 wheel"
35+
- "%PYTHON%\\python.exe -m pip install -U codecov pytest-xdist pytest-cov galaxy-lib -rtest-requirements.txt"
3236
# Note the use of a `^` to escape the `>`
33-
#- "%PYTHON%\\python.exe -m pip install -U wheel pytest pytest-xdist mock"
37+
38+
for:
39+
- matrix:
40+
only: [ { PYTHON_VERSION: "3.7.x" } ]
41+
before_build:
42+
- "%PYTHON%\\python.exe -m pip install https://download.lfd.uci.edu/pythonlibs/l8ulg3xw/lxml-4.2.3-cp37-cp37m-win_amd64.whl"
3443

3544
build_script:
36-
- "%PYTHON%\\python.exe -m pip install ."
45+
- "%PYTHON%\\python.exe -m pip install -rrequirements.txt"
3746

3847
test_script:
39-
- "%PYTHON%\\python.exe -m pytest --verbose -p no:cacheprovider --junit-xml=tests.xml"
40-
#- "%PYTHON%\\python.exe -m pytest --verbose -p no:cacheprovider --junit-xml=tests.xml -n2"
48+
- |
49+
%PYTHON%\\python.exe setup.py test --addopts "--cov-report xml --cov cwltool -p no:cacheprovider --junit-xml=tests.xml"
50+
- "%PYTHON%\\python.exe -m codecov"
4151

4252
on_finish:
4353
- ps: |

cwltool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
from cwltool import main
1212

1313
if __name__ == "__main__":
14-
sys.exit(main.main(sys.argv[1:]))
14+
main.run(sys.argv[1:])

cwltool/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
from . import main
66

7-
sys.exit(main.main())
7+
main.run()

cwltool/argparser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
179179
exgroup.add_argument("--quiet", action="store_true", help="Only print warnings and errors.")
180180
exgroup.add_argument("--debug", action="store_true", help="Print even more logging")
181181

182+
parser.add_argument(
183+
"--strict-memory-limit", action="store_true", help="When running with "
184+
"software containers and the Docker engine, pass either the "
185+
"calculated memory allocation from ResourceRequirements or the "
186+
"default of 1 gigabyte to Docker's --memory option.")
187+
182188
parser.add_argument("--timestamps", action="store_true", help="Add "
183189
"timestamps to the errors, warnings, and "
184190
"notifications.")

cwltool/context.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def make_tool_notimpl(toolpath_object, # type: Dict[Text, Any]
3333
): # type: (...) -> Process
3434
raise NotImplementedError()
3535

36+
3637
default_make_tool = make_tool_notimpl # type: Callable[[Dict[Text, Any], LoadingContext], Process]
3738

3839
class LoadingContext(ContextBase):
@@ -46,7 +47,7 @@ def __init__(self, kwargs=None):
4647
self.overrides_list = [] # type: List[Dict[Text, Any]]
4748
self.loader = None # type: Optional[Loader]
4849
self.avsc_names = None # type: Optional[schema.Names]
49-
self.disable_js_validation = False # type: bool
50+
self.disable_js_validation = False # type: bool
5051
self.js_hint_options_file = None
5152
self.do_validate = True # type: bool
5253
self.enable_dev = False # type: bool
@@ -72,7 +73,7 @@ def __init__(self, kwargs=None):
7273
# type: (Optional[Dict[str, Any]]) -> None
7374
select_resources_callable = Callable[ # pylint: disable=unused-variable
7475
[Dict[str, int], RuntimeContext], Dict[str, int]]
75-
self.user_space_docker_cmd = "" # type: Text
76+
self.user_space_docker_cmd = "" # type: Text
7677
self.secret_store = None # type: Optional[SecretStore]
7778
self.no_read_only = False # type: bool
7879
self.custom_net = "" # type: Text
@@ -115,6 +116,7 @@ def __init__(self, kwargs=None):
115116
self.eval_timeout = 20 # type: float
116117
self.postScatterEval = None # type: Optional[Callable[[Dict[Text, Any]], Dict[Text, Any]]]
117118
self.on_error = "stop" # type: Text
119+
self.strict_memory_limit = False # type: bool
118120

119121
self.record_container_id = None
120122
self.cidfile_dir = None

0 commit comments

Comments
 (0)