-
Notifications
You must be signed in to change notification settings - Fork 6
Studydocs: Always require type and add options. #423
base: master
Are you sure you want to change the base?
Conversation
Something seems wrong with CI. But I got no time to investigate right now.. |
The tests for |
Ah, because type is now required, and of course the old tests do not specify the type. |
If anybody has time, this should be an easy fix. I'll do it as soon as I can, but not sure when that will be :/ |
We do not wish to allow studydocs without type anymore, so the `type` field is not not nullable and required. Furthermore, we wish to differentiate between spring and autumn exams for better filtering, so the previous exam type is replaced. Closes #422
b2c9375
to
d7cb10c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #423 +/- ##
==========================================
+ Coverage 94.75% 94.77% +0.02%
==========================================
Files 75 75
Lines 4329 4329
==========================================
+ Hits 4102 4103 +1
+ Misses 227 226 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@NotSpecial The change of the type options for study documents do not come with any data migrations, so the existing study documents will still come with the type Do you have any idea how the API handles this situation? |
I just saw the use of |
The API will enforce the new type for all new requests. Existing data will be returned as-is. We would need to migrate it ourselves. |
Migration of existing data is difficult because we can only partially automate the process by looking up lectures in the course catalogue of ETH and match those lectures which still exist with the same name. |
I'm not sure what to tell you 😅 Data migration is always a difficult task, that's why changes to the data schema are only done when really necessary. So considering that, is the split into autumn/spring exams really that necessary? I was just implementing the suggestion in #422, but now that I see it again I am not sure whether it's really that helpful to split the exam types up. What's your opinion? Should we just keep |
I think that having the document type I will check with the current board members how we should proceed and then get back to you. |
I haven't talked to the rest of the Board, but I think the separation into spring/ autumn exams is more hindering than helpful, as if I'm looking for old exams, I also want to find the ones in the off-season. Additionally, people often mix things up. In the past, I downloaded old exams with e.g. 'spring20' in the doc-title, but the exam date was February 20 and should therefore have been 'autumn19'. |
In that case, we should probably revert this part of the change and go back to a single |
Please note that we might still have existing documents where this information is not set, so these documents should be migrated after this change has been deployed. |
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.
overall I like the idea.
But I'm concerned about migration.
also, because we will be migrating to community solutions in the future it might not make sense to do a lot of work on the migration, if that requires a lot of work.
The existing documents must be migrated to the new platform, so if there is more structured data available to perform this migration as automated as possible the better it is. The only change which might also be necessary is that the website form has to also enforce those fields for better feedback to the user. |
ok if there is no need to migrate old documents then I'm happy with this PR. |
We do not wish to allow studydocs without type anymore, so the
type
field is not not nullable and required.Furthermore, we wish to differentiate between spring and autumn exams for better filtering, so the previous exam type is replaced.
Closes #422