From 67dd2921ebf71cebe4a32552fdba819199926abe Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 13 Jul 2021 12:30:00 +0200 Subject: [PATCH 1/6] fix error from previous PR --- setup.py | 5 +++-- wes_service/toil_wes.py | 4 +++- wes_service/wes_service_main.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 4e9e616..fa5c978 100644 --- a/setup.py +++ b/setup.py @@ -21,14 +21,15 @@ download_url="https://github.com/common-workflow-language/cwltool-service", license="Apache 2.0", python_requires="~=3.5", - setup_requires=['pytest-runner'], - tests_require=['pytest'], + setup_requires=["pytest-runner"], + tests_require=["pytest"], packages=["wes_service", "wes_client"], package_data={"wes_service": ["openapi/workflow_execution_service.swagger.yaml"]}, include_package_data=True, install_requires=[ "connexion >= 2.0.2, < 3", "ruamel.yaml >= 0.15.78, <= 0.16.5", + "schema-salad", ], entry_points={ "console_scripts": [ diff --git a/wes_service/toil_wes.py b/wes_service/toil_wes.py index 9f9aa30..9333265 100644 --- a/wes_service/toil_wes.py +++ b/wes_service/toil_wes.py @@ -74,7 +74,9 @@ def write_workflow(self, request, opts, cwd, wftype="cwl"): try: os.link(workflow_url[7:], os.path.join(cwd, "wes_workflow." + wftype)) except OSError: - os.symlink(workflow_url[7:], os.path.join(cwd, "wes_workflow." + wftype)) + os.symlink( + workflow_url[7:], os.path.join(cwd, "wes_workflow." + wftype) + ) workflow_url = os.path.join(cwd, "wes_workflow." + wftype) try: os.link(self.input_json, os.path.join(cwd, "wes_input.json")) diff --git a/wes_service/wes_service_main.py b/wes_service/wes_service_main.py index fcf3827..1d2fc60 100644 --- a/wes_service/wes_service_main.py +++ b/wes_service/wes_service_main.py @@ -65,7 +65,7 @@ def get_parser() -> argparse.Namespace: def main(argv=sys.argv[1:]): - args = get_parser.parse_args(argv) + args = get_parser().parse_args(argv) if args.version: pkg = pkg_resources.require("wes_service") From 2274e97a192ee02f8c40fd3f0c6d825d3e4703c6 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 13 Jul 2021 12:36:41 +0200 Subject: [PATCH 2/6] update testing URL for md5sum on dockstore --- test/test_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_integration.py b/test/test_integration.py index d9646de..f20eec0 100644 --- a/test/test_integration.py +++ b/test/test_integration.py @@ -22,7 +22,7 @@ class IntegrationTest(unittest.TestCase): @classmethod def setUpClass(cls): # cwl - cls.cwl_dockstore_url = 'https://dockstore.org:8443/api/ga4gh/v2/tools/quay.io%2Fbriandoconnor%2Fdockstore-tool-md5sum/versions/master/plain-CWL/descriptor/%2FDockstore.cwl' + cls.cwl_dockstore_url = 'https://dockstore.org/api/ga4gh/trs/v2/tools/quay.io%2Fbriandoconnor%2Fdockstore-tool-md5sum/versions/1.0.4/plain-CWL/descriptor//Dockstore.cwl' cls.cwl_local_path = "file://" + os.path.abspath('testdata/md5sum.cwl') cls.cwl_json_input = "file://" + os.path.abspath('testdata/md5sum.json') cls.cwl_attachments = ['file://' + os.path.abspath('testdata/md5sum.input'), From 0328f130a12e46c9b3cd234571df348fcee4ccd7 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 13 Jul 2021 12:47:54 +0200 Subject: [PATCH 3/6] test on Python 3.9 --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9b2e08e..c6e13e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,12 @@ +branches: + only: + - main language: python python: - '3.6' - '3.7' - '3.8' +- '3.9' before_install: - pip install .[toil] - pip install -r dev-requirements.txt From 22fb63d29b43df9a823e0b6657c101b07b214469 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 13 Jul 2021 13:06:11 +0200 Subject: [PATCH 4/6] upgrade Toil --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fa5c978..1d16b96 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ extras_require={ "cwltool": ["cwlref-runner"], "arvados": ["arvados-cwl-runner"], - "toil": ["toil[cwl]==4.1.0"], + "toil": ["toil[cwl]==5.4.0"], }, zip_safe=False, platforms=["MacOS X", "Posix"], From fea07c21da9c686c18e1c83945a969898c0b3c1e Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 13 Jul 2021 13:13:02 +0200 Subject: [PATCH 5/6] drop need for future library --- wes_client/util.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wes_client/util.py b/wes_client/util.py index 414ca23..fd80d7b 100644 --- a/wes_client/util.py +++ b/wes_client/util.py @@ -9,10 +9,7 @@ from wes_service.util import visit -from future.standard_library import hooks - -with hooks(): - from urllib.request import urlopen, pathname2url +from urllib.request import urlopen, pathname2url def two_seven_compatible(filePath): From 9e0169ded35a02632139e151974390d68a01ca68 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 13 Jul 2021 13:20:38 +0200 Subject: [PATCH 6/6] upgrade pip version --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c6e13e4..4291dbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ python: - '3.8' - '3.9' before_install: +- pip install -U pip wheel - pip install .[toil] - pip install -r dev-requirements.txt script: