Skip to content

Take the OWID with the dated key fetch, and report whether a licence key was given - #74

Merged
Automation51D merged 1 commit into
mainfrom
chore/owid-dated-key-fetch
Sep 6, 2026
Merged

Take the OWID with the dated key fetch, and report whether a licence key was given#74
Automation51D merged 1 commit into
mainfrom
chore/owid-dated-key-fetch

Conversation

@jwrosewell

Copy link
Copy Markdown
Contributor

Summary

Moves the owid-python submodule 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-python submodule 0a77e39e to 5fe9a7cc, 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_key on DidClient. Java has hasLicenceKey() and .NET has the same, and this package had nothing. 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 alongside.

What deliberately did not change

DidClient does not call the new PublicKeySchedule. 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 _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 with the rest. ci/copy-owid-source.ps1 needed no change.

Verification

python -m pytest tests in fiftyone_pipeline_did with the submodule at 5fe9a7cc: 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.

…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.
@jwrosewell
jwrosewell marked this pull request as ready for review September 6, 2026 13:31
@Automation51D
Automation51D merged commit 30f94c0 into main Sep 6, 2026
1 check passed
@Automation51D
Automation51D deleted the chore/owid-dated-key-fetch branch September 6, 2026 13:38
@jwrosewell

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants