Skip to content

Conversation

@thomasyu888
Copy link
Member

Problem:

Currently, we maintain a Confluence page manually with the JSON schemas we generate that can be used for Curator MVP. This won't scale as we create more JSON schemas.

Solution:

Add ad-hoc script to write jsonschemas that DPE generates to a synapse table for Curator MVP. This is partially doing some of schematic-360 work and adds a 'script' directory

Testing:

View Synapse table here: https://www.synapse.org/Synapse:syn69735275/tables/

# exclude HTAN1, HTAN2, and NF schemas as they have their own JSONschema organizations
df = df[~df["dcc"].isin(["htan", "htan2", "nf"])]
table = Table(id="syn69735275").get(include_columns=True)
table.upsert_rows(values=df, primary_keys=["uri"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this upsert functionality getting some use!

@thomasyu888
Copy link
Member Author

This could probably be added to the extensions package instead of this repo

"""
syn = synapseclient.login()
# json_schema_organizations = ["sage.schemas.v2571", "sage.schemas.v2581"]
json_schema_organizations = ["sage.schemas.v2571", "sage.schemas.v2581"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have the orgs as a parameter to the main function so that if/when we add new orgs we wouldn't have to update this?

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants