diff --git a/pkgs/applications/science/misc/cwltool/default.nix b/pkgs/applications/science/misc/cwltool/default.nix index 6a1bdc3de160..5693344e6364 100644 --- a/pkgs/applications/science/misc/cwltool/default.nix +++ b/pkgs/applications/science/misc/cwltool/default.nix @@ -7,19 +7,19 @@ python3.pkgs.buildPythonApplication rec { pname = "cwltool"; - version = "3.1.20220224085855"; + version = "3.1.20221201130942"; format = "setuptools"; src = fetchFromGitHub { owner = "common-workflow-language"; repo = pname; - rev = version; - sha256 = "sha256-7+1xOV5Lodqtku0wX1urAEHsCcYKM3Vcd5RDg4DdVow="; + rev = "refs/tags/${version}"; + hash = "sha256-PeddmHMJYtj/AAItmUVeyETizF7SKzkJ3bXYkeZU+xs="; }; postPatch = '' substituteInPlace setup.py \ - --replace "ruamel.yaml >= 0.15, < 0.17.18" "ruamel.yaml" \ + --replace "ruamel.yaml >= 0.15, < 0.17.22" "ruamel.yaml" \ --replace "prov == 1.5.1" "prov" \ --replace "setup_requires=PYTEST_RUNNER," "" ''; @@ -32,6 +32,7 @@ python3.pkgs.buildPythonApplication rec { argcomplete bagit coloredlogs + cwl-utils mypy-extensions prov psutil @@ -48,6 +49,7 @@ python3.pkgs.buildPythonApplication rec { mock nodejs pytest-mock + pytest-httpserver pytest-xdist pytestCheckHook ]; @@ -56,6 +58,7 @@ python3.pkgs.buildPythonApplication rec { "test_content_types" "test_env_filtering" "test_http_path_mapping" + "test_modification_date" ]; disabledTestPaths = [ @@ -70,6 +73,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Common Workflow Language reference implementation"; homepage = "https://www.commonwl.org"; + changelog = "https://github.com/common-workflow-language/cwltool/releases/tag/${version}"; license = with licenses; [ asl20 ]; maintainers = with maintainers; [ veprbl ]; }; diff --git a/pkgs/development/python-modules/cwl-upgrader/default.nix b/pkgs/development/python-modules/cwl-upgrader/default.nix new file mode 100644 index 000000000000..1c63c6605da4 --- /dev/null +++ b/pkgs/development/python-modules/cwl-upgrader/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest-xdist +, pytestCheckHook +, pythonOlder +, ruamel-yaml +, schema-salad +}: + +buildPythonPackage rec { + pname = "cwl-upgrader"; + version = "1.2.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "common-workflow-language"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-3pKnkU8lks3w+N7w2qST9jr4/CS6YzgnBVLTlgq1gf0="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "ruamel.yaml >= 0.15, < 0.17.22" "ruamel.yaml" \ + --replace "setup_requires=PYTEST_RUNNER," "" + sed -i "/ruamel.yaml/d" setup.py + ''; + + propagatedBuildInputs = [ + ruamel-yaml + schema-salad + ]; + + checkInputs = [ + pytest-xdist + pytestCheckHook + ]; + + pythonImportsCheck = [ + "cwlupgrader" + ]; + + meta = with lib; { + description = "Library to interface with Yolink"; + homepage = "https://github.com/common-workflow-language/cwl-utils"; + changelog = "https://github.com/common-workflow-language/cwl-utils/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/cwl-utils/default.nix b/pkgs/development/python-modules/cwl-utils/default.nix new file mode 100644 index 000000000000..b0459f3961ae --- /dev/null +++ b/pkgs/development/python-modules/cwl-utils/default.nix @@ -0,0 +1,67 @@ +{ lib +, buildPythonPackage +, cachecontrol +, cwl-upgrader +, cwlformat +, fetchFromGitHub +, packaging +, pytest-mock +, pytest-xdist +, pytestCheckHook +, pythonOlder +, rdflib +, requests +, schema-salad +}: + +buildPythonPackage rec { + pname = "cwl-utils"; + version = "0.21"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "common-workflow-language"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-y1zuYaxoE0XUk8UpCLsg4ty0sn+5Uu4ztRnUoJezO/o="; + }; + + propagatedBuildInputs = [ + cachecontrol + cwl-upgrader + packaging + rdflib + requests + schema-salad + ]; + + checkInputs = [ + cwlformat + pytest-mock + pytest-xdist + pytestCheckHook + ]; + + pythonImportsCheck = [ + "cwl_utils" + ]; + + disabledTests = [ + # Don't run tests which require Node.js + "test_context_multiple_regex" + "test_value_from_two_concatenated_expressions" + "test_graph_split" + "test_caches_js_processes" + "test_load_document_with_remote_uri" + ]; + + meta = with lib; { + description = "Utilities for CWL"; + homepage = "https://github.com/common-workflow-language/cwl-utils"; + changelog = "https://github.com/common-workflow-language/cwl-utils/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/cwlformat/default.nix b/pkgs/development/python-modules/cwlformat/default.nix new file mode 100644 index 000000000000..201155eac595 --- /dev/null +++ b/pkgs/development/python-modules/cwlformat/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, ruamel-yaml +}: + +buildPythonPackage rec { + pname = "cwlformat"; + version = "2022.02.18"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "rabix"; + repo = "cwl-format"; + rev = "refs/tags/${version}"; + hash = "sha256-FI8hUgb/KglTkubZ+StzptoSsYal71ITyyFNg7j48yk="; + }; + + propagatedBuildInputs = [ + ruamel-yaml + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "cwlformat" + ]; + + meta = with lib; { + description = "Code formatter for CWL"; + homepage = "https://github.com/rabix/cwl-format"; + changelog = "https://github.com/rabix/cwl-format/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 224684bc1faf..42cbfd3c30f5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2124,6 +2124,12 @@ self: super: with self; { cwcwidth = callPackage ../development/python-modules/cwcwidth { }; + cwl-upgrader = callPackage ../development/python-modules/cwl-upgrader { }; + + cwl-utils = callPackage ../development/python-modules/cwl-utils { }; + + cwlformat = callPackage ../development/python-modules/cwlformat { }; + cx_Freeze = callPackage ../development/python-modules/cx_freeze { }; cx_oracle = callPackage ../development/python-modules/cx_oracle { };