Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ list-author-emails:

mypy3: mypy
mypy: $(PYSOURCES)
if ! test -f $(shell python -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))')/py.typed ; \
then \
rm -Rf mypy-stubs/ruamel/yaml ; \
ln -s $(shell python -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
mypy-stubs/ruamel/ ; \
fi # if minimally required ruamel.yaml version is 0.15.99 or greater, than the above can be removed
MYPYPATH=$$MYPYPATH:mypy-stubs mypy $^

mypyc: $(PYSOURCES)
Expand Down
2 changes: 1 addition & 1 deletion cwltool/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@


class ContextBase:
"""Shared kwargs based initilizer for :py:class:`RuntimeContext` and :py:class:`LoadingContext`."""
"""Shared kwargs based initializer for :py:class:`RuntimeContext` and :py:class:`LoadingContext`."""

def __init__(self, kwargs: Optional[Dict[str, Any]] = None) -> None:
"""Initialize."""
Expand Down
2 changes: 1 addition & 1 deletion cwltool/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def is_streamable(file: str) -> bool:
return False
for inp in self.joborder.values():
if isinstance(inp, dict) and inp.get("location", None) == file:
return inp.get("streamable", False)
return cast(bool, inp.get("streamable", False))
return False

for knownfile in self.pathmapper.files():
Expand Down
2 changes: 1 addition & 1 deletion lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
flake8-bugbear<23.10
black~=23.9
black~=22.0
codespell
2 changes: 1 addition & 1 deletion mypy-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mypy==1.3.0 # also update pyproject.toml
mypy==1.6.0 # also update pyproject.toml
ruamel.yaml>=0.16.0,<0.18
cwl-utils>=0.22
types-requests
Expand Down
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ show_column_numbers = true
show_error_codes = true
pretty = true
warn_unreachable = True
new_type_inference = True

[mypy-galaxy.tool_util.*]
ignore_missing_imports = True
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[build-system]
requires = [
"setuptools>=45",
"mypy==1.3.0", # also update mypy-requirements.txt
"mypy==1.6.0", # also update mypy-requirements.txt
"types-requests",
"types-psutil",
"importlib_resources>=1.4", # equivalent to Python 3.9
"ruamel.yaml>=0.16.0,<0.18",
"schema-salad>=8.4.20230426093816,<9",
"packaging<22",
"cwl-utils>=0.19",
"toml",
"argcomplete>=1.12.0",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
requests>=2.6.1
ruamel.yaml>=0.15.0,<0.18
ruamel.yaml>=0.16;python_version>='3.10'
ruamel.yaml>=0.16.0,<0.18
rdflib>=4.2.2,<7.1
shellescape>=3.4.1,<3.9
schema-salad>=8.4.20230426093816,<9
Expand All @@ -12,4 +11,5 @@ coloredlogs
pydot>=1.4.1
argcomplete>=1.12.0
pyparsing!=3.0.2 # breaks --print-dot (pydot) https://github.com/pyparsing/pyparsing/issues/319
packaging<22
cwl-utils>=0.22
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"cwltool/workflow.py",
]

from mypyc.build import mypycify # type: ignore[import]
from mypyc.build import mypycify # type: ignore[import-untyped]

opt_level = os.getenv("MYPYC_OPT_LEVEL", "3")
ext_modules = mypycify(mypyc_targets, opt_level=opt_level)
Expand All @@ -112,8 +112,7 @@
"setuptools",
"requests >= 2.6.1", # >= 2.6.1 to workaround
# https://github.com/ionrock/cachecontrol/issues/137
"ruamel.yaml >= 0.15, < 0.18",
"ruamel.yaml >= 0.16.0;python_version>='3.10'",
"ruamel.yaml >= 0.16, < 0.18",
"rdflib >= 4.2.2, < 7.1.0",
"shellescape >= 3.4.1, < 3.9",
"schema-salad >= 8.4.20230426093816, < 9",
Expand All @@ -125,6 +124,7 @@
"pydot >= 1.4.1",
"argcomplete",
"pyparsing != 3.0.2", # breaks --print-dot (pydot) https://github.com/pyparsing/pyparsing/issues/319
"packaging<22",
"cwl-utils >= 0.22",
],
extras_require={
Expand Down
4 changes: 2 additions & 2 deletions tests/test_toolargparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def test_dont_require_inputs(tmp_path: Path) -> None:


def test_argparser_with_doc() -> None:
"""The `desription` field is set if `doc` field is provided."""
"""The `description` field is set if `doc` field is provided."""
loadingContext = LoadingContext()
tool = load_tool(get_data("tests/with_doc.cwl"), loadingContext)
p = argparse.ArgumentParser()
Expand All @@ -189,7 +189,7 @@ def test_argparser_with_doc() -> None:


def test_argparser_without_doc() -> None:
"""The `desription` field is None if `doc` field is not provided."""
"""The `description` field is None if `doc` field is not provided."""
loadingContext = LoadingContext()
tool = load_tool(get_data("tests/without_doc.cwl"), loadingContext)
p = argparse.ArgumentParser()
Expand Down
2 changes: 1 addition & 1 deletion tests/wf/schemadef-bug-1473.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
"name": "#settings-by-samples__1.0.0.yaml/settings-by-samples/samples"
},
{
"label": "settings by override cylces",
"label": "settings by override cycles",
"doc": "Additional bcl convert settings\n",
"type": [
"null",
Expand Down