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.
The purpose of this PR is to address an issue from HTAN.
The error surfaced in the function
format_row_annotations
. The purpose was to format annotations to display on synapse. If there was a list of values, we need to split them up so they display properly. So its looking to split the entry if the validation rule is a list. The problem surfaced because the way the validation rules was being accessed was through a SchemaExplorer (SE) object that was instantiated using defaults, so it was only loading the default Biothings Schema.Biothings does not contain
ProtocolLink
hence theKeyError
.To get around this, I found it was easier to just move through the SchemaGenerator (SG) instead. There is an analogous function to pull out the validation rules. I just instantiated the SG within the
metadata.py
init
, and passed it to downstream functions as needed.Tested effected functions.