Merge branch 'release_24.1' into release_24.2

This commit is contained in:
Nicola Soranzo
2024-12-19 15:45:08 +00:00
6 changed files with 15 additions and 13 deletions
+2
View File
@@ -41,6 +41,8 @@ jobs:
key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-mulled
- name: Install Apptainer's singularity
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.6 # https://github.com/eWaterCycle/setup-apptainer/pull/68
- name: Install tox
run: pip install tox
- name: Run tests
@@ -31,7 +31,7 @@ function onDoNotShowAgain() {
watch(
() => props.querySelectionBreak,
() => {
dismissCountDown.value = showSelectionQueryBreakWarning ? dismissSecs.value : 0;
dismissCountDown.value = showSelectionQueryBreakWarning.value ? dismissSecs.value : 0;
}
);
</script>
+7 -7
View File
@@ -7736,7 +7736,7 @@ class StoredWorkflow(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpd
order_by=lambda: -Workflow.id,
cascade_backrefs=False,
)
latest_workflow = relationship(
latest_workflow: Mapped["Workflow"] = relationship(
"Workflow",
post_update=True,
primaryjoin=(lambda: StoredWorkflow.latest_workflow_id == Workflow.id),
@@ -7854,7 +7854,7 @@ class StoredWorkflow(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpd
)
return bool(sa_session.scalar(stmt))
def copy_tags_from(self, target_user, source_workflow):
def copy_tags_from(self, target_user, source_workflow: "StoredWorkflow"):
# Override to only copy owner tags.
for src_swta in source_workflow.owner_tags:
new_swta = src_swta.copy()
@@ -8027,7 +8027,7 @@ class Workflow(Base, Dictifiable, RepresentById):
"""
return self.top_level_workflow.stored_workflow
def copy(self, user=None):
def copy(self, user: User):
"""Copy a workflow for a new StoredWorkflow object.
Pass user if user-specific information needed.
@@ -8336,7 +8336,7 @@ class WorkflowStep(Base, RepresentById, UsesCreateAndUpdateTime):
break
return target_output
def copy_to(self, copied_step, step_mapping, user=None):
def copy_to(self, copied_step: "WorkflowStep", step_mapping: Dict[int, "WorkflowStep"], user: User):
copied_step.order_index = self.order_index
copied_step.type = self.type
copied_step.tool_id = self.tool_id
@@ -8368,10 +8368,10 @@ class WorkflowStep(Base, RepresentById, UsesCreateAndUpdateTime):
copied_step.subworkflow = subworkflow
copied_subworkflow = subworkflow
else:
# Can this even happen, building a workflow with a subworkflow you don't own ?
copied_subworkflow = subworkflow.copy()
# Importing a shared workflow with a subworkflow step
copied_subworkflow = subworkflow.copy(user=user)
stored_workflow = StoredWorkflow(
user, name=copied_subworkflow.name, workflow=copied_subworkflow, hidden=True
user=user, name=copied_subworkflow.name, workflow=copied_subworkflow, hidden=True
)
copied_subworkflow.stored_workflow = stored_workflow
copied_step.subworkflow = copied_subworkflow
+1 -1
View File
@@ -973,7 +973,7 @@ class UsesStoredWorkflowMixin(SharableItemSecurityMixin, UsesAnnotations):
except exceptions.ToolMissingException:
pass
def _import_shared_workflow(self, trans, stored):
def _import_shared_workflow(self, trans, stored: model.StoredWorkflow):
"""Imports a shared workflow"""
# Copy workflow.
imported_stored = model.StoredWorkflow()
+1 -1
View File
@@ -1,5 +1,5 @@
[pytest]
addopts = --doctest-continue-on-failure --verbosity=1
addopts = --doctest-continue-on-failure --verbosity=1 --showlocals
asyncio_mode = auto
log_level = DEBUG
# Install pytest-memray and set memray to true here to enable memory profiling of tests
@@ -46,6 +46,6 @@ def test_singularity_container_test(tmp_path) -> None:
"singularity",
tmp_path,
)
assert "samtools:1.0--1" in results["passed"]
assert "pybigwig:0.3.22--py36h54a71a5_0" in results["passed"]
assert "yasm:1.3.0--0" in results["notest"]
assert "samtools:1.0--1" in results["passed"], results
assert "pybigwig:0.3.22--py36h54a71a5_0" in results["passed"], results
assert "yasm:1.3.0--0" in results["notest"], results