Skip to content

Commit c59b2a9

Browse files
add docstrings to extraction_summary and extract_workflow_from_history endpoints
1 parent 67dd718 commit c59b2a9

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

client/src/api/schema/schema.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,14 @@ export interface paths {
27642764
};
27652765
get?: never;
27662766
put?: never;
2767-
/** Extract a workflow from a history. */
2767+
/**
2768+
* Extract a workflow from a history.
2769+
* @description Extracts a workflow from a history based on the selected jobs and datasets provided in the payload.
2770+
*
2771+
* Takes the job IDs, dataset HIDs, and dataset collection HIDs along with a workflow name,
2772+
* and constructs a new stored workflow capturing the provenance of those steps.
2773+
* Returns the ID of the newly created workflow.
2774+
*/
27682775
post: operations["extract_workflow_from_history_api_histories__history_id__extract_workflow_post"];
27692776
delete?: never;
27702777
options?: never;
@@ -2779,7 +2786,14 @@ export interface paths {
27792786
path?: never;
27802787
cookie?: never;
27812788
};
2782-
/** Return jobs and dataset summary for extracting a workflow from a history. */
2789+
/**
2790+
* Return jobs and dataset summary for extracting a workflow from a history.
2791+
* @description Creates a summary of the jobs, datasets and dataset collections in the history
2792+
* that can be used to extract a workflow from the history.
2793+
*
2794+
* Returns the list of jobs with their associated input/output datasets, plus any
2795+
* implicit collections, which can be used to select steps for workflow extraction.
2796+
*/
27832797
get: operations["extraction_summary_api_histories__history_id__extraction_summary_get"];
27842798
put?: never;
27852799
post?: never;

lib/galaxy/webapps/galaxy/api/histories.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,12 @@ def extraction_summary(
796796
history_id: HistoryIDPathParam,
797797
trans: ProvidesHistoryContext = DependsOnTrans,
798798
) -> WorkflowExtractionSummary:
799+
"""Creates a summary of the jobs, datasets and dataset collections in the history
800+
that can be used to extract a workflow from the history.
801+
802+
Returns the list of jobs with their associated input/output datasets, plus any
803+
implicit collections, which can be used to select steps for workflow extraction.
804+
"""
799805
return self.service.create_workflow_extraction_summary(history_id, trans)
800806

801807
@router.post(
@@ -808,6 +814,12 @@ def extract_workflow_from_history(
808814
payload: WorkflowExtractionPayload = Body(...),
809815
trans: ProvidesHistoryContext = DependsOnTrans,
810816
) -> WorkflowExtractionResult:
817+
"""Extracts a workflow from a history based on the selected jobs and datasets provided in the payload.
818+
819+
Takes the job IDs, dataset HIDs, and dataset collection HIDs along with a workflow name,
820+
and constructs a new stored workflow capturing the provenance of those steps.
821+
Returns the ID of the newly created workflow.
822+
"""
811823
history = self.service.manager.get_accessible(history_id, trans.user, current_history=trans.history)
812824

813825
stored_workflow = extract_workflow(

0 commit comments

Comments
 (0)