-
-
Notifications
You must be signed in to change notification settings - Fork 206
feat(subsequences): migrate old SubmissionExtras to SubmissionSupplemental DEV-934 #6422
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: refactor-subsequences-2025
Are you sure you want to change the base?
feat(subsequences): migrate old SubmissionExtras to SubmissionSupplemental DEV-934 #6422
Conversation
|
|
||
|
|
||
| def migrate_submission_supplementals(supplemental_data: dict) -> dict | None: | ||
| if supplemental_data.get('_version', None) == SCHEMA_VERSIONS[0]: |
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.
Nit: .get() already defaults to None, so you can drop the second argument.
| new_version = { | ||
| '_version': '20250820', | ||
| 'Audio_question': { | ||
| 'automatic_transcription': { |
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.
That's not the name of the action. It should be automatic_google_transcription. We are only using Google for NLP at the moment. The logic works great, but it should match the current action IDs.
Moreover, we need to rename every automated_* and Automated* to their (A|a)utomatic counterparts.
| } | ||
| ] | ||
| }, | ||
| 'automatic_translation': { |
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.
Same comment as above.
|
Nit: |
|
I think there’s an issue in We should probably have schema which would look like something like that (my question is So everything nested inside the question_name dictionary is ignored/by_passed. |
Right 🤦 what we are doing now is NOT putting the action IDs inside {
"additionalProperties": false,
"properties": {
"_version": {
"const": "20250820"
},
"audio": {
"additionalProperties": false,
"properties": {},
"type": "object",
"automated_google_transcription": {
…Unfortunately, correcting this causes other problems because the |
… beccagraber/refactor-subsequences-2025-migration
…ubsequences-2025-migration
🗒️ Checklist
#Support Docs Updates, if any<type>(<scope>)<!>: <title> DEV-1234Front endand/orBack endorworkflow💭 Notes
Fill out the method for converting old SubmissionExtra content dicts to the new format expected by SubmissionSupplemental for translations and transcripts. Qualitative analysis answers will be handled separately.
This code makes numerous assumptions to fill in information that is not present in the old structure but required in the new:
👀 Preview steps
On main:
On PR branch:
8. Clone the asset
9. PATCH the asset with