Sage-Bionetworks / schematic

Package for biomedical data model and metadata ingress management
https://schematicpy.readthedocs.io/en/latest/cli_reference.html
MIT License
21 stars 24 forks source link

In JIRA: schematic: add support for new rule combination int:recommended #980

Open milen-sage opened 1 year ago

milen-sage commented 1 year ago

Currently if a validation rule is specified as int for a given attribute the user has to provide an integer value. In some cases, an integer value is not applicable to some records for this attribute.

We can allow a new validation rule combination, e.g. int:recommended that would allow a user to enter either an integer or the string "Not Applicable".

This would address https://github.com/ncihtan/data-models/issues/85

AC: If int:recommended is specified for an attribute in the schema, a user can enter either an integer or the string "Not Applicable" for a given record and the record would pass validation.

milen-sage commented 1 year ago

@GiaJordan the desired functionality above is enabled via https://github.com/Sage-Bionetworks/schematic/pull/1000, albeit in a slightly different way? If so, feel free to close this issue and move it to sprint 21. Otherwise let's move to sprint 23. Thank you!

GiaJordan commented 1 year ago

@milen-sage functionality is similar but not exact match. If #/1000 addresses #/85 we should leave this open but in the backlog in case this specific functionality is required by another party

milen-sage commented 1 year ago

Sounds good! Let's keep it open for now and we'll check with @elv-sb.

GiaJordan commented 1 year ago

After sussing out implementation options and given the function and use case for recommended, this seems less like a rule combination with the recommended rule and more like an implementation of #780 @MiekoHash

GiaJordan commented 1 year ago

Document logic and differences between similar logic in programming languages @GiaJordan will sync up with @mialy-defelice on structure of storing validation rules

GiaJordan commented 1 year ago

Per @mialy-defelice

MiekoHash commented 1 year ago

Placeholder ticket moved to JIRA https://sagebionetworks.jira.com/browse/FDS-81. @GiaJordan I think this ticket is a good example of capturing what was done in sprint 5 and tracking remaining tasks in a new ticket. When ready, please fill out the new JIRA ticket so that description and AC reflect more up-to-date status. Thanks. cc @mialy-defelice