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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ af096c2301d5ae81daa41bf0b96417cebda76d05

# black 2025 + isort
512ad4373d78412a12a8301f5efeef8a31e669e7

# black 2026 + isort
1bb5e300cd86535004f14e0e40d7bc6ad17d3e87
1 change: 1 addition & 0 deletions cwl_utils/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
"""Global version number for the cwl_utils package."""

__version__ = "0.41"
1 change: 1 addition & 0 deletions cwl_utils/cwl_v1_0_expression_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018-2021 Michael R. Crusoe
"""CWL Expression refactoring tool for CWL v1.0 ."""

import copy
import hashlib
import uuid
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/cwl_v1_1_expression_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018-2021 Michael R. Crusoe
"""CWL Expression refactoring tool for CWL v1.1 ."""

import copy
import hashlib
import uuid
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/cwl_v1_2_expression_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018-2021 Michael R. Crusoe
"""CWL Expression refactoring tool for CWL v1.2 ."""

import copy
import hashlib
import uuid
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/expression.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""CWL Expression parsing."""

import asyncio
import inspect
import json
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/expression_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018-2021 Michael R. Crusoe
"""CWL Expression refactoring tool for CWL."""

import argparse
import logging
import shutil
Expand Down
1 change: 0 additions & 1 deletion cwl_utils/file_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
For more information, please visit https://www.commonwl.org/user_guide/16-file-formats/
"""


from rdflib import OWL, RDFS, Graph, URIRef
from schema_salad.exceptions import ValidationException
from schema_salad.utils import aslist, json_dumps
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/image_puller.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Classes for docker-extract."""

import logging
import subprocess # nosec
from abc import ABC, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/inputs_schema_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Copyright 2024 Alexis Lucattini

"""Generate JSON Schema from CWL inputs object."""

import argparse
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/loghandler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Shared logging object."""

import logging

_logger = logging.getLogger("cwl_utils") # pylint: disable=invalid-name
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2021 Michael R. Crusoe
"""Normalize CWL documents to CWL v1.2, JSON style."""

import argparse
import logging
import sys
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/parser/cwl_v1_0_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections.abc import MutableMapping, MutableSequence
from io import StringIO
from pathlib import Path
from typing import Any, IO, cast
from typing import IO, Any, cast
from urllib.parse import urldefrag

from schema_salad.exceptions import ValidationException
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/parser/cwl_v1_1_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections.abc import MutableMapping, MutableSequence
from io import StringIO
from pathlib import Path
from typing import Any, IO, cast
from typing import IO, Any, cast
from urllib.parse import urldefrag

from schema_salad.exceptions import ValidationException
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/parser/cwl_v1_2_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections.abc import MutableMapping, MutableSequence
from io import StringIO
from pathlib import Path
from typing import Any, IO, cast
from typing import IO, Any, cast
from urllib.parse import urldefrag

from schema_salad.exceptions import ValidationException
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/parser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import cwl_utils
import cwl_utils.parser

from . import (
LoadingOptions,
Process,
Expand Down
1 change: 0 additions & 1 deletion cwl_utils/schemadef.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
"""


import sys
import urllib.parse
from copy import deepcopy
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/tests/test_cite_extract.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Tests for cwl-cite-extract."""

import pytest

from cwl_utils.cite_extract import arg_parser, run
Expand Down
6 changes: 2 additions & 4 deletions cwl_utils/tests/test_docker_extract.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Tests for cwl-docker-extract."""

from pathlib import Path

import pytest
Expand Down Expand Up @@ -92,13 +93,10 @@ def test_container_extraction_no_dockerPull(
assert len(reqs) == 1
assert len(list(tmp_path.iterdir())) == 0
captured = capsys.readouterr()
assert (
captured.err
== """Unable to save image from due to lack of 'dockerPull':
assert captured.err == """Unable to save image from due to lack of 'dockerPull':
class: DockerRequirement
dockerImageId: 'debian:stable-slim.img'
"""
)


@pytest.mark.parametrize(
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/tests/test_etools_to_clt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Test the CWL Expression refactoring tool."""

import shutil
import sys
import tarfile
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Tests of example Python scripts."""

import os
import runpy
from importlib.resources import as_file, files
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/tests/test_graph_split.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Test the CWL $graph document splitter tool."""

import json
from io import StringIO
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/tests/test_inputs_schema_gen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Tests for cwl-inputs-schema-gen."""

from pathlib import Path

import pytest
Expand Down
3 changes: 2 additions & 1 deletion cwl_utils/tests/test_parser_utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# SPDX-License-Identifier: Apache-2.0
"""Test the CWL parsers utility functions."""

import logging
import re
import tempfile
from collections.abc import MutableSequence
from typing import cast

import pytest
from pytest import raises, LogCaptureFixture
from pytest import LogCaptureFixture, raises
from schema_salad.exceptions import ValidationException

import cwl_utils.parser.cwl_v1_0
Expand Down
1 change: 0 additions & 1 deletion cwl_utils/tests/test_subscope.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Test that scoping of identifiers in Workflow.steps[].run is correct."""


from cwl_utils.parser import Workflow, load_document_by_uri

from .util import get_path
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
"""Shared Python type definitions for commons JSON like CWL objects."""

import sys
from collections.abc import Mapping, MutableMapping, MutableSequence
from typing import Any, Literal, TypeAlias, TypedDict, TypeGuard
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
"""Miscellaneous utility functions."""

import pathlib
import subprocess # nosec
import sys
Expand Down
2 changes: 1 addition & 1 deletion lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flake8-bugbear < 25.12
black == 25.*
black == 26.*
codespell
isort >= 5