-
Notifications
You must be signed in to change notification settings - Fork 36
ENH: add schema for "projection" entry in start document #130
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -4,6 +4,34 @@ | |
| "title" : "data_type", | ||
| "patternProperties": {"^([^./]+)$": {"$ref": "#/definitions/data_type"}}, | ||
| "additionalProperties": false | ||
| }, | ||
| "data_mapping": { | ||
| "description": "Where to get the data from", | ||
| "type": "object", | ||
| "properties" : { | ||
| "stream": {"type": "string"}, | ||
| "location": {"enum" : ["event", "configuration"]}, | ||
| "field": {"type": "string"} | ||
| }, | ||
| "required" : ["stream", "location", "field"], | ||
| "additionalProperties": false | ||
| }, | ||
| "technique": { | ||
|
Member
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. The term "technique" might be too limiting. This provides a generic mechanism for mapping any externally-defined metadata schema to the contents of the documents to come. Those schemas might be broken up by experimental technique, by downstream analysis process (applicable to more than one technique such as "scattering" and "diffraction"), by institution, by domain, etc.
Contributor
Author
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. "data_remapping", "datamap", "DateMap", "Application", "application_definitions"? I think we have a bunch of helper functions like |
||
| "title" : "Describe how to interperet this run as the given technique", | ||
| "properties":{ | ||
| "technique": {"type": "string", | ||
| "description": "The name of the technique"}, | ||
| "version": {"type": "integer", | ||
| "description": "The version of the technique spec"}, | ||
| "configuration" : {"type": "object", | ||
| "description": "Static information about technique"}, | ||
| "data_mapping" : { | ||
| "type": "object", | ||
| "patternProperties": {"^([^./]+)$": {"$ref": "#/definitions/data_mapping"}} | ||
| } | ||
| }, | ||
| "additionalProperties": false, | ||
| "required" : ["technique", "version", "configuration", "data_mapping"] | ||
| } | ||
| }, | ||
| "properties": { | ||
|
|
@@ -35,6 +63,10 @@ | |
| "type": "string", | ||
| "description": "Unix owner to associate this data with" | ||
| }, | ||
| "techniques": { | ||
| "type": "array", | ||
| "items": {"$ref": "#/definitions/technique"} | ||
| }, | ||
| "hints": { | ||
| "type": "object", | ||
| "description": "Start-level hints", | ||
|
|
@@ -57,12 +89,10 @@ | |
| { | ||
| "type": "string", | ||
| "description": "The stream to find the datakeys in." | ||
|
|
||
| } | ||
| ], | ||
| "additionalItems": false, | ||
| "minItems": 2 | ||
|
|
||
| } | ||
| } | ||
| }, | ||
|
|
||
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.
What if it's in the stop document? Or elsewhere in the EventDescriptor, such as the
sourceorshape? Would a dotted object representation be simpler and more comprehensive?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.
Being in the start document is a far more compelling argument.
I'm skeptical of embracing the dot-ness (as we have previously agreed ed that dot access on dicts is not great) so the code to munge that back to something we can actually use will be annoying, but on the other hand we can write the function once and stuff it it databroker).