Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 23.0 into dev #15902

Merged
merged 69 commits into from Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
dd553e8
Fix maintenance script bug
jdavcs Dec 16, 2022
d62235f
Merge pull request #15222 from jdavcs/release_22.01_table_attr_err
jmchilton Dec 17, 2022
92597e4
xsd: add forgotten comment attribute
bernt-matthias Mar 14, 2023
90b3559
Doc text improvement
bernt-matthias Mar 14, 2023
b7df527
Display output dataset / collection type and map over on hover
mvdbeek Mar 17, 2023
b0cbb8a
Pick concrete collection type if input collection type is any
mvdbeek Mar 17, 2023
8b31087
Use textual description of collection type
mvdbeek Mar 19, 2023
e2d0ef2
add security checks to page and visualzation APIs
martenson Mar 20, 2023
3fc4abf
Test disconnecting output doesn't change map over
mvdbeek Mar 20, 2023
94123d5
Don't lose step map over when disconnecting output
mvdbeek Mar 20, 2023
5141a0f
Merge pull request #15826 from martenson/release_22.01
martenson Mar 20, 2023
14eaee9
Rebuild terminal when step changes
mvdbeek Mar 20, 2023
d7b173f
Add selenium test for showing outpu type info
mvdbeek Mar 20, 2023
3c6f93d
Partially fix https://github.com/galaxyproject/galaxy/issues/15723
anuprulez Mar 22, 2023
92cc29e
run prettier
ElectronicBlueberry Mar 24, 2023
10ce335
add thin wrapper to Recommendations
ElectronicBlueberry Mar 27, 2023
6f6e375
Merge pull request #15791 from bernt-matthias/topic/has_n_columns_com…
dannon Mar 27, 2023
f959f05
Merge remote-tracking branch 'upstream/release_22.01' into release_22.05
dannon Mar 27, 2023
caaa3e4
Joinedload replaces eagerload 22.05 forward
dannon Mar 27, 2023
82d5b4e
Update Github RSA key in circle ci configuration -
jmchilton Mar 24, 2023
9b1301e
Apply black to forward merge
dannon Mar 27, 2023
cc373c7
Cast job_key to string
mvdbeek Feb 14, 2023
d46f3ff
Merge pull request #15842 from ElectronicBlueberry/backport-patch-3
mvdbeek Mar 28, 2023
5300b13
Merge pull request #15850 from dannon/release_22.05
dannon Mar 28, 2023
a37f902
Update Gravity to 1.0.2
natefoo Mar 28, 2023
de030cd
Merge pull request #15862 from natefoo/gravity-1.0.2
natefoo Mar 28, 2023
b184e11
ro-crate metadata fixes based on bugs
pauldg Mar 23, 2023
e2882dc
Changes to tests according to ro-crate
pauldg Mar 23, 2023
9105ba3
formatting
pauldg Mar 23, 2023
01782c0
Change which parameters are included.
pauldg Mar 27, 2023
54186b1
mypy changes
pauldg Mar 29, 2023
793b358
changed merge collections conflict param in test
pauldg Mar 29, 2023
4118d27
Removed unused import
pauldg Mar 29, 2023
90cc518
fixed more formatting issues
pauldg Mar 29, 2023
f4143b0
return None if no user
tchaussepied Mar 28, 2023
2180c38
Move optional check to output terminal constructor
mvdbeek Mar 29, 2023
9422a3a
Disable galaxy virtual env for aws batch job runner. This was causin…
dannon Mar 29, 2023
307c637
Merge pull request #15823 from mvdbeek/fix_wrong_map_over
dannon Mar 29, 2023
4c19636
Merge pull request #15866 from mvdbeek/ananonymous_vault_fix
martenson Mar 29, 2023
ab9377d
add test case for https://github.com/galaxyproject/tools-iuc/issues/5163
bernt-matthias Mar 29, 2023
66ed006
Minimal fix for https://github.com/galaxyproject/tools-iuc/issues/5163
mvdbeek Mar 30, 2023
aca7ffa
Merge pull request #15871 from mvdbeek/topic/is_of_type
mvdbeek Mar 30, 2023
57cd5ac
Merge pull request #15869 from dannon/fix-aws-batch
mvdbeek Mar 30, 2023
98c71d1
Update 1 test/unit/data/model/test_model_store.py
pauldg Mar 30, 2023
2146f7d
Update 2 test/unit/data/model/test_model_store.py
pauldg Mar 30, 2023
e7b70f5
removed unnecessary str casting
pauldg Mar 30, 2023
d0551dd
Merge pull request #15856 from cat-bro/cherry-pick-job-files-api-fix-…
mvdbeek Mar 30, 2023
d22dc4a
Make dragImage transparent
mvdbeek Feb 16, 2023
682da9f
Remove IDs from error messages
davelopez Mar 31, 2023
051c922
Merge pull request #15593 from mvdbeek/make_drag_icon_transparent
dannon Mar 31, 2023
7d9cbc7
Merge pull request #15841 from pauldg/fix_rocrate_metadata
mvdbeek Mar 31, 2023
7f425d1
List tags in /api/dataset_collections/{hdca_id}/contents/{parent_id}
mvdbeek Mar 31, 2023
905e89f
Merge pull request #15883 from mvdbeek/tags_in_collection_view
martenson Mar 31, 2023
42c9aff
Merge pull request #15882 from davelopez/22.05_fix_ids_on_errors
mvdbeek Apr 3, 2023
b855a81
increase webhook z-index
ElectronicBlueberry Apr 3, 2023
bee3d2e
Merge branch 'release_22.05' into release_23.0
nsoranzo Apr 3, 2023
e81fc67
cached_explicit_singularity: copy container description
bernt-matthias Apr 4, 2023
8b715de
Fix extension lost after cleaning filename
davelopez Apr 4, 2023
d5bc7ff
Guess mime type for short term storage files
davelopez Apr 4, 2023
f76d894
Merge pull request #15893 from bernt-matthias/fix/cached_explicit_sin…
mvdbeek Apr 4, 2023
2acf212
Merge pull request #15891 from ElectronicBlueberry/webhook-z-index
dannon Apr 4, 2023
a99c137
Merge branch 'release_22.01' into merge/22.01_22.05
bernt-matthias Apr 4, 2023
0a04397
Add unit test for model_store_storage_target
davelopez Apr 4, 2023
0698979
Merge pull request #15894 from davelopez/23.0_fix_export_archive_exte…
jmchilton Apr 4, 2023
f420a61
Merge pull request #15896 from bernt-matthias/merge/22.01_22.05
mvdbeek Apr 5, 2023
7452b2e
Merge branch 'release_22.05' into release_23.0
nsoranzo Apr 5, 2023
c655360
Merge branch 'release_23.0' into dev
nsoranzo Apr 5, 2023
d31a347
Fix comparison-overlap mypy error
nsoranzo Apr 5, 2023
0804f0e
Fix types in terminal tests
mvdbeek Apr 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions client/src/components/Workflow/Editor/Draggable.vue
Expand Up @@ -28,6 +28,7 @@ const props = defineProps({

const emit = defineEmits(["mousedown", "mouseup", "move", "dragstart", "start", "stop"]);

let dragImg: HTMLImageElement | undefined;
const draggable = ref();
const size = reactive(useAnimationFrameSize(draggable));
const transform: Ref<ZoomTransform> | undefined = inject("transform");
Expand All @@ -40,8 +41,16 @@ const onStart = (position: Position, event: DragEvent) => {
emit("start");
emit("mousedown", event);
if (event.type == "dragstart") {
dragImg = document.createElement("img");
dragImg.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
document.body.appendChild(dragImg);
// I guess better than copy ?
event.dataTransfer!.effectAllowed = "link";
try {
event.dataTransfer!.setDragImage(dragImg, 0, 0);
} catch (e) {
console.error(e);
}
if (props.dragData) {
event.dataTransfer!.setData("text/plain", JSON.stringify(props.dragData));
}
Expand All @@ -66,6 +75,9 @@ const onMove = (position: Position, event: DragEvent) => {
};

const onEnd = (position: Position, event: DragEvent) => {
if (dragImg) {
document.body.removeChild(dragImg);
}
emit("stop");
emit("mouseup");
};
Expand Down
20 changes: 8 additions & 12 deletions client/src/components/Workflow/Editor/Node.vue
Expand Up @@ -49,11 +49,13 @@
triggers="hover"
placement="bottom"
:show.sync="popoverShow">
<Recommendations
v-if="popoverShow"
:step-id="id"
:datatypes-mapper="datatypesMapper"
@onCreate="onCreate" />
<div>
<Recommendations
v-if="popoverShow"
:step-id="id"
:datatypes-mapper="datatypesMapper"
@onCreate="onCreate" />
</div>
</b-popover>
</b-button-group>
<i :class="iconClass" />
Expand Down Expand Up @@ -232,13 +234,7 @@ const invalidOutputs = computed(() => {
});
});
const outputs = computed(() => {
let stepOutputs = props.step.outputs;
if (props.step.when) {
stepOutputs = stepOutputs.map((output) => {
return { ...output, optional: true };
});
}
return [...stepOutputs, ...invalidOutputs.value];
return [...props.step.outputs, ...invalidOutputs.value];
});

function onDragConnector(dragPosition: TerminalPosition, terminal: OutputTerminals) {
Expand Down
46 changes: 46 additions & 0 deletions client/src/components/Workflow/Editor/NodeOutput.vue
Expand Up @@ -15,6 +15,7 @@ import {
} from "@/stores/workflowStepStore";
import { assertDefined, ensureDefined } from "@/utils/assertions";
import type { UseScrollReturn } from "@vueuse/core";
import { NULL_COLLECTION_TYPE_DESCRIPTION, type CollectionTypeDescriptor } from "./modules/collectionTypeDescription";

const props = defineProps<{
output: OutputTerminalSource;
Expand Down Expand Up @@ -204,6 +205,50 @@ const terminalClass = computed(() => {
return cls;
});

function collectionTypeToDescription(collectionTypeDescription: CollectionTypeDescriptor) {
let collectionDescription = collectionTypeDescription.collectionType;
if (
collectionTypeDescription &&
collectionTypeDescription.isCollection &&
collectionTypeDescription.collectionType
) {
// we'll give a prettier label to the must common nested lists
switch (collectionTypeDescription.collectionType) {
case "list:paired": {
collectionDescription = "list of pairs dataset collection";
break;
}
case "list:list": {
collectionDescription = "list of lists dataset collection";
break;
}
default: {
if (collectionTypeDescription.rank > 1) {
collectionDescription = `dataset collection with ${collectionTypeDescription.rank} levels of nesting`;
}
break;
}
}
}
return collectionDescription;
}

const outputDetails = computed(() => {
let collectionType = "collectionType" in terminal.value && terminal.value.collectionType;
const outputType =
collectionType && collectionType.isCollection && collectionType.collectionType
? `output is ${collectionTypeToDescription(collectionType)}`
: `output is dataset`;
if (isMultiple.value) {
if (!collectionType) {
collectionType = NULL_COLLECTION_TYPE_DESCRIPTION;
}
const effectiveOutputType = terminal.value.mapOver.append(collectionType);
return `${outputType} and mapped-over to produce a ${collectionTypeToDescription(effectiveOutputType)} `;
}
return outputType;
});

onBeforeUnmount(() => {
stateStore.deleteOutputTerminalPosition(props.stepId, props.output.name);
});
Expand Down Expand Up @@ -245,6 +290,7 @@ onBeforeUnmount(() => {
@move="onMove">
<div
ref="icon"
v-b-tooltip.hover="outputDetails"
class="icon prevent-zoom"
tabindex="0"
:aria-label="`Connect output ${output.name} to input. Press space to see a list of available inputs`"
Expand Down
Expand Up @@ -11,10 +11,11 @@ export function useTerminal(
) {
const terminal: Ref<ReturnType<typeof terminalFactory> | null> = ref(null);
const stepStore = useWorkflowStepStore();
const step = computed(() => stepStore.getStep(stepId.value));
const isMappedOver = computed(() => stepStore.stepMapOver[stepId.value]?.isCollection ?? false);

watch(
[stepId, terminalSource, datatypesMapper],
[step, terminalSource, datatypesMapper],
() => {
// rebuild terminal if any of the tracked dependencies change
const newTerminal = terminalFactory(stepId.value, terminalSource.value, datatypesMapper.value);
Expand Down
12 changes: 12 additions & 0 deletions client/src/components/Workflow/Editor/modules/terminals.test.ts
Expand Up @@ -380,6 +380,18 @@ describe("canAccept", () => {
dataInTwo.disconnect(dataOut);
expect(dataIn.mapOver).toEqual(NULL_COLLECTION_TYPE_DESCRIPTION);
});
it("maintains step map over state when disconnecting output", () => {
const listListOut = terminals["list:list input"]?.["output"] as OutputCollectionTerminal;
const filterFailedInput = terminals["filter_failed"]?.["input"] as InputCollectionTerminal;
const filterFailedOutput = terminals["filter_failed"]?.["output"] as OutputCollectionTerminal;
const dataIn = terminals["simple data"]?.["input"] as InputTerminal;
filterFailedInput.connect(listListOut);
dataIn.connect(filterFailedOutput);
expect(filterFailedInput.isMappedOver()).toBe(true);
expect(stepStore.stepMapOver[filterFailedOutput.stepId]?.isCollection).toBe(true);
dataIn.disconnect(filterFailedOutput);
expect(stepStore.stepMapOver[filterFailedOutput.stepId]?.isCollection).toBe(true);
});
it("rejects connecting incompatible connection types", () => {
const pairedOut = terminals["paired input"]!["output"] as OutputCollectionTerminal;
const collectionIn = terminals["list collection input"]!["input1"] as InputCollectionTerminal;
Expand Down
20 changes: 15 additions & 5 deletions client/src/components/Workflow/Editor/modules/terminals.ts
Expand Up @@ -239,7 +239,12 @@ class BaseInputTerminal extends Terminal {
const terminalSource = step.outputs[0];
if (terminalSource) {
const terminal = terminalFactory(step.id, terminalSource, this.datatypesMapper);
// drop mapping restrictions
terminal.resetMappingIfNeeded();
// re-establish map over through inputs
step.inputs.forEach((input) => {
terminalFactory(step.id, input, this.datatypesMapper).getStepMapOver();
});
}
} else {
console.error(`Invalid step. Could not fine step with id ${stepId} in store.`);
Expand Down Expand Up @@ -359,9 +364,6 @@ class BaseInputTerminal extends Terminal {
});
}
const postJobActionKey = `ChangeDatatypeAction${connection.output.name}`;
if (outputStep.when) {
terminalSource = { ...terminalSource, optional: true };
}
if (
"extensions" in terminalSource &&
outputStep.post_job_actions &&
Expand Down Expand Up @@ -626,7 +628,7 @@ class BaseOutputTerminal extends Terminal {
constructor(attr: BaseOutputTerminalArgs) {
super(attr);
this.datatypes = attr.datatypes;
this.optional = attr.optional;
this.optional = attr.optional || Boolean(this.stepStore.getStep(this.stepId)?.when);
this.terminalType = "output";
}
getConnectedTerminals(): InputTerminalsAndInvalid[] {
Expand Down Expand Up @@ -743,7 +745,15 @@ export class OutputCollectionTerminal extends BaseOutputTerminal {
otherCollectionType.canMapOver(collectionType)
);
if (connectedCollectionType) {
return connectedCollectionType;
if (connectedCollectionType.collectionType === "any") {
// if the input collection type is "any" this output's collection type
// is exactly the same as the connected output
return otherCollectionType;
} else {
// else we pick the matching input collection type
// so that the map over logic applies correctly
return connectedCollectionType;
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions client/src/schema/schema.ts
Expand Up @@ -3767,6 +3767,8 @@ export interface components {
* @description The current state of this dataset.
*/
state: components["schemas"]["galaxy__model__Dataset__states"];
/** Tags */
tags: string[];
};
/**
* HDASummary
Expand Down
1 change: 1 addition & 0 deletions client/src/utils/navigation/navigation.yml
Expand Up @@ -11,6 +11,7 @@ _: # global stuff
selectors:
editable_text: '.editable-text'
tooltip_balloon: '.tooltip'
tooltip_inner: .tooltip-inner
left_panel_drag: '#left > .unified-panel-footer > .drag'
left_panel_collapse: '#left > .unified-panel-footer > .panel-collapse'
right_panel_drag: '#right > .unified-panel-footer > .drag'
Expand Down
6 changes: 3 additions & 3 deletions config/plugins/webhooks/demo/search/styles.css
Expand Up @@ -4,7 +4,7 @@

.search-screen {
position: fixed;
z-index: 202;
z-index: 5100;
width:100%;
height:100%;
display:none;
Expand All @@ -15,7 +15,7 @@
top:0;
left:0;
background: rgba(224, 224, 224, 0.75);
z-index: 201;
z-index: 5000;
width:100%;
height:100%;
display:none;
Expand Down Expand Up @@ -64,7 +64,7 @@
position: fixed;
top: 34px;
width: 100%;
z-index: 203;
z-index: 5200;
}

.txtbx-search-data {
Expand Down
6 changes: 3 additions & 3 deletions config/plugins/webhooks/gtn/styles.css
@@ -1,6 +1,6 @@
#gtn-screen {
position: fixed;
z-index: 202;
z-index: 5100;
width:100%;
height:100%;
}
Expand All @@ -10,7 +10,7 @@
top:0;
left:0;
background: rgba(224, 224, 224, 0.75);
z-index: 201;
z-index: 5000;
width:100%;
height:100%;
opacity: 2;
Expand All @@ -20,7 +20,7 @@
position: fixed;
height: 100%;
width: 100%;
z-index: 203;
z-index: 5200;
display: flex;
justify-content: center;
flex-direction: column;
Expand Down
6 changes: 3 additions & 3 deletions config/plugins/webhooks/news/styles.css
@@ -1,6 +1,6 @@
#news-screen {
position: fixed;
z-index: 202;
z-index: 5100;
width:100%;
height:100%;
}
Expand All @@ -10,7 +10,7 @@
top:0;
left:0;
background: rgba(224, 224, 224, 0.75);
z-index: 201;
z-index: 5000;
width:100%;
height:100%;
opacity: 2;
Expand All @@ -20,7 +20,7 @@
position: fixed;
height: 100%;
width: 100%;
z-index: 203;
z-index: 5200;
display: flex;
justify-content: center;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/pinned-requirements.txt
Expand Up @@ -73,7 +73,7 @@ fsspec==2023.1.0 ; python_version >= "3.7" and python_version < "3.12"
future==0.18.3 ; python_version >= "3.7" and python_version < "3.12"
galaxy-sequence-utils==1.1.5 ; python_version >= "3.7" and python_version < "3.12"
galaxy2cwl==0.1.4 ; python_version >= "3.7" and python_version < "3.12"
gravity==1.0.1 ; python_version >= "3.7" and python_version < "3.12"
gravity==1.0.2 ; python_version >= "3.7" and python_version < "3.12"
greenlet==2.0.2 ; python_version >= "3.7" and platform_machine == "aarch64" and python_version < "3.12" or python_version >= "3.7" and platform_machine == "ppc64le" and python_version < "3.12" or python_version >= "3.7" and platform_machine == "x86_64" and python_version < "3.12" or python_version >= "3.7" and platform_machine == "amd64" and python_version < "3.12" or python_version >= "3.7" and platform_machine == "AMD64" and python_version < "3.12" or python_version >= "3.7" and platform_machine == "win32" and python_version < "3.12" or python_version >= "3.7" and platform_machine == "WIN32" and python_version < "3.12"
gunicorn==20.1.0 ; python_version >= "3.7" and python_version < "3.12"
gxformat2==0.17.0 ; python_version >= "3.7" and python_version < "3.12"
Expand Down
1 change: 1 addition & 0 deletions lib/galaxy/jobs/runners/aws.py
Expand Up @@ -597,6 +597,7 @@ def write_command(self, job_wrapper: "MinimalJobWrapper") -> str:
"exit_code_path": exit_code_path,
"working_directory": job_wrapper.working_directory,
"shell": job_wrapper.shell,
"galaxy_virtual_env": None,
}
job_file_contents = self.get_job_file(job_wrapper, **job_script_props)
self.write_executable_script(job_file, job_file_contents, job_io=job_wrapper.job_io)
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/managers/cloud.py
Expand Up @@ -293,7 +293,7 @@ def get(self, trans, history_id, bucket_name, objects, authz_id, input_args=None
incoming = params.__dict__
history = trans.sa_session.query(trans.app.model.History).get(history_id)
if not history:
raise ObjectNotFound(f"History with ID `{trans.app.security.encode_id(history_id)}` not found.")
raise ObjectNotFound("History with the ID provided was not found.")
output = trans.app.toolbox.get_tool("upload1").handle_input(trans, incoming, history=history)

job_errors = output.get("job_errors", [])
Expand Down Expand Up @@ -360,7 +360,7 @@ def send(self, trans, history_id, bucket_name, authz_id, dataset_ids=None, overw

history = trans.sa_session.query(trans.app.model.History).get(history_id)
if not history:
raise ObjectNotFound(f"History with ID `{trans.app.security.encode_id(history_id)}` not found.")
raise ObjectNotFound("History with the provided ID not found.")

sent = []
failed = []
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/managers/collections.py
Expand Up @@ -786,7 +786,7 @@ def __get_history_collection_instance(
instance_id
)
if not collection_instance:
raise RequestParameterInvalidException(f"History dataset collection association {id} not found")
raise RequestParameterInvalidException("History dataset collection association not found")
history = getattr(trans, "history", collection_instance.history)
if check_ownership:
self.history_manager.error_unless_owner(collection_instance.history, trans.user, current_history=history)
Expand All @@ -808,7 +808,7 @@ def __get_library_collection_instance(
instance_id
)
if not collection_instance:
raise RequestParameterInvalidException(f"Library dataset collection association {id} not found")
raise RequestParameterInvalidException("Library dataset collection association not found")
if check_accessible:
if not trans.app.security_agent.can_access_library_item(
trans.get_current_user_roles(), collection_instance, trans.user
Expand Down
1 change: 1 addition & 0 deletions lib/galaxy/managers/collections_util.py
Expand Up @@ -178,6 +178,7 @@ def dictify_element_reference(element, rank_fuzzy_counts=None, recursive=True, s
object_details["state"] = element_object.state
object_details["hda_ldda"] = "hda"
object_details["history_id"] = element_object.history_id
object_details["tags"] = element_object.make_tag_string_list()

dictified["object"] = object_details
else:
Expand Down
5 changes: 2 additions & 3 deletions lib/galaxy/managers/group_roles.py
Expand Up @@ -7,7 +7,6 @@
from galaxy import model
from galaxy.exceptions import ObjectNotFound
from galaxy.managers.context import ProvidesAppContext
from galaxy.schema.fields import DecodedDatabaseIdField
from galaxy.structured_app import MinimalManagerApp

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -63,13 +62,13 @@ def delete(self, trans: ProvidesAppContext, role_id: int, group_id: int) -> mode
def _get_group(self, trans: ProvidesAppContext, group_id: int) -> model.Group:
group = trans.sa_session.query(model.Group).get(group_id)
if not group:
raise ObjectNotFound(f"Group with id {DecodedDatabaseIdField.encode(group_id)} was not found.")
raise ObjectNotFound("Group with the id provided was not found.")
return group

def _get_role(self, trans: ProvidesAppContext, role_id: int) -> model.Role:
role = trans.sa_session.query(model.Role).get(role_id)
if not role:
raise ObjectNotFound(f"Role with id {DecodedDatabaseIdField.encode(role_id)} was not found.")
raise ObjectNotFound("Role with the id provided was not found.")
return role

def _get_group_role(
Expand Down