grand-challenge.org
grand-challenge.org copied to clipboard
Support all interface types in display set UI
Closes https://github.com/DIAGNijmegen/rse-grand-challenge-admin/issues/50, closes https://github.com/DIAGNijmegen/rse-grand-challenge-admin/issues/12, closes https://github.com/comic/grand-challenge.org/issues/2553
This PR implements all changes for https://github.com/DIAGNijmegen/rse-roadmap/issues/159
- It adds a create view for a single display set
- It fixes the widget for json type interface values that are stored as a file
- It adds the option to upload a new file/image for an interface in the display set update view
- It adds the option to add a new interface to a display set via the update view
Codecov Report
Merging #2575 (15fbd08) into main (011d2d9) will increase coverage by
0.06%
. The diff coverage is94.23%
.
@@ Coverage Diff @@
## main #2575 +/- ##
==========================================
+ Coverage 93.84% 93.90% +0.06%
==========================================
Files 844 846 +2
Lines 31564 32056 +492
==========================================
+ Hits 29621 30102 +481
- Misses 1943 1954 +11
Impacted Files | Coverage Δ | |
---|---|---|
app/grandchallenge/algorithms/forms.py | 88.08% <ø> (ø) |
|
app/grandchallenge/archives/forms.py | 98.78% <ø> (ø) |
|
app/grandchallenge/reader_studies/urls.py | 100.00% <ø> (ø) |
|
app/tests/cases_tests/test_forms.py | 100.00% <ø> (ø) |
|
app/grandchallenge/components/models.py | 92.35% <80.85%> (+2.06%) |
:arrow_up: |
app/grandchallenge/components/form_fields.py | 95.00% <85.71%> (-0.13%) |
:arrow_down: |
app/grandchallenge/reader_studies/views.py | 90.43% <88.55%> (-0.43%) |
:arrow_down: |
...cations/migrations/0004_alter_notification_type.py | 100.00% <100.00%> (ø) |
|
app/grandchallenge/notifications/models.py | 98.41% <100.00%> (+0.89%) |
:arrow_up: |
app/grandchallenge/reader_studies/forms.py | 97.51% <100.00%> (+0.98%) |
:arrow_up: |
... and 11 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
I think it is getting slower because we initialize all the forms in the list view on load. I'll have a look at that after i finish the create view and after I process the other comments on this one.
I removed the check that loads all forms when the list view loads. I understand the rationale behind it, but IMO it is not worth the hit on loading times.
Also it appears that updating a display set with a json file (json type but not stored in database) does not work. The DisplaySetUpdate
view tries to save the file as a value (see form_valid()
on L1414 in this PR, can't seem to comment there directly).
@jmsmkn I reverted the changes to the is_file_kind
and is_json_kind
methods, but I think we need to keep the changes made to the form_fields and the additional line for allowed mimetypes. We could get rid of the form_fields changes only if we add the interface instance or the store_in_database
property, as it is a class method that has no knowledge of the instance.
@jmsmkn I reverted the changes to the
is_file_kind
andis_json_kind
methods, but I think we need to keep the changes made to the form_fields and the additional line for allowed mimetypes. We could get rid of the form_fields changes only if we add the interface instance or thestore_in_database
property, as it is a class method that has no knowledge of the instance.
If the default widget is a property of the instance and not of a class why wouldn't the classmethod
be changed to an instance method?
Good point! I'll change it.
It looks like something goes wrong when adding a json file for interface Multiple 2D bounding boxes, the value never gets added and the interface is also not added to the case. There is no error shown. I tested with a json file with invalid content, no error is shown to the user.
When uploading a json file for interface Multiple 2D bounding boxes, the help text below the upload widget says: "The following file formats are supported: .m2db". Which should be ".json".
It looks like something goes wrong when adding a json file for interface Multiple 2D bounding boxes, the value never gets added and the interface is also not added to the case. There is no error shown. I tested with a json file with invalid content, no error is shown to the user.
When uploading a json file for interface Multiple 2D bounding boxes, the help text below the upload widget says: "The following file formats are supported: .m2db". Which should be ".json".
Where did you test this and was it on the latest commit?
Ah, I can reproduce this. The error message gets too long for the notification message field. I'll also check the help text.
It is now fixed. You get any validation errors for your files via a notification.