-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for modalities, add classification to files #649
Conversation
If you would like to "unset" any of the fields, set |
88ea242
to
8b5996a
Compare
This will need to adjust gear rules and potentially affect what ops (ping @ryansanford et al) does on system start / upgrade. Specifically, the |
@gsfr We have an issue with this new model, where we cannot create gear manifest constraints that reference these fields. @nagem Linked me this example of a file object, post update: {
"name": "example_file.txt",
"modality": "MR",
"classification": {
"intent": ["Functional", "Localizer"],
"custom": ["custom", "classification", "markers"]
}
} @jenreiter is building a gear that would want to specify that an input takes one of two intents, and my understanding is that we cannot write a schema that would create this constraint. This issue is tracked upstream by json-schema-org/json-schema-spec#63 and more broadly json-schema-org/json-schema-spec#170 --> json-schema-org/json-schema-spec#206. My understanding is that this isn't a new issue caused by this specific update, but it's worth noting that we can't create a manifest that talks about every section of the file object, which is a big deal. Thoughts? |
7f91088
to
eb90940
Compare
@gsfr Is "modality" the correct term to use here. Much like measurement vs classification, I'm concerned that "modality" is to narrow. I'm not aware of that term outside medical acquisition devices. |
As part of this PR, we should add bootstrapping logic to load in a "default" modality and it's classification. Also, |
When this is closer to merge, we'll need to discuss what changes the SDK will need to make. |
Closing, replaced by #1010 |
New endpoints:
GET /api/modalities
- GET list of all modalities and their allowable classifications.GET /api/modalities/<modality_name>
- GET a specific modalityPOST /api/modalities
- Add a new modality. Required:_id
(readable name) andclassification
, a map of allowable classifications. Requires superuser. Example request:PUT /api/modalities/<modality_name>
- REPLACE a specific modality. Requires superuser.DELETE /api/modalities/<modality_name>
- DELETE a specific modality. Requires superuser.Certain file attributes can now be modified:
classification
,info
, andmodality
.PUT /api/<cont_name>/<cont_id>/files/<files_name>
- UPDATE an existing file. Optional flag ofreplace_fields=true
will replace the dict fields rather than update them.Review Checklist