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
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
py-ver-major: [3]
py-ver-minor: [8, 9, 10, 11, 12]
py-ver-minor: [8, 9, 10, 11, 12, 13]
step: [lint, unit, bandit, mypy]

env:
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: Apache-2.0
"""Global version number for the cwl_utils package."""
__version__ = "0.33"
__version__ = "0.34"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
"Topic :: System :: Distributed Computing",
"Typing :: Typed",
]
requires-python = ">=3.8"
requires-python = ">=3.8,<3.14"
dynamic = ["version", "dependencies"]

[project.urls]
Expand Down
22 changes: 16 additions & 6 deletions tests/test_etools_to_clt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"""Test the CWL Expression refactoring tool."""
import os
import shutil
import sys
import tarfile
from pathlib import Path
from typing import Generator
from typing import TYPE_CHECKING, Generator, cast

import pytest
import requests
Expand All @@ -22,6 +23,9 @@

from .util import get_data

if TYPE_CHECKING:
from http.client import HTTPResponse


def test_v1_0_workflow_top_level_format_expr() -> None:
"""Test for the correct error when converting a format expression in a workflow level input."""
Expand Down Expand Up @@ -244,11 +248,17 @@ def cwl_v1_0_dir(
) -> Generator[str, None, None]:
"""Download the CWL 1.0.2 specs and return a path to the directory."""
tmp_path = tmp_path_factory.mktemp("cwl_v1_0_dir")
with requests.get(
"https://github.com/common-workflow-language/common-workflow-language/archive/v1.0.2.tar.gz",
stream=True,
).raw as specfileobj:
with cast(
"HTTPResponse",
requests.get(
"https://github.com/common-workflow-language/common-workflow-language/archive/v1.0.2.tar.gz",
stream=True,
).raw,
) as specfileobj:
tf = tarfile.open(fileobj=specfileobj)
tf.extractall(path=tmp_path)
if sys.version_info > (3, 12):
tf.extractall(path=tmp_path, filter="data")
else:
tf.extractall(path=tmp_path)
yield str(tmp_path / "common-workflow-language-1.0.2")
shutil.rmtree(os.path.join(tmp_path))
9 changes: 3 additions & 6 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
"""Tests of example Python scripts."""
import os
import runpy
from pathlib import Path


Expand All @@ -9,11 +10,7 @@ def test_load_example() -> None:
cwd = Path.cwd()
parent = Path(__file__).resolve().parent
os.chdir(parent.parent)
exec(
open(parent / "load_cwl_by_path.py").read(),
globals(),
locals(),
)
result_raw = runpy.run_path(str(parent / "load_cwl_by_path.py"))
os.chdir(cwd)
result = locals()["saved_obj"]
result = result_raw["saved_obj"]
assert result["class"] == "Workflow"
53 changes: 27 additions & 26 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
py3{8,9,10,11,12}-lint,
py3{8,9,10,11,12}-unit,
py3{8,9,10,11,12}-bandit,
py3{8,9,10,11,12}-mypy,
py3{8,9,10,11,12,13}-lint,
py3{8,9,10,11,12,13}-unit,
py3{8,9,10,11,12,13}-bandit,
py3{8,9,10,11,12,13}-mypy,
py312-lint-readme,
py312-pydocstyle
isolated_build = True
Expand All @@ -19,48 +19,49 @@ python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
description =
py3{8,9,10,11,12}-unit: Run the unit tests
py3{8,9,10,11,12}-lint: Lint the Python code
py3{8,9,10,11,12}-bandit: Search for common security issues
py3{8,9,10,11,12}-mypy: Check for type safety
py3{8,9,10,11,12,13}-unit: Run the unit tests
py3{8,9,10,11,12,13}-lint: Lint the Python code
py3{8,9,10,11,12,13}-bandit: Search for common security issues
py3{8,9,10,11,12,13}-mypy: Check for type safety
py312-pydocstyle: docstring style checker
py312-lint-readme: Lint the README.rst->.md conversion

passenv =
CI
GITHUB_*
deps =
py3{8,9,10,11,12}-{unit,mypy}: -rrequirements.txt
py3{8,9,10,11,12}-{unit,mypy}: -rtest-requirements.txt
py3{8,9,10,11,12}-lint: -rlint-requirements.txt
py3{8,9,10,11,12}-bandit: bandit
py3{8,9,10,11,12}-mypy: -rmypy-requirements.txt
py3{8,9,10,11,12,13}-{unit,mypy}: -rrequirements.txt
py3{8,9,10,11,12,13}-{unit,mypy}: -rtest-requirements.txt
py3{8,9,10,11,12,13}-lint: -rlint-requirements.txt
py3{8,9,10,11,12,13}-bandit: bandit
py3{8,9,10,11,12,13}-mypy: -rmypy-requirements.txt

setenv =
py3{8,9,10,11,12}-unit: LC_ALL = C.UTF-8
py3{8,9,10,11,12,13}-unit: LC_ALL = C.UTF-8

commands =
py3{8,9,10,11,12}-unit: python -m pip install -U pip setuptools wheel
py3{8,9,10,11,12}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs}
py3{8,9,10,11,12}-bandit: bandit --recursive cwl_utils
py3{8,9,10,11,12}-lint: make flake8
py3{8,9,10,11,12}-lint: make format-check
py3{8,9,10,11,12}-mypy: make mypy
py3{8,9,10,11,12,13}-unit: python -m pip install -U pip setuptools wheel
py3{8,9,10,11,12,13}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs}
py3{8,9,10,11,12,13}-bandit: bandit --recursive cwl_utils
py3{8,9,10,11,12,13}-lint: make flake8
py3{8,9,10,11,12,13}-lint: make format-check
py3{8,9,10,11,12,13}-mypy: make mypy

allowlist_externals =
py3{8,9,10,11,12}-lint: flake8
py3{8,9,10,11,12}-lint: black
py3{8,9,10,11,12}-{mypy,shellcheck,lint,unit}: make
py3{8,9,10,11,12,13}-lint: flake8
py3{8,9,10,11,12,13}-lint: black
py3{8,9,10,11,12,13}-{mypy,shellcheck,lint,unit}: make

skip_install =
py3{8,9,10,11,12}-lint: true
py3{8,9,10,11,12}-bandit: true
py3{8,9,10,11,12,13}-lint: true
py3{8,9,10,11,12,13}-bandit: true

extras =
py3{8,9,10,11,12}-unit: pretty
py3{8,9,10,11,12,13}-unit: pretty

[testenv:py312-pydocstyle]
allowlist_externals = make
Expand Down