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

[WIP] Implement Sample Sheets #19305

Draft
wants to merge 37 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9a732bd
Refactor collection name input out of CollectionCreator.
jmchilton Dec 22, 2024
51a7db3
Refactor the source options out of collection creator.
jmchilton Dec 22, 2024
adcfed5
Refactor collection creator help out to simplify.
jmchilton Dec 22, 2024
0439a19
Refactor showing of extensions into own component.
jmchilton Dec 22, 2024
6eb9071
Refactor collection creator footer buttons into a component.
jmchilton Dec 22, 2024
d87b4d1
Refactor no items message out of collection creator for reuse.
jmchilton Dec 22, 2024
57f3dda
Don't show upload files option when selecting datasets.
jmchilton Dec 22, 2024
0fce0e4
Remove unused mixin...
jmchilton Dec 26, 2024
2947545
Comment out unused style...
jmchilton Dec 22, 2024
c7964cc
Refactor paired list creator for reuse, simplicity.
jmchilton Dec 21, 2024
c63f9bb
Simplification to paired list creator.
jmchilton Dec 21, 2024
29264f0
Migrate more of list collection builder out for reuse.
jmchilton Dec 21, 2024
e8bfa5b
Composable to simplify CollectionCreator, reuse.
jmchilton Jan 2, 2025
597c969
Code de-duplication for element filtering using composable.
jmchilton Dec 22, 2024
2dff9d3
Spelling fix in ListCollectionCreator.
jmchilton Dec 22, 2024
4f8bb21
Cleanup list:paired builder comments...
jmchilton Dec 22, 2024
6c04226
WIP: list collection builder should strip extensions...
jmchilton Dec 24, 2024
b491f5d
WIP: useCollectionCreator for de-duplication.
jmchilton Dec 24, 2024
7eb94e8
Build dataset collection input definition on the client.
jmchilton Dec 10, 2024
3ee50bd
Gray out repeat buttons that don't make sense.
jmchilton Dec 11, 2024
2d380a3
Reuse in FormData.vue.
jmchilton Dec 12, 2024
8e03bdb
Decompose FormRepeat for reuse.
jmchilton Dec 18, 2024
acdd31b
Event name: clicked-create -> on-create
jmchilton Dec 24, 2024
acdc57e
Reformat list collection creator...
jmchilton Dec 24, 2024
c313b07
Better typing around collection API calls in client.
jmchilton Dec 24, 2024
71c8cf8
Allow swapping handsontable with AG Grid Community in Rule Builder.
jmchilton Dec 13, 2024
fa8aeb2
New components for seeding the rule builder.
jmchilton Dec 15, 2024
b8b1dc9
Implement list building wizard.
jmchilton Dec 22, 2024
59f48cd
Activity for rule builder imports.
jmchilton Jan 2, 2025
d094a40
[WIP] Implement records - heterogenous dataset collections.
jmchilton May 18, 2020
4d508c5
DB migration for sample sheets.
jmchilton Dec 9, 2024
84e4351
Migrate doctests to unit tests.
jmchilton Dec 19, 2024
191e9c6
More dataset collection unit testing...
jmchilton Dec 21, 2024
3c99d18
Start trying to formalize dataset collection semantics.
jmchilton Dec 29, 2024
75d7abf
Implement paired_or_unpaired collections...
jmchilton Dec 30, 2024
d1b2db4
WIP: sample sheets...
jmchilton Dec 29, 2024
7992ca2
Rebuild schema for sample sheets.
jmchilton Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"@types/jest": "^29.5.12",
"@vueuse/core": "^10.5.0",
"@vueuse/math": "^10.9.0",
"ag-grid-community": "^30",
"ag-grid-vue": "^30",
"assert": "^2.1.0",
"axios": "^1.6.2",
"babel-runtime": "^6.26.0",
Expand Down Expand Up @@ -106,11 +108,13 @@
"vega-embed": "^6.26.0",
"vega-lite": "^5.21.0",
"vue": "^2.7.14",
"vue-class-component": "^7.2.6",
"vue-echarts": "^7.0.3",
"vue-infinite-scroll": "^2.0.2",
"vue-multiselect": "^2.1.7",
"vue-observe-visibility": "^1.0.0",
"vue-prismjs": "^1.2.0",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.6.5",
"vue-rx": "^6.2.0",
"vue-virtual-scroll-list": "^2.3.5",
Expand Down
51 changes: 50 additions & 1 deletion client/src/api/datasetCollections.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { type CollectionEntry, type DCESummary, GalaxyApi, type HDCADetailed, type HDCASummary, isHDCA } from "@/api";
import {
type CollectionEntry,
type components,
type DCESummary,
GalaxyApi,
type HDCADetailed,
type HDCASummary,
isHDCA,
} from "@/api";
import { rethrowSimple } from "@/utils/simple-error";

const DEFAULT_LIMIT = 50;
Expand Down Expand Up @@ -76,3 +84,44 @@ export async function fetchElementsFromCollection(params: {
limit: params.limit ?? DEFAULT_LIMIT,
});
}

export type CollectionElementIdentifiers = components["schemas"]["CollectionElementIdentifier"][];
export type CreateNewCollectionPayload = components["schemas"]["CreateNewCollectionPayload"];

export type NewCollectionOptions = {
name: string;
element_identifiers: CollectionElementIdentifiers;
collection_type: string;
history_id: string;
copy_elements?: boolean;
hide_source_items?: boolean;
};

export function createCollectionPayload(options: NewCollectionOptions): CreateNewCollectionPayload {
return {
name: options.name,
history_id: options.history_id,
element_identifiers: options.element_identifiers,
collection_type: options.collection_type,
instance_type: "history",
fields: "auto",
copy_elements: options.copy_elements || true,
hide_source_items: options.hide_source_items || true,
};
}

export async function createHistoryDatasetCollectionInstanceSimple(options: NewCollectionOptions) {
const payload = createCollectionPayload(options);
return createHistoryDatasetCollectionInstanceFull(payload);
}

export async function createHistoryDatasetCollectionInstanceFull(payload: CreateNewCollectionPayload) {
const { data, error } = await GalaxyApi().POST("/api/dataset_collections", {
body: payload,
});

if (error) {
rethrowSimple(error);
}
return data;
}
1 change: 1 addition & 0 deletions client/src/api/datasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export async function copyDataset(
// TODO: Investigate. These should be optional, but the API requires explicit null values?
type,
copy_elements: null,
fields: null,
hide_source_items: null,
instance_type: null,
},
Expand Down
4 changes: 4 additions & 0 deletions client/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,8 @@ export type ObjectExportTaskResponse = components["schemas"]["ObjectExportTaskRe
export type ExportObjectRequestMetadata = components["schemas"]["ExportObjectRequestMetadata"];
export type ExportObjectResultMetadata = components["schemas"]["ExportObjectResultMetadata"];

export type SampleSheetColumnDefinition = components["schemas"]["SampleSheetColumnDefinitionModel"];
export type SampleSheetColumnDefinitionType = SampleSheetColumnDefinition["type"];
export type SampleSheetColumnDefinitions = SampleSheetColumnDefinition[] | null;

export type AsyncTaskResultSummary = components["schemas"]["AsyncTaskResultSummary"];
Loading
Loading