-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add/hdruk/2.1.3 #21
Add/hdruk/2.1.3 #21
Conversation
@@ -0,0 +1,16 @@ | |||
from pydantic import Field | |||
from hdr_schemata.definitions.HDRUK import Periodicity | |||
from hdr_schemata.models.HDRUK.base.Temporal import Temporal as BaseTemporal |
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'm wondering if it would make sense to import Temporal
from the latest schema version rather than from HDRUK.base
?
Hypothetically, say for version 2.1.4
we wanted to change the name timeLag
to timeDelay
or something. For 2.1.4
the developer would import base.Temporal
and have to make two modifications to it (timeLag
-> timeDelay
and accrualPeriodicity
-> publishFrequency
). I imagine it would be easy to miss a previous iteration that was made to base.Temporal
. IIUC, importing from the latest version by default should mean the developer doesn't have to go back and check previous iterations.
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.
Great that you checked but this is simply because 2.1.2
is the base and the latest version.
While we have older versions of the schema, these are json-schema only and not pydantic. Therefore the 'base' of the HDRUK schema is 2.1.2
. When we make a 2.1.4
then yeh definitely you're right to import from the latest schema which would be from hdr_schemata.models.HDRUK.v2_1_3.Temporal
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.
Could rename Base
to be 2.1.2
if that's less confusing?
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.
Right of course, I hadn't realised this was a special case because 2.1.2
is the Base
. It's probably worth writing some documentation about how to make these updates to the schema re importing from the latest version.
No description provided.