Encode the property URI where a dataset is exported, not only where it is provisioned - #227
Merged
Merged
Conversation
…t is provisioned Exporting any dataset on a profile with a space in a field name raised: rdflib refuses to serialize http://schema.org/Source Name at all. The earlier fix reached the model TTL's property definitions and the Sample Type pids, but the data RDF builds its predicates at a second site that still concatenated the name -- so SEEK held the encoded pid while the export could not be produced. The tests missed it because they asserted the two sides agree on the path that had been changed. Found by exporting a real dataset on cropxr-metabolomics against a running SEEK, which is what the fix was for.
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.
Asked whether the SEEK export had actually been tested end to end, the answer was no — only provisioning had. Exporting turned out to be broken:
Any dataset on a profile with a space in a field name could not be exported at all.
Why the earlier fix missed it
#224 routed the Sample Type
pidand the model TTL's property definitions throughproperty_uri. The data RDF builds its predicates at a second site (fairds.py:256,SCHEMA[key]) that still concatenated the raw field name. So SEEK held the encoded pid while the export that is supposed to match it could not be produced.Its tests passed because they asserted provisioning and the data RDF agree on the path that had been changed. Two sites, one covered.
Verified against a running SEEK 1.18.1
Provisioned
cropxr-metabolomics, then read the attribute back from SEEK:and after this change the export emits the identical URI, with no unencoded form anywhere in the graph.
A regression test builds a profile with a spaced field name, exports a dataset and asserts both that the unserializable form is absent and the encoded one present — red against the unfixed code.
2702 tests pass.