-
Notifications
You must be signed in to change notification settings - Fork 0
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 Validators: EmptyCell, ValueInList and DuplicateTraits #106
Conversation
…eInList as the test validator
… depending on ValueInList validator
…me of ValidatorTraitImporterTest. This means each of the data-row validators have their own test file
… test file naming and placement
…re booleans and null are involved.
…s (case, valid, failedItems)
trpcultivate_phenotypes/src/Plugin/Validators/DuplicateTraits.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great! Just a few more concrete comments:
- Do we need to set the genus in the validator or is it done by the trait?
- ensure raw_results at the same level as the title/details
- make clear in comments that the key from processValidationMessages() is the unique identifier of the validator UI line that just happens to currently be the validator instance key but may not continue to be so.
trpcultivate_phenotypes/src/Plugin/Validators/DuplicateTraits.php
Outdated
Show resolved
Hide resolved
trpcultivate_phenotypes/src/Plugin/TripalImporter/TripalCultivatePhenotypesTraitsImporter.php
Outdated
Show resolved
Hide resolved
trpcultivate_phenotypes/src/Plugin/TripalImporter/TripalCultivatePhenotypesTraitsImporter.php
Outdated
Show resolved
Hide resolved
trpcultivate_phenotypes/src/Plugin/TripalImporter/TripalCultivatePhenotypesTraitsImporter.php
Outdated
Show resolved
Hide resolved
trpcultivate_phenotypes/src/Plugin/TripalImporter/TripalCultivatePhenotypesTraitsImporter.php
Outdated
Show resolved
Hide resolved
trpcultivate_phenotypes/tests/src/Kernel/TripalImporter/TraitImporterFormValidateTest.php
Outdated
Show resolved
Hide resolved
trpcultivate_phenotypes/tests/src/Kernel/TripalImporter/TraitImporterFormValidateTest.php
Show resolved
Hide resolved
Co-authored-by: Lacey-Anne Sanderson <las166@mail.usask.ca>
…rray for each validator
…TripalCultivate/TripalCultivate-Phenotypes into g4.85-updateTraitDataValidators
…TripalCultivate/TripalCultivate-Phenotypes into g4.85-updateTraitDataValidators
…clude the traits service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…plicateTraits validator
…into its own test, which now triggers all exception messages
Code Climate has analyzed commit e688f14 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 94.5% (50% is the threshold). This pull request will bring the total coverage in the repository to 70.8% (0.0% change). View more on Code Climate. |
Thanks @laceysanderson! I created a new test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good! Only remaining gaps in test coverage are related to new vs. old return style which will soon be resolved!
Ready to merge! 🎉
Issue #85
Dependencies
#105 - complete!
Motivation
The 3 validators I have been primarily working on - EmptyCell, ValueInList, and Duplicate Traits - needed to be updated to accept configuration using setters and to return the new return values. This involved updating the tests and configuring the validators in the importer formValidate().
What does this PR do?
Updates each validator to use their respective traits to set and get configuration values
EmptyCell:
ValueInList:
DuplicateTraits:
Updates the validators to indicate their inputType and removes their scope in the annotation block.
Updates the validators to return the new style of return information:
Updates were made to the formValidate() method in the Traits Importer class:
Testing
Automated Testing
Some tests were re-organized as follows:
ValidatorFileRowScopeTest.php
was removedValidatorFileRowScopeTest::testValidatorValueInList()
=>ValidatorValueInListTest::testValidatorValueInList()
ValidatorFileRowScopeTest::testValidatorEmptyCell()
=>ValidatorEmptyCellTest::testValidatorEmptyCell()
ValidatorTraitImporterTest
was renamed and all of its methods moved toValidatorDuplicateTraitsTest
NEW Test added
testIndexKeyExceptions()
was added toValidatorDuplicateTraitsTest
provideWrongIndexKeys()
The following tests were updated by adding additional asserts to check for all of the expected values in the return array
Miscellaneous updates