Skip to content

Commit 6a80aa7

Browse files
authored
Merge pull request galaxyproject#22469 from nsoranzo/lint_and_package_fixes
Lint and package fixes
2 parents 4ac2016 + 35dcde7 commit 6a80aa7

6 files changed

Lines changed: 17 additions & 16 deletions

File tree

lib/galaxy/tool_util/cwl/cwltool_deps.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from cwl_utils.types import CWLObjectType
1717
except ImportError:
1818
try:
19-
from cwltool.utils import CWLObjectType # type: ignore[attr-defined, unused-ignore]
19+
from cwltool.utils import CWLObjectType # type: ignore[assignment, attr-defined, unused-ignore]
2020
except ImportError:
2121
CWLObjectType = object # type: ignore[assignment, misc]
2222

@@ -77,12 +77,14 @@
7777
from cwltool.utils import (
7878
JobsType,
7979
normalizeFilesDirs,
80+
OutputCallbackType,
8081
visit_class,
8182
)
8283
except ImportError:
8384
JobsType = object # type: ignore[misc, unused-ignore]
8485
visit_class = None # type: ignore[assignment]
8586
normalizeFilesDirs = None # type: ignore[assignment]
87+
OutputCallbackType = None # type: ignore[misc]
8688

8789
try:
8890
import schema_salad
@@ -138,6 +140,7 @@ def ensure_cwltool_available():
138140
"main",
139141
"needs_shell_quoting",
140142
"normalizeFilesDirs",
143+
"OutputCallbackType",
141144
"pathmapper",
142145
"process",
143146
"Process",

lib/galaxy/tool_util/cwl/parser.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
)
1515
from typing import (
1616
Any,
17+
cast,
1718
Dict,
1819
List,
1920
Optional,
@@ -70,6 +71,7 @@
7071
from .cwltool_deps import (
7172
CWLObjectType,
7273
JobsType,
74+
OutputCallbackType,
7375
Process,
7476
workflow,
7577
)
@@ -357,7 +359,11 @@ def _ensure_cwl_job_initialized(self):
357359
)
358360

359361
runtimeContext = RuntimeContext(job_args)
360-
self._cwl_job = next(self._tool_proxy._tool.job(self._input_dict, self._output_callback, runtimeContext))
362+
self._cwl_job = next(
363+
self._tool_proxy._tool.job(
364+
self._input_dict, cast("OutputCallbackType", self._output_callback), runtimeContext
365+
)
366+
)
361367
self._is_command_line_job = hasattr(self._cwl_job, "command_line")
362368

363369
def _normalize_job(self):
@@ -465,7 +471,7 @@ def generate_files(self):
465471
else:
466472
return {}
467473

468-
def _output_callback(self, out: Optional["CWLObjectType"], process_status: str):
474+
def _output_callback(self, out: Optional["CWLObjectType"], process_status: str) -> None:
469475
self._process_status = process_status
470476
if process_status == "success":
471477
self._final_output = out

lib/galaxy_test/base/populators.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,13 +2551,6 @@ def get_ro_crate(self, invocation_id, include_files=False):
25512551
)
25522552
return ROCrate(crate_response)
25532553

2554-
def validate_invocation_crate_directory(self, crate_directory):
2555-
# TODO: where can a ro_crate be extracted
2556-
metadata_json_path = crate_directory / "ro-crate-metadata.json"
2557-
with metadata_json_path.open() as f:
2558-
metadata_json = json.load(f)
2559-
assert metadata_json["@context"] == "https://w3id.org/ro/crate/1.1/context"
2560-
25612554
def invoke_workflow_raw(self, workflow_id: str, request: dict, assert_ok: bool = False) -> Response:
25622555
url = f"workflows/{workflow_id}/invocations"
25632556
invocation_response = self._post(url, data=request, json=True)

packages/data/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ install_requires =
5959
pypng
6060
python-magic
6161
pysam>=0.21
62-
rocrate
62+
rocrate<0.15.0
6363
social-auth-core>=4.5.0
6464
SQLAlchemy>=2.0.37,<2.1,!=2.0.41
6565
tifffile

packages/tool_shed/setup.cfg

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,14 @@ install_requires =
3939
galaxy-web-framework
4040
galaxy-web-stack
4141
galaxy-web-apps
42-
galaxy-test-base
43-
galaxy-test-driver
4442
a2wsgi
4543
alembic
4644
fastapi>=0.124.0
4745
Mako
4846
MarkupSafe
4947
mercurial>=7.2
5048
Paste
51-
playwright
5249
pydantic>=2.7.4
53-
pytest-playwright
5450
Routes
5551
SQLAlchemy>=2.0.37,<2.1,!=2.0.41
5652
slowapi
@@ -65,7 +61,10 @@ python_requires = >=3.10
6561
[options.extras_require]
6662
test =
6763
galaxy-test-base
64+
galaxy-test-driver
65+
playwright
6866
pytest
67+
pytest-playwright
6968

7069
[options.packages.find]
7170
exclude =

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ dependencies = [
9191
"refgenconf>=0.13.0", # https://github.com/refgenie/refgenconf/pull/149
9292
"regex",
9393
"requests",
94-
"rocrate",
94+
"rocrate<0.15.0", # https://github.com/crs4/rocrate-validator/issues/107
9595
"Routes",
9696
"s3fs>=2023.1.0",
9797
"schema-salad>=8.7.20240905150001", # Python 3.13 support

0 commit comments

Comments
 (0)