Open nagem opened 6 years ago
Merging #1010 into master will increase coverage by
0.08%
. The diff coverage is94.77%
.
@@ Coverage Diff @@
## master #1010 +/- ##
==========================================
+ Coverage 90.97% 91.05% +0.08%
==========================================
Files 49 50 +1
Lines 7037 7145 +108
==========================================
+ Hits 6402 6506 +104
- Misses 635 639 +4
@gsfr Just a head's up that this is a breaking change to gears and we should chat offline about our support strategy.
@nagem to make change to still pass measurements key for backwards compatibility. That behavior will be deprecated and removed in future.
@gsfr When should file modifications cause jobs to spawn? Info editing? Classification editing? Any editing?
@kofalt, @ambrussimon I am no longer fiddling with this and would appreciate your review when you have time available.
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.POST /api/<cont_name>/<cont_id>/files/<files_name>/classification
- UPDATE an existing file's classification. Works similar to the info editing endpoint. Several options are allowed:To
push
items to lists within classification, useadd
:To
pull
items from lists within classification, usedelete
:Note:
add
anddelete
can both be used in the same request.To replace an entire classification, use
replace
:Relevant Response Formats:
Success responses when editing a file (
PUT /api/cont/cont_id/files/filename
,POST /api/cont/cont_id/files/filename/info
,POST /api/cont/cont_id/files/filename/classification
) will be formatted like:Errors when attempting to edit a file's classification:
TODO:
Breaking Changes:
measurements
list will no longer be an accepted or outputted field on a file, it has been replaced by aclassification
map. SDK, search, and other clients will need to be updated.measurements
. DB update replaces the key withclassification
. Format did not change, just a key rename.modality
field on a file can be any string, not just to known list of modalities in the systemCustom
keyReview Checklist