Skip to content

Commit

Permalink
WIP: handle mapped over jobs in workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Nov 30, 2023
1 parent 2d7b0d6 commit b84b494
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/galaxy/managers/markdown_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class DynamicArguments:
"workflow_display": ["workflow_id", "workflow_checkpoint"],
"workflow_license": ["workflow_id"],
"workflow_image": ["workflow_id", "size", "workflow_checkpoint"],
"job_metrics": ["step", "job_id"],
"job_parameters": ["step", "job_id"],
"tool_stderr": ["step", "job_id"],
"tool_stdout": ["step", "job_id"],
"job_metrics": ["step", "job_id", "implicit_collection_jobs_id"],
"job_parameters": ["step", "job_id", "implicit_collection_jobs_id"],
"tool_stderr": ["step", "job_id", "implicit_collection_jobs_id"],
"tool_stdout": ["step", "job_id", "implicit_collection_jobs_id"],
"generate_galaxy_version": [],
"generate_time": [],
"instance_access_link": [],
Expand Down
12 changes: 8 additions & 4 deletions lib/galaxy/managers/markdown_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
SIZE_PATTERN = re.compile(r"size=\s*%s\s*" % ARG_VAL_CAPTURED_REGEX)
# STEP_OUTPUT_LABEL_PATTERN = re.compile(r'step_output=([\w_\-]+)/([\w_\-]+)')
UNENCODED_ID_PATTERN = re.compile(
r"(history_id|workflow_id|history_dataset_id|history_dataset_collection_id|job_id|invocation_id)=([\d]+)"
r"(history_id|workflow_id|history_dataset_id|history_dataset_collection_id|job_id|implicit_collection_jobs|invocation_id)=([\d]+)"
)
ENCODED_ID_PATTERN = re.compile(
r"(history_id|workflow_id|history_dataset_id|history_dataset_collection_id|job_id|invocation_id)=([a-z0-9]+)"
r"(history_id|workflow_id|history_dataset_id|history_dataset_collection_id|job_id|implicit_collection_jobs|invocation_id)=([a-z0-9]+)"
)
INVOCATION_SECTION_MARKDOWN_CONTAINER_LINE_PATTERN = re.compile(r"```\s*galaxy\s*")
GALAXY_FENCED_BLOCK = re.compile(r"^```\s*galaxy\s*(.*?)^```", re.MULTILINE ^ re.DOTALL)
Expand Down Expand Up @@ -933,9 +933,13 @@ def find_non_empty_group(match):
elif step_match:
target_match = step_match
name = find_non_empty_group(target_match)
ref_object_type = "job"
invocation_step = invocation.step_invocation_for_label(name)
ref_object = invocation_step and invocation_step.job
if invocation_step and invocation_step.job:
ref_object_type = "job"
ref_object = invocation_step.job
elif invocation_step and invocation_step.implicit_collection_jobs:
ref_object_type = "implicit_collection_jobs"
ref_object = invocation_step.implicit_collection_jobs
else:
target_match = None
ref_object = None
Expand Down

0 comments on commit b84b494

Please sign in to comment.