-
Notifications
You must be signed in to change notification settings - Fork 1
Allow users to add reference materials #297
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
Conversation
c99e650 to
a1400c0
Compare
BryonLewis
left a comment
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.
Some minor changes and questions about the overall
| @pytest.mark.django_db | ||
| def test_create_vetting_details(client): | ||
| test_text = 'foo' | ||
| data = {'reference_materials': test_text} | ||
| test_user = UserFactory() | ||
| client.force_login(user=test_user) | ||
| resp = client.post( | ||
| f'/api/v1/vetting/user/{test_user.id}', data=data, content_type='application/json' | ||
| ) | ||
| assert resp.status_code == 200 | ||
| assert resp.json()['user_id'] == test_user.id |
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.
There is a DB constraint for the text size, should we be testin that in the tests?
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.
client/src/views/Spectrogram.vue
Outdated
| <v-dialog | ||
| v-model="referenceDialog" | ||
| max-width="50%" | ||
| > | ||
| <template #activator="{ props }"> | ||
| <v-btn | ||
| v-bind="props" | ||
| > | ||
| Add reference materials | ||
| </v-btn> | ||
| </template> | ||
| <v-card> | ||
| <v-card-title> | ||
| Reference Materials | ||
| </v-card-title> | ||
| <v-card-text> | ||
| <v-textarea | ||
| v-model="reviewerMaterials" | ||
| placeholder="Describe any reference materials used during labeling" | ||
| @update:model-value="saveReviewerMaterials" | ||
| /> | ||
| </v-card-text> | ||
| <v-card-actions> | ||
| <v-btn | ||
| @click="referenceDialog = false" | ||
| > | ||
| Close | ||
| </v-btn> | ||
| </v-card-actions> |
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.
Since it is already in a V-dialog I would probably swap this to using a submit/cancel button and have the saving of new data connected to the submit button and cancellation prevent saving the data.
Mostly because with 500ms if you are a fast typer and hit the 2000 character limit you could get an unseen error that doesn't save the data (or if you are pasting data in).
I'd suggest swapping it to that instead of debouncing and also making it so the textarea has a limit of 2000 characters and then it will have a rule show up as well as disabling the submit button.
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.
Refactored into a separate component in 2dff11e
8db34c7 to
821c17d
Compare
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.
I think it is missing a way to open the Reference Materials Dialog
BryonLewis
left a comment
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.
The length check was set to 20 instead of 2000.
Minor note about 'save'/'close' ordering. Up to you if you want to change it.
Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>
BryonLewis
left a comment
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.
👍
* Allow Users to Submit Annotations (#281) * Add settings for vetting * Model submission status of recording annotations * Add endpoint to get current user * Show recording submission status in table view * Don't filter out noise The model can predict noise, so sorting it out of the species list can lead to problems when loading/displaying that value in a list. * Add endpoint to submit file-level annotations * Allow submitting file annotations in interface * Squash migrations * Indicate when a file has been reviewed * Format * Show the current user's submitted label in sidebar * Disable deletion for non-admin vetters * Make 403 message more descriptive * Vetting progress UI (#293) * Add settings for vetting * Model submission status of recording annotations * Add endpoint to get current user * Show recording submission status in table view * Don't filter out noise The model can predict noise, so sorting it out of the species list can lead to problems when loading/displaying that value in a list. * Add endpoint to submit file-level annotations * Allow submitting file annotations in interface * Squash migrations * Indicate when a file has been reviewed * Format * Show the current user's submitted label in sidebar * Disable deletion for non-admin vetters * Make 403 message more descriptive * Show progress bar for submitted recordings * Enable showing/hiding submitted recordings * Toggle submitted recordings in sidebar * Fix submission bug * Navigate through unreviewed files (#294) * Add settings for vetting * Model submission status of recording annotations * Add endpoint to get current user * Show recording submission status in table view * Don't filter out noise The model can predict noise, so sorting it out of the species list can lead to problems when loading/displaying that value in a list. * Add endpoint to submit file-level annotations * Allow submitting file annotations in interface * Squash migrations * Indicate when a file has been reviewed * Format * Show the current user's submitted label in sidebar * Disable deletion for non-admin vetters * Make 403 message more descriptive * Show progress bar for submitted recordings * Enable showing/hiding submitted recordings * Toggle submitted recordings in sidebar * Fix submission bug * Add button to go to next unreviewed file * Add function to get next unreviewed recording * Navigate between unreviewed files * Display a message when there are no files to review * Reset selected annotation when recording changes * Show a user their submitted labels (#295) * Show submission status and label in sidebar * Show user submitted label in Recordings view * Hide detailed metadata in vetting mode (#296) * In vetting mode, hide detailed metadata fields * Hide annotation summary in vetting mode * Show GRTS cell bounding box for vetters * Indicate pending submissions * Update title for pulse annotation column * Hide "my recordings" if non-admins can't upload (#298) * Hide "my recordings" if non-admins can't upload * Add missing semicolon Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com> * Hide progress bar for my recordings when needed --------- Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com> * Allow users to add reference materials (#297) * Allow users to add reference materials * Model vetting details per user * Update vetting details from front end * Use separate component for reference materials * Add length check and test to API layer * Swap position of close/save for consistency * Use correct max length value for vuetify rule Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com> --------- Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com> * Vetting workflow feedback (#301) * Make return type compatable for column definition * Add scale widget to location map * Fix casing for kHz * Fix scrolling in spectrogram sidebar * Add tooltip to submission status * Ensure configuration is loaded before column check * Remove unused setting and remake migrations * Use tooltip in shared list --------- Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>
Vetting Workflow
Fix #287
Models vetting details for a particular user. Right now this means being able to capture any reference materials used by a user.
This is currently implemented as a text field that is accessible from the spectrogram sidebar.
