Skip to content

Commit c722ce7

Browse files
committed
readthedocs: install graphviz
1 parent 126be96 commit c722ce7

9 files changed

+22
-23
lines changed

.readthedocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ build:
1616
os: ubuntu-22.04
1717
tools:
1818
python: "3.11"
19+
apt_packages:
20+
- graphviz
1921

2022
python:
2123
install:

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ MODULE=cwltool
2525
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2626
# `[[` conditional expressions.
2727
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
28-
DEVPKGS=diff_cover pylint pep257 pydocstyle tox tox-pyenv \
28+
DEVPKGS=diff_cover pylint pep257 pydocstyle 'tox<4' tox-pyenv \
2929
isort wheel autoflake pyupgrade bandit -rlint-requirements.txt\
30-
-rtest-requirements.txt -rmypy-requirements.txt
30+
-rtest-requirements.txt -rmypy-requirements.txt -rdocs/requirements.txt
3131
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3232
python-flake8 python-mock shellcheck
3333

cwltool/argparser.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ def get_default_args() -> Dict[str, Any]:
742742

743743

744744
class FSAction(argparse.Action):
745+
"""Base action for our custom actions."""
746+
745747
objclass: Optional[str] = None
746748

747749
def __init__(
@@ -778,6 +780,8 @@ def __call__(
778780

779781

780782
class FSAppendAction(argparse.Action):
783+
"""Appending version of the base action for our custom actions."""
784+
781785
objclass: Optional[str] = None
782786

783787
def __init__(
@@ -832,11 +836,10 @@ class DirectoryAppendAction(FSAppendAction):
832836

833837

834838
class AppendAction(argparse.Action):
835-
"""An argparse action that clears the default values if any value is provided.
839+
"""An argparse action that clears the default values if any value is provided."""
836840

837-
Attributes:
838-
_called (bool): Initially set to ``False``, changed if any value is appended.
839-
"""
841+
_called: bool
842+
"""Initially set to ``False``, changed if any value is appended."""
840843

841844
def __init__(
842845
self,

cwltool/command_line_tool.py

-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ def revmap_file(
253253
outside the container. Recognizes files in the pathmapper or remaps
254254
internal output directories to the external directory.
255255
"""
256-
257256
# builder.outdir is the inner (container/compute node) output directory
258257
# outdir is the outer (host/storage system) output directory
259258

cwltool/context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def log_handler(
7979

8080

8181
def set_log_dir(outdir: str, log_dir: str, subdir_name: str) -> str:
82-
"""Default handler for setting the log directory."""
82+
"""Set the log directory."""
8383
if log_dir == "":
8484
return outdir
8585
else:

cwltool/process.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1203,10 +1203,8 @@ def scandeps(
12031203
urljoin: Callable[[str, str], str] = urllib.parse.urljoin,
12041204
nestdirs: bool = True,
12051205
) -> MutableSequence[CWLObjectType]:
1206-
1207-
"""Given a CWL document or input object, search for dependencies
1208-
(references to external files) of 'doc' and return them as a list
1209-
of File or Directory objects.
1206+
"""
1207+
Search for external files references in a CWL document or input object.
12101208
12111209
Looks for objects with 'class: File' or 'class: Directory' and
12121210
adds them to the list of dependencies.
@@ -1224,7 +1222,6 @@ def scandeps(
12241222
produce the same relative file system locations.
12251223
:returns: A list of File or Directory dependencies
12261224
"""
1227-
12281225
r: MutableSequence[CWLObjectType] = []
12291226
if isinstance(doc, MutableMapping):
12301227
if "id" in doc:

cwltool/singularity.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,13 @@
3232

3333
def get_version() -> Tuple[List[int], str]:
3434
"""
35-
Parse the output of 'singularity --version' to determine the singularity flavor /
36-
distribution (singularity, singularity-ce or apptainer) and the singularity version.
35+
Parse the output of 'singularity --version' to determine the flavor and version.
36+
3737
Both pieces of information will be cached.
3838
39-
Returns
40-
-------
41-
A tuple containing:
42-
- A tuple with major and minor version numbers as integer.
43-
- A string with the name of the singularity flavor.
39+
:returns: A tuple containing:
40+
- A tuple with major and minor version numbers as integer.
41+
- A string with the name of the singularity flavor.
4442
"""
4543
global _SINGULARITY_VERSION # pylint: disable=global-statement
4644
global _SINGULARITY_FLAVOR # pylint: disable=global-statement

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
CWLProv
1010
pythonversions
1111
processgen
12+
autoapi/index
1213

1314
Indices and tables
1415
==================

tox.ini

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ setenv =
6161
py3{6,7,8,9,10,11}-unit: LC_ALL = C.UTF-8
6262

6363
commands_pre =
64-
py3{6,7,8,9,10,11}-unit: python -m pip install -U pip setuptools wheel
65-
py311-lintreadme: python -m build --outdir {distdir}
64+
py311-lintreadme: python -m build --outdir ${TOX_PACKAGE}
6665

6766
commands =
6867
py3{6,7,8,9,10,11}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs}
@@ -72,7 +71,7 @@ commands =
7271
py37-mypy: make mypy_3.6
7372
py311-shellcheck: make shellcheck
7473
py311-pydocstyle: make diff_pydocstyle_report
75-
py311-lintreadme: twine check {distdir}/*
74+
py311-lintreadme: twine check ${TOX_PACKAGE}/*
7675

7776
skip_install =
7877
py3{6,7,8,9,10,11}-{bandit,lint,mypy,shellcheck,pydocstyle,lintreadme}: true

0 commit comments

Comments
 (0)