Replace period with duration in MeasurementType#15
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
=======================================
Coverage 98.02% 98.02%
=======================================
Files 10 10
Lines 203 203
=======================================
Hits 199 199
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Dear Luke, thank you for your very timely contribution. We were literally talking yesterday about making this change. I think it will be fine to release this with 0.6.0 as breaking change. We only recently (#11) added |
|
Looks good to me. Let me check with @PaulVanSchayck when we want to merge and relrease. |
|
Hey @mo-lukecarr The changes look good to us. Thanks again. We were planning to do one more check on one of our EDR APIs, but failed to complete that before our Christmas holidays. We'll continue to work on this the 6th of January. We maybe would like to include PR #17 into one breaking Happy holidays! |
I'm working over the holidays (except for the 25th and New Year), so I can crack on with #17 so it's ready for review in early January. Happy Holidays, too! |
|
Dear Luke, thanks again for your timely contribution. We've merged this PR. We'll make a 0.6.0 release once #17 is also ready. |
First off, great work on this library! It's been really useful for spec'ing out some EDR work and getting a lot of the EDR specification validated with minimal effort!
Historically, there has been confusion between the names
periodanddurationfor the field that denotes the ISO 8601 duration of a measurement type. This is noted in theTODO:comment onmainwithin theMeasurementTypemodel.Now that the PR (opengeospatial/ogcapi-environmental-data-retrieval#577) has been merged on OGC's end, there is no ambiguity between
periodanddurationmoving forward. As seen in the linked PR, the examples have been changed to confirm thatdurationis the field name moving forward with EDR v1.2.This PR changes the field name in the
MeasurementTypemodel fromperiodtoduration, and changes all references fromperiodtodurationin JSON test data to ensure that tests still pass.I appreciate that this change aligns with an upcoming EDR specification version that isn't formally released, so I welcome your steer on when it would be best to merge.
Also, I recognise that this is technically a breaking change for the library, so any thoughts on how that can be mitigated are welcome. Do we still include the
periodfield as astr | Nonethat is deprecated (and completely removed at a later time)? Or do we just accept that it's a breaking change and switch fromperiodtodurationwithout a transitional phase?Related to this PR, I'm happy to pick up the other TODO comment on this field which aims to add validation for ISO 8601 duration strings (rather than accepting any strings as the model currently does).