Skip to content

Commit

Permalink
Merge branch 'release_23.1' into release_23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Dec 1, 2023
2 parents 271bc18 + 98dc9c9 commit e3d1800
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
16 changes: 16 additions & 0 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2590,6 +2590,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down Expand Up @@ -4415,6 +4417,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down Expand Up @@ -4633,6 +4637,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down Expand Up @@ -7540,6 +7546,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
/** Elements */
elements: (
| (
Expand Down Expand Up @@ -8135,6 +8143,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down Expand Up @@ -8193,6 +8203,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down Expand Up @@ -8646,6 +8658,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down Expand Up @@ -9496,6 +9510,8 @@ export interface components {
* @default false
*/
deferred?: boolean;
/** Description */
description?: string;
elements_from?: components["schemas"]["ElementsFromType"];
/**
* Ext
Expand Down
9 changes: 8 additions & 1 deletion client/src/components/History/Content/ContentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,14 @@ export default {
const url = entryPointsForHda[0].target;
window.open(url, "_blank");
} else {
this.$router.push(this.itemUrls.display, { title: this.name });
// vue-router 4 supports a native force push with clean URLs,
// but we're using a workaround with a __vkey__ bit as a workaround
// Only conditionally force to keep urls clean most of the time.
if (this.$router.currentRoute.path === this.itemUrls.display) {
this.$router.push(this.itemUrls.display, { title: this.name, force: true });
} else {
this.$router.push(this.itemUrls.display, { title: this.name });
}
}
},
onDelete(recursive = false) {
Expand Down
1 change: 1 addition & 0 deletions lib/galaxy/schema/fetch_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class BaseDataElement(FetchBaseModel):
items_from: Optional[ElementsFromType] = Field(alias="elements_from")
collection_type: Optional[str]
MD5: Optional[str]
description: Optional[str]

class Config:
# reject unknown extra attributes
Expand Down
35 changes: 34 additions & 1 deletion test/unit/webapps/api/test_fetch_schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from copy import deepcopy
from json import dumps

import yaml

from galaxy.schema.fetch_data import (
FetchDataPayload,
FileDataElement,
Expand Down Expand Up @@ -121,6 +123,33 @@
"auto_decompress": True,
}

library_payload = yaml.safe_load(
"""
destination:
type: library
name: "Cool Training Library"
description: "A longer description."
synopsis: "Optional - does anyone ever set this?"
items:
- name: "Test Folder 1"
description: "Description of what is in Test Folder 1" # Only populated with new API.
items:
- url: https://raw.githubusercontent.com/eteriSokhoyan/test-data/master/cliques-high-representatives.fa
src: url
ext: fasta
info: "A cool longer description." # Only populated with new API.
dbkey: "hg19" # Only populated with new API.
- name: "Test data segmentation-fold"
items:
- url: https://raw.githubusercontent.com/yhoogstrate/segmentation-fold/55d0bb28b01e613844ca35cf21fa41379fd72770/scripts/energy-estimation-utility/tests/test-data/workflow-test_cd-box_kturns.xml
name: workflow-test_cd-box_kturns.xml # Only populated with new API.
info: Downloaded from https://raw.githubusercontent.com/yhoogstrate/segmentation-fold/55d0bb28b01e613844ca35cf21fa41379fd72770/scripts/energy-estimation-utility/tests/test-data/workflow-test_cd-box_kturns.xml
src: url
ext: xml
"""
)


def test_fetch_data_schema():
payload = FetchDataPayload(**example_payload)
Expand Down Expand Up @@ -156,5 +185,9 @@ def test_recursive_archive_form_like_data():
FetchDataPayload(**payload)


def test_nested_elemet_regression():
def test_nested_element_regression():
FetchDataPayload(**nested_element_regression_payload)


def test_library_payload():
FetchDataPayload(targets=[library_payload], history_id=HISTORY_ID)

0 comments on commit e3d1800

Please sign in to comment.