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: 3 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install "tox<4" tox-gh-actions
pip install "tox<4" "tox-gh-actions<3"

- name: MyPy cache
if: ${{ matrix.step == 'mypy' }}
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install tox tox-gh-actions
pip install "tox<4" "tox-gh-actions<3"

- if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
name: Create local branch for diff-quality for PRs
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install tox tox-gh-actions
pip install "tox<4" "tox-gh-actions<3"
# # docker for mac install is not currently stable
# - name: 'SETUP MacOS: load Homebrew cache'
# uses: actions/cache@v3
Expand Down
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- graphviz

python:
install:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ MODULE=cwltool
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
# `[[` conditional expressions.
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
DEVPKGS=diff_cover pylint pep257 pydocstyle tox tox-pyenv \
DEVPKGS=diff_cover pylint pep257 pydocstyle 'tox<4' tox-pyenv \
isort wheel autoflake pyupgrade bandit -rlint-requirements.txt\
-rtest-requirements.txt -rmypy-requirements.txt
-rtest-requirements.txt -rmypy-requirements.txt -rdocs/requirements.txt
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
python-flake8 python-mock shellcheck

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ To run the basic tests after installing `cwltool` execute the following:
To run various tests in all supported Python environments, we use `tox <https://github.com/common-workflow-language/cwltool/tree/main/tox.ini>`_. To run the test suite in all supported Python environments
first clone the complete code repository (see the ``git clone`` instructions above) and then run
the following in the terminal:
``pip install tox; tox -p``
``pip install "tox<4"; tox -p``

List of all environment can be seen using:
``tox --listenvs``
Expand Down
11 changes: 7 additions & 4 deletions cwltool/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ def get_default_args() -> Dict[str, Any]:


class FSAction(argparse.Action):
"""Base action for our custom actions."""

objclass: Optional[str] = None

def __init__(
Expand Down Expand Up @@ -778,6 +780,8 @@ def __call__(


class FSAppendAction(argparse.Action):
"""Appending version of the base action for our custom actions."""

objclass: Optional[str] = None

def __init__(
Expand Down Expand Up @@ -832,11 +836,10 @@ class DirectoryAppendAction(FSAppendAction):


class AppendAction(argparse.Action):
"""An argparse action that clears the default values if any value is provided.
"""An argparse action that clears the default values if any value is provided."""

Attributes:
_called (bool): Initially set to ``False``, changed if any value is appended.
"""
_called: bool
"""Initially set to ``False``, changed if any value is appended."""

def __init__(
self,
Expand Down
1 change: 0 additions & 1 deletion cwltool/command_line_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def revmap_file(
outside the container. Recognizes files in the pathmapper or remaps
internal output directories to the external directory.
"""

# builder.outdir is the inner (container/compute node) output directory
# outdir is the outer (host/storage system) output directory

Expand Down
2 changes: 1 addition & 1 deletion cwltool/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def log_handler(


def set_log_dir(outdir: str, log_dir: str, subdir_name: str) -> str:
"""Default handler for setting the log directory."""
"""Set the log directory."""
if log_dir == "":
return outdir
else:
Expand Down
7 changes: 2 additions & 5 deletions cwltool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,10 +1203,8 @@ def scandeps(
urljoin: Callable[[str, str], str] = urllib.parse.urljoin,
nestdirs: bool = True,
) -> MutableSequence[CWLObjectType]:

"""Given a CWL document or input object, search for dependencies
(references to external files) of 'doc' and return them as a list
of File or Directory objects.
"""
Search for external files references in a CWL document or input object.

Looks for objects with 'class: File' or 'class: Directory' and
adds them to the list of dependencies.
Expand All @@ -1224,7 +1222,6 @@ def scandeps(
produce the same relative file system locations.
:returns: A list of File or Directory dependencies
"""

r: MutableSequence[CWLObjectType] = []
if isinstance(doc, MutableMapping):
if "id" in doc:
Expand Down
12 changes: 5 additions & 7 deletions cwltool/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@

def get_version() -> Tuple[List[int], str]:
"""
Parse the output of 'singularity --version' to determine the singularity flavor /
distribution (singularity, singularity-ce or apptainer) and the singularity version.
Parse the output of 'singularity --version' to determine the flavor and version.

Both pieces of information will be cached.

Returns
-------
A tuple containing:
- A tuple with major and minor version numbers as integer.
- A string with the name of the singularity flavor.
:returns: A tuple containing:
- A tuple with major and minor version numbers as integer.
- A string with the name of the singularity flavor.
"""
global _SINGULARITY_VERSION # pylint: disable=global-statement
global _SINGULARITY_FLAVOR # pylint: disable=global-statement
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
CWLProv
pythonversions
processgen
autoapi/index

Indices and tables
==================
Expand Down