[med-svn] [Git][med-team/cwltool][upstream] New upstream version 3.1.20251031082601
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Wed Jan 7 13:34:03 GMT 2026
Michael R. Crusoe pushed to branch upstream at Debian Med / cwltool
Commits:
7c7e94a4 by Michael R. Crusoe at 2026-01-07T12:55:25+01:00
New upstream version 3.1.20251031082601
- - - - -
26 changed files:
- .github/workflows/ci-tests.yml
- .github/workflows/codeql-analysis.yml
- .github/workflows/wheels.yml
- PKG-INFO
- cwltool.egg-info/PKG-INFO
- cwltool.egg-info/SOURCES.txt
- cwltool.egg-info/requires.txt
- cwltool/_version.py
- cwltool/builder.py
- cwltool/cuda.py
- cwltool/cwlprov/ro.py
- cwltool/cwlrdf.py
- cwltool/cwlviewer.py
- cwltool/factory.py
- cwltool/job.py
- cwltool/main.py
- cwltool/resolver.py
- cwltool/software_requirements.py
- cwltool/stdfsaccess.py
- mypy-requirements.txt
- − mypy-stubs/pydot.pyi
- pyproject.toml
- requirements.txt
- setup.py
- test-requirements.txt
- tests/test_examples.py
Changes:
=====================================
.github/workflows/ci-tests.yml
=====================================
@@ -214,7 +214,7 @@ jobs:
CWLTOOL_OPTIONS: ${{ matrix.cwl-version == 'v1.2' && '--relax-path-checks' || '' }} ${{ matrix.extras }}
run: ./conformance-test.sh
- name: Archive test results
- uses: actions/upload-artifact at v4
+ uses: actions/upload-artifact at v5
with:
name: cwl-${{ matrix.cwl-version }}-${{ matrix.container }}${{ matrix.extras }}-conformance-results
path: |
=====================================
.github/workflows/codeql-analysis.yml
=====================================
@@ -27,9 +27,9 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init at v3
+ uses: github/codeql-action/init at v4
with:
languages: python
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze at v3
+ uses: github/codeql-action/analyze at v4
=====================================
.github/workflows/wheels.yml
=====================================
@@ -54,7 +54,7 @@ jobs:
# Linux arm64 wheels are built on circleci
CIBW_ARCHS_LINUX: auto64 # ppc64le s390x
- - uses: actions/upload-artifact at v4
+ - uses: actions/upload-artifact at v5
with:
name: artifact-${{ matrix.image }}
path: ./wheelhouse/*.whl
@@ -76,7 +76,7 @@ jobs:
- name: Build sdist
run: pipx run build --sdist
- - uses: actions/upload-artifact at v4
+ - uses: actions/upload-artifact at v5
with:
name: artifact-source
path: dist/*.tar.gz
@@ -102,7 +102,7 @@ jobs:
- name: Build wheels
uses: pypa/cibuildwheel at v3.2
- - uses: actions/upload-artifact at v4
+ - uses: actions/upload-artifact at v5
with:
name: artifact-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: cwltool
-Version: 3.1.20250925164626
+Version: 3.1.20251031082601
Summary: Common workflow language reference implementation
Home-page: https://github.com/common-workflow-language/cwltool
Download-URL: https://github.com/common-workflow-language/cwltool
@@ -36,7 +36,7 @@ Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: requests>=2.6.1
Requires-Dist: ruamel.yaml<0.19,>=0.16
-Requires-Dist: rdflib<7.3.0,>=4.2.2
+Requires-Dist: rdflib<7.5.0,>=4.2.2
Requires-Dist: schema-salad<9,>=8.9
Requires-Dist: prov==1.5.1
Requires-Dist: mypy-extensions
=====================================
cwltool.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: cwltool
-Version: 3.1.20250925164626
+Version: 3.1.20251031082601
Summary: Common workflow language reference implementation
Home-page: https://github.com/common-workflow-language/cwltool
Download-URL: https://github.com/common-workflow-language/cwltool
@@ -36,7 +36,7 @@ Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: requests>=2.6.1
Requires-Dist: ruamel.yaml<0.19,>=0.16
-Requires-Dist: rdflib<7.3.0,>=4.2.2
+Requires-Dist: rdflib<7.5.0,>=4.2.2
Requires-Dist: schema-salad<9,>=8.9
Requires-Dist: prov==1.5.1
Requires-Dist: mypy-extensions
=====================================
cwltool.egg-info/SOURCES.txt
=====================================
@@ -596,7 +596,6 @@ docs/pythonversions.rst
docs/requirements.txt
docs/_static/favicon.ico
mypy-stubs/bagit.pyi
-mypy-stubs/pydot.pyi
mypy-stubs/arcp/__init__.pyi
mypy-stubs/arcp/parse.pyi
mypy-stubs/coloredlogs/__init__.pyi
=====================================
cwltool.egg-info/requires.txt
=====================================
@@ -1,6 +1,6 @@
requests>=2.6.1
ruamel.yaml<0.19,>=0.16
-rdflib<7.3.0,>=4.2.2
+rdflib<7.5.0,>=4.2.2
schema-salad<9,>=8.9
prov==1.5.1
mypy-extensions
=====================================
cwltool/_version.py
=====================================
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
commit_id: COMMIT_ID
__commit_id__: COMMIT_ID
-__version__ = version = '3.1.20250925164626'
-__version_tuple__ = version_tuple = (3, 1, 20250925164626)
+__version__ = version = '3.1.20251031082601'
+__version_tuple__ = version_tuple = (3, 1, 20251031082601)
__commit_id__ = commit_id = None
=====================================
cwltool/builder.py
=====================================
@@ -23,7 +23,6 @@ from schema_salad.validate import validate
from .errors import WorkflowException
from .loghandler import _logger
from .mutation import MutationManager
-from .software_requirements import DependenciesConfiguration
from .stdfsaccess import StdFsAccess
from .utils import (
CONTENT_LIMIT,
@@ -42,6 +41,7 @@ if TYPE_CHECKING:
ProvenanceProfile, # pylint: disable=unused-import
)
from .pathmapper import PathMapper
+ from .software_requirements import DependenciesConfiguration
INPUT_OBJ_VOCAB: dict[str, str] = {
"Any": "https://w3id.org/cwl/salad#Any",
@@ -106,7 +106,7 @@ class Builder(HasReqsHints):
formatgraph: Optional[Graph],
make_fs_access: type[StdFsAccess],
fs_access: StdFsAccess,
- job_script_provider: Optional[DependenciesConfiguration],
+ job_script_provider: Optional["DependenciesConfiguration"],
timeout: float,
debug: bool,
js_console: bool,
=====================================
cwltool/cuda.py
=====================================
@@ -13,7 +13,7 @@ def cuda_version_and_device_count() -> tuple[str, int]:
try:
out: Union[str, bytes] = subprocess.check_output(["nvidia-smi", "-q", "-x"]) # nosec
except Exception as e:
- _logger.warning("Error checking CUDA version with nvidia-smi: %s", e, exc_info=e)
+ _logger.debug("Error checking CUDA version with nvidia-smi: %s", e, exc_info=e)
return ("", 0)
dm = xml.dom.minidom.parseString(out) # nosec
=====================================
cwltool/cwlprov/ro.py
=====================================
@@ -402,6 +402,7 @@ class ResearchObject:
return aggregates
def add_uri(self, uri: str, timestamp: Optional[datetime.datetime] = None) -> Aggregate:
+ """Add the given URI to this RO."""
self.self_check()
aggr: Aggregate = {"uri": uri}
aggr["createdOn"], aggr["createdBy"] = self._self_made(timestamp=timestamp)
=====================================
cwltool/cwlrdf.py
=====================================
@@ -1,10 +1,8 @@
-import urllib
-from codecs import StreamWriter
-from collections.abc import Iterator
-from typing import IO, Any, Optional, TextIO, Union, cast
+"""RDF output."""
+
+from typing import IO, Any
from rdflib import Graph
-from rdflib.query import ResultRow
from ruamel.yaml.comments import CommentedMap
from schema_salad.jsonld_context import makerdf
from schema_salad.utils import ContextType
@@ -38,172 +36,6 @@ def lastpart(uri: Any) -> str:
return uri2
-def dot_with_parameters(g: Graph, stdout: Union[TextIO, StreamWriter]) -> None:
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?step ?run ?runtype
- WHERE {
- ?step cwl:run ?run .
- ?run rdf:type ?runtype .
- }"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- for step, run, _ in qres:
- stdout.write(
- '"{}" [label="{}"]\n'.format(lastpart(step), f"{lastpart(step)} ({lastpart(run)})")
- )
-
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?step ?inp ?source
- WHERE {
- ?wf Workflow:steps ?step .
- ?step cwl:inputs ?inp .
- ?inp cwl:source ?source .
- }"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- for step, inp, source in qres:
- stdout.write('"%s" [shape=box]\n' % (lastpart(inp)))
- stdout.write('"{}" -> "{}" [label="{}"]\n'.format(lastpart(source), lastpart(inp), ""))
- stdout.write('"{}" -> "{}" [label="{}"]\n'.format(lastpart(inp), lastpart(step), ""))
-
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?step ?out
- WHERE {
- ?wf Workflow:steps ?step .
- ?step cwl:outputs ?out .
- }"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- for step, out in qres:
- stdout.write('"%s" [shape=box]\n' % (lastpart(out)))
- stdout.write('"{}" -> "{}" [label="{}"]\n'.format(lastpart(step), lastpart(out), ""))
-
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?out ?source
- WHERE {
- ?wf cwl:outputs ?out .
- ?out cwl:source ?source .
- }"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- for out, source in qres:
- stdout.write('"%s" [shape=octagon]\n' % (lastpart(out)))
- stdout.write('"{}" -> "{}" [label="{}"]\n'.format(lastpart(source), lastpart(out), ""))
-
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?inp
- WHERE {
- ?wf rdf:type cwl:Workflow .
- ?wf cwl:inputs ?inp .
- }"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- for (inp,) in qres:
- stdout.write('"%s" [shape=octagon]\n' % (lastpart(inp)))
-
-
-def dot_without_parameters(g: Graph, stdout: Union[TextIO, StreamWriter]) -> None:
- dotname: dict[str, str] = {}
- clusternode = {}
-
- stdout.write("compound=true\n")
-
- subworkflows = set()
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?run
- WHERE {
- ?wf rdf:type cwl:Workflow .
- ?wf Workflow:steps ?step .
- ?step cwl:run ?run .
- ?run rdf:type cwl:Workflow .
- } ORDER BY ?wf"""
- ),
- ) # ResultRow because the query is of type SELECT
- for (run,) in qres:
- subworkflows.add(run)
-
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT ?wf ?step ?run ?runtype
- WHERE {
- ?wf rdf:type cwl:Workflow .
- ?wf Workflow:steps ?step .
- ?step cwl:run ?run .
- ?run rdf:type ?runtype .
- } ORDER BY ?wf"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- currentwf: Optional[str] = None
- for wf, step, _run, runtype in qres:
- if step not in dotname:
- dotname[step] = lastpart(step)
-
- if wf != currentwf:
- if currentwf is not None:
- stdout.write("}\n")
- if wf in subworkflows:
- if wf not in dotname:
- dotname[wf] = "cluster_" + lastpart(wf)
- stdout.write(f'subgraph "{dotname[wf]}" {{ label="{lastpart(wf)}"\n') # noqa: B907
- currentwf = wf
- clusternode[wf] = step
- else:
- currentwf = None
-
- if str(runtype) != "https://w3id.org/cwl/cwl#Workflow":
- stdout.write(
- f'"{dotname[step]}" [label="{urllib.parse.urldefrag(str(step))[1]}"]\n' # noqa: B907
- )
-
- if currentwf is not None:
- stdout.write("}\n")
-
- qres = cast(
- Iterator[ResultRow],
- g.query(
- """SELECT DISTINCT ?src ?sink ?srcrun ?sinkrun
- WHERE {
- ?wf1 Workflow:steps ?src .
- ?wf2 Workflow:steps ?sink .
- ?src cwl:out ?out .
- ?inp cwl:source ?out .
- ?sink cwl:in ?inp .
- ?src cwl:run ?srcrun .
- ?sink cwl:run ?sinkrun .
- }"""
- ),
- ) # ResultRow because the query is of type SELECT
-
- for src, sink, srcrun, sinkrun in qres:
- attr = ""
- if srcrun in clusternode:
- attr += 'ltail="%s"' % dotname[srcrun]
- src = clusternode[srcrun]
- if sinkrun in clusternode:
- attr += ' lhead="%s"' % dotname[sinkrun]
- sink = clusternode[sinkrun]
- stdout.write(f'"{dotname[src]}" -> "{dotname[sink]}" [{attr}]\n') # noqa: B907
-
-
def printdot(
wf: Process,
ctx: ContextType,
=====================================
cwltool/cwlviewer.py
=====================================
@@ -7,6 +7,12 @@ from urllib.parse import urlparse
import pydot
import rdflib
+from packaging.version import Version
+
+if Version(pydot.__version__) > Version("3.0"):
+ quote_id_if_necessary = pydot.quote_id_if_necessary
+else:
+ quote_id_if_necessary = pydot.quote_if_necessary # type: ignore[attr-defined]
def _get_inner_edges_query() -> str:
@@ -99,8 +105,8 @@ class CWLViewer:
self._dot_graph.add_node(n)
self._dot_graph.add_edge(
pydot.Edge(
- pydot.quote_id_if_necessary(str(inner_edge_row["source_step"])),
- pydot.quote_id_if_necessary(str(inner_edge_row["target_step"])),
+ quote_id_if_necessary(str(inner_edge_row["source_step"])),
+ quote_id_if_necessary(str(inner_edge_row["target_step"])),
)
)
@@ -130,8 +136,8 @@ class CWLViewer:
inputs_subgraph.add_node(n)
self._dot_graph.add_edge(
pydot.Edge(
- pydot.quote_id_if_necessary(str(input_row["input"])),
- pydot.quote_id_if_necessary(str(input_row["step"])),
+ quote_id_if_necessary(str(input_row["input"])),
+ quote_id_if_necessary(str(input_row["step"])),
)
)
@@ -161,8 +167,8 @@ class CWLViewer:
outputs_graph.add_node(n)
self._dot_graph.add_edge(
pydot.Edge(
- pydot.quote_id_if_necessary(output_edge_row["step"]),
- pydot.quote_id_if_necessary(output_edge_row["output"]),
+ quote_id_if_necessary(output_edge_row["step"]),
+ quote_id_if_necessary(output_edge_row["output"]),
)
)
=====================================
cwltool/factory.py
=====================================
@@ -27,6 +27,7 @@ class Callable:
def __call__(self, **kwargs):
# type: (**Any) -> Union[str, Optional[CWLObjectType]]
+ """Invoke the tool."""
runtime_context = self.factory.runtime_context.copy()
runtime_context.basedir = os.getcwd()
out, status = self.factory.executor(self.t, kwargs, runtime_context)
=====================================
cwltool/job.py
=====================================
@@ -100,6 +100,7 @@ def relink_initialworkdir(
def neverquote(string: str, pos: int = 0, endpos: int = 0) -> Optional[Match[str]]:
+ """No-op."""
return None
=====================================
cwltool/main.py
=====================================
@@ -84,10 +84,6 @@ from .process import (
from .procgenerator import ProcessGenerator
from .resolver import ga4gh_tool_registries, tool_resolver
from .secrets import SecretStore
-from .software_requirements import (
- DependenciesConfiguration,
- get_container_from_software_requirements,
-)
from .stdfsaccess import StdFsAccess
from .subgraph import get_process, get_step, get_subgraph
from .update import ALLUPDATES, UPDATES
@@ -1301,6 +1297,8 @@ def main(
use_conda_dependencies = getattr(args, "beta_conda_dependencies", None) # str
if conf_file or use_conda_dependencies:
+ from .software_requirements import DependenciesConfiguration
+
runtimeContext.job_script_provider = DependenciesConfiguration(args)
else:
runtimeContext.find_default_container = functools.partial(
@@ -1438,6 +1436,8 @@ def find_default_container(
) -> Optional[str]:
"""Find a container."""
if not default_container and use_biocontainers:
+ from .software_requirements import get_container_from_software_requirements
+
default_container = get_container_from_software_requirements(
use_biocontainers, builder, container_image_cache_path
)
=====================================
cwltool/resolver.py
=====================================
@@ -11,6 +11,7 @@ from .loghandler import _logger
def resolve_local(document_loader: Optional[Loader], uri: str) -> Optional[str]:
+ """Use the local resolver to find the target of the URI."""
pathpart, frag = urllib.parse.urldefrag(uri)
try:
@@ -41,6 +42,7 @@ def resolve_local(document_loader: Optional[Loader], uri: str) -> Optional[str]:
def tool_resolver(document_loader: Loader, uri: str) -> Optional[str]:
+ """Try both the local resolver and the GA4GH TRS resolver, in that order."""
for r in [resolve_local, resolve_ga4gh_tool]:
ret = r(document_loader, uri)
if ret is not None:
@@ -63,6 +65,7 @@ GA4GH_TRS_PRIMARY_DESCRIPTOR = "{0}/api/ga4gh/v2/tools/{1}/versions/{2}/plain-CW
def resolve_ga4gh_tool(document_loader: Loader, uri: str) -> Optional[str]:
+ """Use the GA4GH TRS API to resolve a tool reference."""
path, version = uri.partition(":")[::2]
if not version:
version = "latest"
=====================================
cwltool/software_requirements.py
=====================================
@@ -8,6 +8,7 @@ ways to adapt new packages managers and such as well.
"""
import argparse
+import importlib.metadata
import os
import string
from collections.abc import MutableMapping, MutableSequence
@@ -16,18 +17,15 @@ from typing import TYPE_CHECKING, Any, Optional, Union, cast
from .utils import HasReqsHints
if TYPE_CHECKING:
+ from galaxy.tool_util.deps.requirements import ToolRequirements
+
from .builder import Builder
try:
- from galaxy.tool_util import deps
- from galaxy.tool_util.deps.requirements import ToolRequirement, ToolRequirements
-except ImportError:
- ToolRequirement = None # type: ignore
- ToolRequirements = None # type: ignore
- deps = None # type: ignore
-
-
-SOFTWARE_REQUIREMENTS_ENABLED = deps is not None
+ importlib.metadata.Distribution.from_name("galaxy-tool-util")
+ SOFTWARE_REQUIREMENTS_ENABLED = True
+except ModuleNotFoundError:
+ SOFTWARE_REQUIREMENTS_ENABLED = False
COMMAND_WITH_DEPENDENCIES_TEMPLATE = string.Template(
"""#!/bin/bash
@@ -74,6 +72,8 @@ class DependenciesConfiguration:
def build_job_script(self, builder: "Builder", command: list[str]) -> str:
"""Use the galaxy-tool-util library to construct a build script."""
+ from galaxy.tool_util import deps
+
ensure_galaxy_lib_available()
resolution_config_dict = {
"use": self.use_tool_dependencies,
@@ -102,8 +102,12 @@ class DependenciesConfiguration:
return job_script
-def get_dependencies(builder: HasReqsHints) -> ToolRequirements:
+def get_dependencies(
+ builder: HasReqsHints,
+) -> "ToolRequirements":
(software_requirement, _) = builder.get_requirement("SoftwareRequirement")
+ from galaxy.tool_util.deps.requirements import ToolRequirement, ToolRequirements
+
dependencies: list[Union["ToolRequirement", dict[str, Any]]] = []
if software_requirement and software_requirement.get("packages"):
packages = cast(
=====================================
cwltool/stdfsaccess.py
=====================================
@@ -55,6 +55,7 @@ class StdFsAccess:
return [abspath(urllib.parse.quote(entry), fn) for entry in os.listdir(self._abs(fn))]
def join(self, path, *paths): # type: (str, *str) -> str
+ """Join one or more path segments intelligently."""
return os.path.join(path, *paths)
def realpath(self, path: str) -> str:
=====================================
mypy-requirements.txt
=====================================
@@ -8,4 +8,4 @@ types-psutil
types-mock
galaxy-tool-util>=22.1.2,!=23.0.1,!=23.0.2,!=23.0.3,!=23.0.4,!=23.0.5,<25.1
galaxy-util<25.1
-pydantic==2.12.0a1; python_version >= "3.14"
+pydantic>=2.12.0; python_version >= "3.14"
=====================================
mypy-stubs/pydot.pyi deleted
=====================================
@@ -1,150 +0,0 @@
-from typing import Any, Dict, List, Optional, Sequence, Union
-
-PY3: Any
-str_type = str
-GRAPH_ATTRIBUTES: Any
-EDGE_ATTRIBUTES: Any
-NODE_ATTRIBUTES: Any
-CLUSTER_ATTRIBUTES: Any
-DEFAULT_PROGRAMS: Any
-
-def is_windows() -> bool: ...
-def is_anaconda() -> bool: ...
-def get_executable_extension() -> str: ...
-def graph_from_dot_data(s: str) -> List["Dot"]: ...
-def quote_id_if_necessary(s: str, unquoted_keywords: Optional[Sequence[str]] = None) -> str: ...
-
-class Common:
- def set_parent_graph(self, parent_graph: "Graph") -> None: ...
- def get_parent_graph(self) -> "Graph": ...
- def set(self, name: str, value: str) -> None: ...
- def get(self, name: str) -> str: ...
- def get_attributes(self) -> Dict[str, str]: ...
- def set_sequence(self, seq: str) -> None: ...
- def get_sequence(self) -> str: ...
-
-class Error(Exception):
- value: Any
- def __init__(self, value: str) -> None: ...
-
-class InvocationException(Exception):
- value: Any
- def __init__(self, value: str) -> None: ...
-
-class Node(Common):
- obj_dict: Any
- def __init__(self, name: str = ..., obj_dict: Any | None = ..., **attrs: str) -> None: ...
- def set_name(self, node_name: str) -> None: ...
- def get_name(self) -> str: ...
- def get_port(self) -> str: ...
- def add_style(self, style: str) -> None: ...
- def to_string(self) -> str: ...
-
-class Edge(Common):
- obj_dict: Any
- def __init__(
- self,
- src: str = ...,
- dst: str = ...,
- obj_dict: Any | None = ...,
- **attrs: Dict[str, str],
- ) -> None: ...
- def get_source(self) -> str: ...
- def get_destination(self) -> str: ...
- def __hash__(self) -> int: ...
- def __eq__(self, edge: Any) -> bool: ...
- def parse_node_ref(self, node_str: str) -> str: ...
- def to_string(self) -> str: ...
-
-class Graph(Common):
- obj_dict: Any
- def __init__(
- self,
- graph_name: str = ...,
- obj_dict: Any | None = ...,
- graph_type: str = ...,
- strict: bool = ...,
- suppress_disconnected: bool = ...,
- simplify: bool = ...,
- **attrs: Dict[str, str],
- ) -> None: ...
- def get_graph_type(self) -> str: ...
- def get_top_graph_type(self) -> str: ...
- def set_graph_defaults(self, **attrs: Dict[str, str]) -> None: ...
- def get_graph_defaults(self, **attrs: Dict[str, str]) -> Dict[str, str]: ...
- def set_node_defaults(self, **attrs: Dict[str, str]) -> None: ...
- def get_node_defaults(self, **attrs: Dict[str, str]) -> Dict[str, str]: ...
- def set_edge_defaults(self, **attrs: Dict[str, str]) -> None: ...
- def get_edge_defaults(self, **attrs: Dict[str, str]) -> Dict[str, str]: ...
- def set_simplify(self, simplify: bool) -> None: ...
- def get_simplify(self) -> bool: ...
- def set_type(self, graph_type: str) -> None: ...
- def get_type(self) -> str: ...
- def set_name(self, graph_name: str) -> None: ...
- def get_name(self) -> str: ...
- def set_strict(self, val: bool) -> None: ...
- def get_strict(self, val: Any) -> bool: ...
- def set_suppress_disconnected(self, val: bool) -> None: ...
- def get_suppress_disconnected(self, val: Any) -> None: ...
- def get_next_sequence_number(self) -> int: ...
- def add_node(self, graph_node: Node) -> None: ...
- def del_node(self, name: Union[str, Node], index: int | None = ...) -> bool: ...
- def get_node(self, name: str) -> Node: ...
- def get_nodes(self) -> List[Node]: ...
- def get_node_list(self) -> List[Node]: ...
- def add_edge(self, graph_edge: Edge) -> None: ...
- def del_edge(
- self,
- src_or_list: Union[Sequence[Node], Node],
- dst: str | int | None = ...,
- index: int | None = ...,
- ) -> bool: ...
- def get_edge(
- self, src_or_list: Union[Sequence[Node], Node], dst: Any | None = ...
- ) -> List[Edge]: ...
- def get_edges(self) -> List[Edge]: ...
- def get_edge_list(self) -> List[Edge]: ...
- def add_subgraph(self, sgraph: Union["Subgraph", "Cluster"]) -> None: ...
- def get_subgraph(self, name: str) -> List["Subgraph"]: ...
- def get_subgraphs(self) -> List["Subgraph"]: ...
- def get_subgraph_list(self) -> List["Subgraph"]: ...
- def set_parent_graph(self, parent_graph: "Graph") -> None: ...
- def to_string(self) -> str: ...
-
-class Subgraph(Graph):
- def __init__(
- self,
- graph_name: str = ...,
- obj_dict: Any | Dict[str, str] = ...,
- suppress_disconnected: bool = ...,
- simplify: bool = ...,
- **attrs: Dict[str, str],
- ) -> None: ...
-
-class Cluster(Graph):
- def __init__(
- self,
- graph_name: str = ...,
- obj_dict: Any | Dict[str, str] = ...,
- suppress_disconnected: bool = ...,
- simplify: bool = ...,
- **attrs: Dict[str, str],
- ) -> None: ...
-
-class Dot(Graph):
- shape_files: Any
- formats: Any
- prog: str
- def __init__(self, *argsl: Any, **argsd: Dict[str, str]): ...
- def set_shape_files(self, file_paths: Union[str, Sequence[str]]) -> None: ...
- def set_prog(self, prog: str) -> None: ...
- def write(
- self,
- path: str,
- prog: Any | str = ...,
- format: str = ...,
- encoding: Any | str = ...,
- ) -> bool: ...
- def create(
- self, prog: Any | str = ..., format: str = ..., encoding: Any | str = ...
- ) -> bytes: ...
=====================================
pyproject.toml
=====================================
@@ -10,7 +10,8 @@ requires = [
"cwl-utils>=0.32",
"toml",
"argcomplete>=1.12.0",
- "rich-argparse"
+ "rich-argparse",
+ "pydot >= 1.4.1"
]
build-backend = "setuptools.build_meta"
=====================================
requirements.txt
=====================================
@@ -1,6 +1,6 @@
requests>=2.6.1
ruamel.yaml>=0.16.0,<0.19
-rdflib>=4.2.2,<7.3
+rdflib>=4.2.2,<7.5
schema-salad>=8.9,<9
prov==1.5.1
mypy-extensions
=====================================
setup.py
=====================================
@@ -150,7 +150,7 @@ setup(
"requests >= 2.6.1", # >= 2.6.1 to workaround
# https://github.com/ionrock/cachecontrol/issues/137
"ruamel.yaml >= 0.16, < 0.19",
- "rdflib >= 4.2.2, < 7.3.0",
+ "rdflib >= 4.2.2, < 7.5.0",
"schema-salad >= 8.9, < 9",
"prov == 1.5.1",
"mypy-extensions",
=====================================
test-requirements.txt
=====================================
@@ -11,4 +11,4 @@ arcp>=0.2.0
-r requirements.txt
galaxy-tool-util>=22.1.2,!=23.0.1,!=23.0.2,!=23.0.3,!=23.0.4,!=23.0.5,<25.1
galaxy-util<25.1
-pydantic==2.12.0a1
+pydantic>=2.12.0; python_version >= "3.14"
=====================================
tests/test_examples.py
=====================================
@@ -995,8 +995,10 @@ def test_var_spool_cwl_checker3() -> None:
def test_print_dot() -> None:
# print Workflow
cwl_path = get_data("tests/wf/three_step_color.cwl")
- expected_dot = pydot.graph_from_dot_data(
- """
+ expected_dot = cast(
+ list[pydot.core.Dot],
+ pydot.graph_from_dot_data(
+ """
digraph {{
graph [bgcolor="#eeeeee",
clusterrank=local,
@@ -1041,10 +1043,11 @@ def test_print_dot() -> None:
"command_line_tool" -> "file_output";
}}
""".format()
+ ),
)[0]
stdout = StringIO()
assert main(["--debug", "--print-dot", cwl_path], stdout=stdout) == 0
- computed_dot = pydot.graph_from_dot_data(stdout.getvalue())[0]
+ computed_dot = cast(list[pydot.core.Dot], pydot.graph_from_dot_data(stdout.getvalue()))[0]
computed_edges = sorted((source, target) for source, target in computed_dot.obj_dict["edges"])
expected_edges = sorted((source, target) for source, target in expected_dot.obj_dict["edges"])
assert computed_edges == expected_edges
View it on GitLab: https://salsa.debian.org/med-team/cwltool/-/commit/7c7e94a48983e11fb344272143d22964e9e3796c
--
View it on GitLab: https://salsa.debian.org/med-team/cwltool/-/commit/7c7e94a48983e11fb344272143d22964e9e3796c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260107/dcceb804/attachment-0001.htm>
More information about the debian-med-commit
mailing list