[SYNPY-1794] Modified EntityView creation of strings and list cols#1340
Merged
andrewelamb merged 8 commits intodevelopfrom Mar 20, 2026
Merged
[SYNPY-1794] Modified EntityView creation of strings and list cols#1340andrewelamb merged 8 commits intodevelopfrom
andrewelamb merged 8 commits intodevelopfrom
Conversation
thomasyu888
reviewed
Mar 19, 2026
Member
thomasyu888
left a comment
There was a problem hiding this comment.
Do some of the jsonschema examples need to be updated in the test directory?
Contributor
Author
I don't think so, we're still expecting the same inputs to this. |
thomasyu888
reviewed
Mar 19, 2026
Member
thomasyu888
left a comment
There was a problem hiding this comment.
🔥 LGTM! From a product perspective, I ran this code
entity_view_id, task_id = create_file_based_metadata_task(
synapse_client=syn,
folder_id="syn74212632", # Folder containing your data files
curation_task_name="test different defaults", # Must be unique within the project
instructions="Annotate each file with metadata according to the schema requirements.",
attach_wiki=False, # Creates a wiki in the folder with the entity view (Defaults to False)
entity_view_name="Animal Study Files View",
schema_uri="HTAN2Organization-BulkWESLevel1-1.3.0", # Schema found in Step 2
)
print(f"Created EntityView: {entity_view_id}")
print(f"Created CurationTask: {task_id}")
And here's the schema
I'll defer to @linglp for final review
Member
|
@andrewelamb should the tests be re-run? May want to pull from upstream as tests have been fixed in develop (i think) |
linglp
reviewed
Mar 20, 2026
linglp
approved these changes
Mar 20, 2026
Contributor
linglp
left a comment
There was a problem hiding this comment.
LGTM! Just a minor comment.
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.
Problem:
When creating an EntityView for file-based validation, the max size was being set for string and list-string columns. Users were running into these limits. In addition, a use-case for finding the type of a column when the type was an array of possible types wasn't being accounted for:
Solution:
When creating the columns for the EntityView:
MEDIUMTEXT["string", "null"]) and there is only one nonnulltype, that type is used, otherwise the Synapse type is set asMEDIUMTEXTmaximum_sizeparameter is no longer usedTesting:
Unit tests for new and changed functions extended