epcis: use the unversioned EPCIS context URL - #1
Merged
Conversation
EPCIS_CONTEXT pinned https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld. GS1 publishes the context unversioned at .../standards/epcis/epcis-context.jsonld; the versioned form pins a snapshot we do not mean. Every document this library builds carried it, so it shows up in every capture and in the EPCIS tab of the Odoo connector, which vendors this package. `schemaVersion` stays "2.0" — that is the property's value, not the context version, and GS1's own published examples carry it that way too. The eventID does not move. As the constant's own docstring says, the context belongs on the document, not on the event, and the hash is taken over the event. The two tests that pin literal ni:///sha-256; values stay green: 169 passed, 27 subtests, with the `hash` extra installed.
Die unversionierte URL ist kuerzer, damit passt der Ausdruck in test_events.py wieder auf eine Zeile. Reine Formatierung, kein Verhalten -- ruff 0.16.2, wie in pyproject gepinnt.
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.
compat:
EPCIS_CONTEXTpinnedhttps://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld. GS1 publishes the context unversioned at.../standards/epcis/epcis-context.jsonld; the versioned form pins a snapshot we do not mean.Every document this library builds carried it, so it appears in every capture — and in the EPCIS tab of the Odoo connector, which vendors this package.
schemaVersionstays"2.0"— that is the property's value, not the context version, and GS1's own published examples carry it that way too.The eventID does not move. As the constant's own docstring says, the context belongs on the document, not on the event, and the hash is taken over the event. The two tests that pin literal
ni:///sha-256;values stay green.Verified: 169 passed, 27 subtests, with the
hashextra installed. (Without it, 7 hash tests error out on a missingepcis_event_hash_generator— that is pre-existing and unrelated: the same 7 fail on an untouched checkout.)Follow-up: once this is in,
openepcis-odooneeds a re-vendor (tools/vendor_benelog_client.sh) — itsvendor/README.mdsays never to edit the copy by hand.