Gate that provisioning and the export name a field identically - #228
Merged
Conversation
SEEK matches a sample imported from a FAIR Data Station to an attribute of its Sample Type by the property URI. The Sample Type carries it as a pid and the data RDF as the predicate, derived at two separate sites, and when they drifted apart the import matched nothing and reported no error. The first version of this gate passed against deliberately broken code: every built-in profile happens to use URI-safe field names, so nothing exercised the encoding. A profile is user-supplied data and nothing stops a field being called "Source Name", so the cases now come from a profile written for the purpose. It fails five ways against a raw pid and one way against a raw predicate.
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.
SEEK matches a sample imported from a FAIR Data Station to an attribute of its Sample Type by the property URI. The Sample Type carries it as
pid, the data RDF carries it as the predicate, and the two are derived at separate sites. When they drifted apart (#227) the import matched nothing and reported no error — samples would simply arrive empty.The first version of this gate was worthless
It checked every built-in profile and passed against deliberately broken code, because every built-in profile happens to use URI-safe field names. Nothing exercised the encoding at all.
A profile is user-supplied data: nothing stops a field being called
Source Name, and that is exactly where this came from. The cases now come from a profile written for the purpose — space, slash, parentheses, a degree sign — and the gate is verified to fail five ways against a raw pid and one way against a raw predicate.Also
The profile loop no longer wraps loading in
try/except/continue. A built-in profile that will not load is a defect, and swallowing it would leave this gate quietly covering fewer profiles than it appears to.83 SEEK tests pass.