Take the OWID with the dated key fetch, and report whether a licence key was given - #74
Merged
Merged
Conversation
…cence key was given Moves the owid-python submodule onto the 51Degrees fork head that carries the dated public key fetch and the key schedule, which the Python port had none of until SWAN-community/owid-python#4. The build time copy into the package as the private module _owid takes whatever Python files the submodule holds, so public_key_fetch.py and public_key_schedule.py are now carried in a published wheel alongside the rest and need no change to ci/copy-owid-source.ps1. Nothing in DidClient changes as a result. It fetches the whole published schedule from the cloud's own key endpoint with a resource key and selects by the start of a key's period itself, with a fifteen minute boundary tolerance the OWID library does not model, so the library's PublicKeySchedule is not the right thing for it to call. The two are deliberately different and both are correct. Adds has_licence_key, which the Java and .NET clients already have and this one did not. A licence key is needed only by redeem, so a client without one still reads keys and verifies signatures, and a caller can now ask rather than track it separately. Verified with the submodule at 5fe9a7cc: 145 passed, 2 skipped.
Contributor
Author
|
Correction to this pull request's description and commit message. The first paragraph says this change moves the owid-python submodule to 5fe9a7cc. It did not. Automation51D's submodule update #73, merged at 02:35 UTC on 6 September 2026, had already moved main to that commit, so by the time #74 merged its branch carried no submodule change and the squash commit 30f94c0 touches only did_client.py. The description of what 5fe9a7cc contains is accurate, it just landed through #73. Found in review after merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the
owid-pythonsubmodule onto the fork head carrying the dated public key fetch and the key schedule, and adds the one client accessor this package was missing against Java and .NET.Draft while the specification alignment review runs, because that review may add commits here. See Still to come at the end.
What changed
owid-pythonsubmodule0a77e39eto5fe9a7cc, being the merge of Add the dated public key fetch and the key schedule Python had none of SWAN-community/owid-python#4, which gave the Python port the dated fetch and the key schedule the other ports already had.has_licence_keyonDidClient. Java hashasLicenceKey()and .NET has the same, and this package had nothing. A licence key is needed only byredeem, so a client without one still reads keys and verifies signatures, and a caller can now ask rather than track it alongside.What deliberately did not change
DidClientdoes not call the newPublicKeySchedule. It fetches the whole published schedule from the cloud's own key endpoint with a resource key and selects by the start of a key's period itself, applying a fifteen minute boundary tolerance that the OWID library does not model. The two selection rules are different on purpose and both are correct, and the Java and .NET clients keep their own selection for the same reason.The build time copy into the package as the private module
_owidtakes whatever Python files the submodule holds, sopublic_key_fetch.pyandpublic_key_schedule.pyare now carried in a published wheel with the rest.ci/copy-owid-source.ps1needed no change.Verification
python -m pytest testsinfiftyone_pipeline_didwith the submodule at5fe9a7cc: 145 passed, 2 skipped.Still to come in this pull request
The specification alignment review across SWAN-community and 51Degrees, checking that 51Did is properly defined and that the implementations agree. Anything it finds for this package lands here rather than in a separate pull request.
One finding is already recorded and is not fixed here. The five outcomes of a detailed offline signature check are spelled three different ways across .NET, Java and Python, which does not meet the convention the packages state themselves, that the backing string is the cross language name of the outcome so it can be logged or carried between services. Aligning them is a breaking change in Java and Python and is a decision rather than a tidy up.
Produced with AI assistance and needs human review before merging.