Skip to content
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

G4.85 Update Trait Data Validators #85

Closed
laceysanderson opened this issue Jun 26, 2024 · 0 comments
Closed

G4.85 Update Trait Data Validators #85

laceysanderson opened this issue Jun 26, 2024 · 0 comments
Assignees
Labels
Group 2 - Data Importing Any issue relating to importing of biological data into either Chado or any other database. Group 4 - API | Services | Plugins Any issue related to developing an API (i.e. services + plugins)

Comments

@laceysanderson
Copy link
Member

laceysanderson commented Jun 26, 2024

Branch

g4.85-updateTraitDataValidators

Groups

Group 2 - Data Importing, Group 4 - API | Services | Plugins

Dependencies

Describe

This issue is meant to carry on from PR #77 after the discussion documented in issue #82. More specifically, it will update the validators to accept configuration using setters and to return the new return values. This will also involve updating the tests and configuring the validators in the importer formValidate.

This is meant to update the data values validators - ie. ValueInList, EmptyCell & DuplicateTraits

Design

Task 1a

(use the getters)
Currently the validators receive their config via a temporary class property set by load values (see comment #79 (comment)) and then that property is used wholesale in the validateRow method. This task is to update the validators to use the setter methods developed in #93 and stop using the context property.

Task 1b

(use the setters)
Currently the config is set in the importer configureValidators using the loadAssets. This task is to switch to calling the individual setters developed in #95 .

Task 2

Update the validators to indicate their inputType and remove their scope in the annotation block.

Task 3

Currently the validators return the old style of return value which includes the keys title, status and details. This task is to add the new design keys. We will likely keep the old keys being returned unchanged? but add a comment saying they are deprecated. Essentially,

  • the title becomes more developer friendly and becomes the case
  • the status becomes the valid key with 'fail' becoming FALSE and 'pass' becoming TRUE.
  • the items appending into the details string (i.e. failed indices or original values) are instead individual elements in a failedIems array.

Here is the design information for the new return value style:

  • 'case': a developer focused string describing the case checked
  • 'valid': either TRUE or FALSE depending on if the data is valid or not
  • 'failedItems': an array of "items" to be used in the message to the user. This is empty if the data was valid
@laceysanderson laceysanderson added Group 2 - Data Importing Any issue relating to importing of biological data into either Chado or any other database. Group 4 - API | Services | Plugins Any issue related to developing an API (i.e. services + plugins) labels Jun 26, 2024
@laceysanderson laceysanderson changed the title G4.[issueNo] Update Trait Data Validators G4.85 Update Trait Data Validators Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group 2 - Data Importing Any issue relating to importing of biological data into either Chado or any other database. Group 4 - API | Services | Plugins Any issue related to developing an API (i.e. services + plugins)
Projects
None yet
Development

No branches or pull requests

2 participants