Open reynoldtan opened 7 months ago
Here are the files from Reynolds first attempt at this:
These have been removed from the linked PR to allow it to be merged. We are going another direction here with a row-level validator rather then needing a helper and each validator looping through the entire file. Also the columns are changing which changes this validation in particular.
That said, there is important code in these files that will be useful so I am attaching them here for use later.
Note: The validator plugin API was set up in this PR: https://github.com/TripalCultivate/TripalCultivate-Phenotypes/issues/37 and the following PRs are examples of simple validator plugin instances: https://github.com/TripalCultivate/TripalCultivate-Phenotypes/issues/48, https://github.com/TripalCultivate/TripalCultivate-Phenotypes/issues/47, https://github.com/TripalCultivate/TripalCultivate-Phenotypes/issues/41.
Branch
g4.58-Phenoshare-Values-Validator
Groups
Group 4 - API | Services | Plugins
Describe
Focuses on validating values in a data file submitted to Tripal Cultivate Phenotypes Share Importer.
There is a Plugin Type for validators which was created as part of #37. Each type of validation we want to do is an instance of this plugin. A scope is assigned to each validator instance to indicate what part of the file it validates and the order it should be in.
This issue is to design validator instances focused on validating the new phenotypes file format. The first attempt of this by Reynold, validated all values/columns in the file in a single validator. However, we would like to move to a different model.
Design
Create an instance of validator plugin: PhenoShareImportValues
The plugin will validate the following: