Skip to content

Commit

Permalink
Merge pull request #16768 from mvdbeek/dev
Browse files Browse the repository at this point in the history
Merge release_23.1 into dev
  • Loading branch information
mvdbeek authored Oct 6, 2023
2 parents bdcd16e + d7f0f15 commit 9f3c08d
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Form/Elements/FormSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ onMounted(() => {
v-if="hasOptions"
:id="id"
v-model="currentValue"
:allow-empty="multiple && optional"
:allow-empty="optional"
:aria-expanded="ariaExpanded"
:close-on-select="!multiple"
:disabled="disabled"
Expand Down
34 changes: 29 additions & 5 deletions client/src/components/Workflow/Editor/NodeOutput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ const visibleHint = computed(() => {
}
});
const label = computed(() => {
const activeLabel = workflowOutput.value?.label || props.output.name;
return `${activeLabel} (${extensions.value.join(", ")})`;
return workflowOutput.value?.label || props.output.name;
});
const rowClass = computed(() => {
const classes = ["form-row", "dataRow", "output-data-row"];
if ("valid" in props.output && props.output?.valid === false) {
Expand Down Expand Up @@ -153,7 +153,7 @@ function onToggleActive() {
(workflowOutput) => workflowOutput.output_name !== output.value.name
);
} else {
stepWorkflowOutputs.push({ output_name: output.value.name });
stepWorkflowOutputs.push({ output_name: output.value.name, label: output.value.name });
}
stepStore.updateStep({ ...step, workflow_outputs: stepWorkflowOutputs });
}
Expand Down Expand Up @@ -290,6 +290,22 @@ const outputDetails = computed(() => {
return outputType;
});
const isDuplicateLabel = computed(() => {
const duplicateLabels = stepStore.duplicateLabels;
return Boolean(label.value && duplicateLabels.has(label.value));
});
const labelClass = computed(() => {
if (isDuplicateLabel.value) {
return "alert-info";
}
return null;
});
const labelToolTipTitle = computed(() => {
return `Output label '${workflowOutput.value?.label}' is not unique`;
});
onBeforeUnmount(() => {
stateStore.deleteOutputTerminalPosition(props.stepId, props.output.name);
});
Expand Down Expand Up @@ -327,8 +343,16 @@ const removeTagsAction = computed(() => {
<FontAwesomeIcon v-if="isVisible" fixed-width icon="fa-eye" />
<FontAwesomeIcon v-else fixed-width icon="fa-eye-slash" />
</button>
<span class="ml-1">
{{ label }}
<span>
<span
v-b-tooltip
:title="labelToolTipTitle"
class="d-inline-block rounded"
:class="labelClass"
:disabled="!isDuplicateLabel">
{{ label }}
</span>
<span> ({{ extensions.join(", ") }}) </span>
</span>
</div>

Expand Down
17 changes: 17 additions & 0 deletions client/src/stores/workflowStepStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,23 @@ export const useWorkflowStepStore = (workflowId: string) => {
});
return workflowOutputs;
},
duplicateLabels(state: State) {
const duplicateLabels: Set<string> = new Set();
const labels: Set<string> = new Set();
Object.values(state.steps).forEach((step) => {
if (step.workflow_outputs?.length) {
step.workflow_outputs.forEach((workflowOutput) => {
if (workflowOutput.label) {
if (labels.has(workflowOutput.label)) {
duplicateLabels.add(workflowOutput.label);
}
labels.add(workflowOutput.label);
}
});
}
});
return duplicateLabels;
},
},
actions: {
addStep(newStep: NewStep): Step {
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/navigation/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ workflow_editor:
clone: '${_} .node-clone'
output_data_row:
type: xpath
selector: '//div[contains(@class, "output-data-row") and contains(string(), "${output_name} (${extension})")]'
selector: '//div[@data-output-name="${output_name}"]//span[contains(text(), "(${extension})")]'
output_terminal: "${_} [output-name='${name}']"
input_terminal: "${_} [input-name='${name}']"
input_mapping_icon: "${_} [input-name='${name}'].mapped-over"
Expand Down
2 changes: 2 additions & 0 deletions doc/source/releases/23.1_announce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ Deprecation Notices

The first Galaxy release of 2024 (24.0) will drop support for Python 3.7, which has already reached end of life (EOL).

The **api/search** API endpoint is deprecated and will be removed in the next release.

Release Notes
===========================================================

Expand Down
6 changes: 4 additions & 2 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8363,7 +8363,7 @@ def to_dict(self, view="collection", value_mapper=None, step_details=False, lega
# TODO: does this work correctly if outputs are mapped over?
label = output_assoc.workflow_output.label
if not label:
continue
label = f"{output_assoc.workflow_output.output_name} (Step {output_assoc.workflow_output.workflow_step.order_index + 1})"

outputs[label] = {
"src": "hda",
Expand All @@ -8375,7 +8375,9 @@ def to_dict(self, view="collection", value_mapper=None, step_details=False, lega
for output_assoc in self.output_dataset_collections:
label = output_assoc.workflow_output.label
if not label:
continue
label = (
label
) = f"{output_assoc.workflow_output.output_name} (Step {output_assoc.workflow_output.workflow_step.order_index + 1})"

output_collections[label] = {
"src": "hdca",
Expand Down
3 changes: 3 additions & 0 deletions tools/filters/CreateInterval.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<tool id="createInterval" name="Create single interval" version="1.0.0">
<description>as a new dataset</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
</requirements>
<command>
perl '$__tool_directory__/CreateInterval.pl' '$chrom' $start $end '$name' $strand '$out_file1'
</command>
Expand Down
3 changes: 3 additions & 0 deletions tools/filters/changeCase.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<tool id="ChangeCase" name="Change Case" version="1.0.0">
<description> of selected columns</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
</requirements>
<stdio>
<exit_code range="1:" err_level="fatal" />
</stdio>
Expand Down
3 changes: 3 additions & 0 deletions tools/filters/commWrapper.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<tool id="Comm1" name="Find Similarities and Differences" version="1.0.0">
<description>between two datasets</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
</requirements>
<edam_operations>
<edam_operation>operation_3695</edam_operation>
</edam_operations>
Expand Down
3 changes: 3 additions & 0 deletions tools/filters/condense_characters.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<tool id="Condense characters1" name="Condense" version="1.0.0">
<description>consecutive characters</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
</requirements>
<command><![CDATA[
perl '$__tool_directory__/condense_characters.pl'
'$input'
Expand Down
3 changes: 3 additions & 0 deletions tools/filters/cutWrapper.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<tool id="Cut1" name="Cut" version="1.0.2">
<description>columns from a table</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
</requirements>
<edam_operations>
<edam_operation>operation_3695</edam_operation>
</edam_operations>
Expand Down
4 changes: 4 additions & 0 deletions tools/filters/pasteWrapper.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<tool id="Paste1" name="Paste" version="1.0.0">
<description>two files side by side</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
<requirement type="package" version="8.31">coreutils</requirement>
</requirements>
<command>perl '$__tool_directory__/pasteWrapper.pl' '$input1' '$input2' $delimiter '$out_file1'</command>
<inputs>
<!-- <display>paste $input1 and $input2 using $delimiter as delimiter</display> -->
Expand Down
3 changes: 3 additions & 0 deletions tools/filters/remove_beginning.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<tool id="Remove beginning1" name="Remove beginning" version="1.0.0">
<description>of a file</description>
<requirements>
<requirement type="package" version="5.26">perl</requirement>
</requirements>
<command>
perl '$__tool_directory__/remove_beginning.pl' '$input' $num_lines '$out_file1'
</command>
Expand Down

0 comments on commit 9f3c08d

Please sign in to comment.