-
Notifications
You must be signed in to change notification settings - Fork 9
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
DTS manifest file part 1 #205
Changes from all commits
a456122
d2765a4
2f5b2d0
ab6bbc7
ae4a74d
5d945ff
ccf1761
4f6044d
1e4fc01
1fc9a2c
a19d227
bd55791
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,15 @@ | |
* Note: We should serve the generated content from memory | ||
* Note: This doesn't handle if we want to have different output types based on file extensions | ||
feeding into the same app | ||
|
||
Adding new file types and app ids: | ||
* file types and app ids should be added to staging_service.autodetect.Mappings | ||
* file types should be all upper-case and represent the file suffix. | ||
* app ids should be in snake_case, and represent either an object import type, or some | ||
internal application to be run on selection (i.e. decompress or import specification). | ||
* app ids that map to actual object import maps should match the app ids in the narrative | ||
interface configuration here: | ||
https://github.com/kbase/narrative/blob/main/kbase-extension/static/kbase/config/staging_upload.json | ||
""" | ||
|
||
from collections import defaultdict | ||
|
@@ -120,7 +129,7 @@ | |
fba_model_id, | ||
import_specification, | ||
] | ||
file_format_to_app_mapping[JSON] = [escher_map_id] | ||
file_format_to_app_mapping[JSON] = [escher_map_id, import_specification] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I'm wondering if we should have a separate type in the dropdown for DTS manifests vs. import specifications. Maybe just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I thought of that. I guess that would be a trivial change, but I'm not sure the best thing to call it. I also wonder if it would be confusing to users at all? They'd have to read instructions on the whole DTS process anyway. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I take it back, that's not trivial at all. It means a narrative change at minimum, possibly an API change if we want to be really thorough. Maybe a new API endpoint? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would make it a query param probably There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just checking here - you're saying the separate type and query param is the way you're going to go? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, if it's going to work that way, there probably shouldn't be a JSON: dts_parser entry in the parser mapping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is how it work right now, as of this PR, and everything else that's in it. A later PR that updates the endpoint to use a query param will probably undo this. Also, the Narrative will need to have a mapping of some sort, which is what this sets up. So it might not be from I don't want this to get more complicated and would like to keep that in a single PR with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, as long as the plan is clear |
||
file_format_to_app_mapping[SBML] = [fba_model_id] | ||
|
||
app_id_to_extensions = defaultdict(list) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to match the documentation in individual_parsers but I assume the format is still changing |
||
"name": "manifest", | ||
"resources": [ | ||
{ | ||
"id": "JDP:555518eb0d8785178e712d88", | ||
"name": "61564.assembled", | ||
"path": "img/submissions/61564/61564.assembled.gff", | ||
"format": "gff", | ||
"media_type": "text/plain", | ||
"bytes": 455161, | ||
"hash": "", | ||
"credit": { | ||
"comment": "", | ||
"content_url": "", | ||
"contributors": null, | ||
"credit_metadata_source": "", | ||
"dates": null, | ||
"descriptions": null, | ||
"funding": null, | ||
"identifier": "JDP:555518eb0d8785178e712d88", | ||
"license": { | ||
"id": "", | ||
"url": "" | ||
}, | ||
"publisher": { | ||
"organization_id": "", | ||
"organization_name": "" | ||
}, | ||
"related_identifiers": null, | ||
"resource_type": "dataset", | ||
"titles": null, | ||
"url": "", | ||
"version": "" | ||
}, | ||
"instructions": { | ||
"data_type": "gff_metagenome", | ||
"parameters": { | ||
"param1": "value1", | ||
"param2": "value2" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "JDP:555518eb0d8785178e712d84", | ||
"name": "61564.assembled", | ||
"path": "img/submissions/61564/61564.assembled.fna", | ||
"format": "fasta", | ||
"media_type": "text/plain", | ||
"bytes": 6354414, | ||
"hash": "", | ||
"credit": { | ||
"comment": "", | ||
"content_url": "", | ||
"contributors": null, | ||
"credit_metadata_source": "", | ||
"dates": null, | ||
"descriptions": null, | ||
"funding": null, | ||
"identifier": "JDP:555518eb0d8785178e712d84", | ||
"license": { | ||
"id": "", | ||
"url": "" | ||
}, | ||
"publisher": { | ||
"organization_id": "", | ||
"organization_name": "" | ||
}, | ||
"related_identifiers": null, | ||
"resource_type": "dataset", | ||
"titles": null, | ||
"url": "", | ||
"version": "" | ||
}, | ||
"instructions": { | ||
"data_type": "gff_metagenome", | ||
"parameters": { | ||
"param1": "value1", | ||
"param2": "value2" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "JDP:555518ec0d8785178e712d9f", | ||
"name": "61567.assembled", | ||
"path": "img/submissions/61567/61567.assembled.gff", | ||
"format": "gff", | ||
"media_type": "text/plain", | ||
"bytes": 545583, | ||
"hash": "", | ||
"credit": { | ||
"comment": "", | ||
"content_url": "", | ||
"contributors": null, | ||
"credit_metadata_source": "", | ||
"dates": null, | ||
"descriptions": null, | ||
"funding": null, | ||
"identifier": "JDP:555518ec0d8785178e712d9f", | ||
"license": { | ||
"id": "", | ||
"url": "" | ||
}, | ||
"publisher": { | ||
"organization_id": "", | ||
"organization_name": "" | ||
}, | ||
"related_identifiers": null, | ||
"resource_type": "dataset", | ||
"titles": null, | ||
"url": "", | ||
"version": "" | ||
}, | ||
"instructions": { | ||
"data_type": "gff_metagenome", | ||
"parameters": { | ||
"param1": "value1", | ||
"param2": "value2" | ||
} | ||
} | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is supposed to be autogenerated IIRC but I don't see any code changes that would cause this to be different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC you need to update the mapping here:
staging_service/staging_service/autodetect/GenerateMappings.py
Line 66 in d41d38c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that'd be real cool if that were documented anywhere. I'll add that and fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some documentation to the README. Not perfect, but should be enough for now.