-
Couldn't load subscription status.
- Fork 0
Add script to build access requirement JSON schemas and support registering + binding in Synapse #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Bankso
wants to merge
37
commits into
main
Choose a base branch
from
add-ARjson-build-script
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Initial script version, created using ChatGPT
Adjust annotation names and argparse arguments add additional condition, based on column "Activated_By_Attribute" in source AR data dictionary
Add attribute typing and adjust auto-generated schema name
- simplify input arguments to take either a path or url that points to a JSON schema - update expected naming convention for JSON - update path/url parsing to accept AR and non-AR schemas
Modify script to automatically generate additional conditions based on columns in data dictionary CSV, provided they are not considered a "base condition", as defined on line 60
Don't require org name, since it has a default
Passing -m at runtime will generate a JSON schema with additional conditions beyond dataUseModifiers, as defined in the AR data dictionary CSV. If -m is not given, then JSON schema "if-then" statement will only be controlled by the value of annotation "dataUseModifiers"
Added inputs for study id and study col, to designate an additional Id by which to filter ARs Adjusted existing inputs to have dedicated grant id and grant col Added logic to filter by study id if it is provided Added additional identifiers to schema Ids and output file names: study id and "mc" to indicate a multi-component schema
Make version the second to last argument, to simplify parsing
Adjusted slicing/list position references when parsing input URL/file path to ensure all info is accurately captured
Add option to identify that a schema has AR-related information integrated, which will ensure "enableDerivedAnnotations" is used when binding the JSON
Select ARs based on data type. Add data type designation to file name and schema id if provided.
Add option to provide species when selecting conditions from input table. Add filtering conditions and integrate into file name + schema id
Supports option to not bind schema
Implement option to not bind the schema; this is useful if the schema will not be used directly, but will be referenced by other JSON schemas used in Synapse. Note that the URL and unique schema id will be printed to the terminal for reference.
Improves naming convention clarity
When using --help flag, placing get_args first ensures the help message is printed and the script is stopped before logging into synapse
Ensure schema bind functions are not run if no target synId is provided Update print functions to improve readability
Add script that modifies JSON schemas from schematic to include a "contains" label for attributes with enums in conditionals. This is to allow multiple conditions to be applied, based on a single input array
Changed the output filename separator from '.' to '-' for consistency. Also fixed minor formatting in the dictionary assignment for better readability.
Addresses bug `TypeError: expected string or bytes-like object`
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.
Help text for current script version (click details):
Help text for current script version (click details):