-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update validator to support floats in min/max and disallow string typ…
…es (#230) * Ensure validator checks that min/max values are not strings * Add validation to ensure that numbers and floats in min_value or max_value are not declared as strings and create test cases * Update test case definition * Format python files * Fix test * Update validation logic * Add Number type to JSON definitions for Validator to accept floats * Format python tests * Update description * Update number validator to account for value sources and update types.py to check for the types of Metadata value sources * Format python files and fix broken tests * Reformat python to pass linting * Add boolean to types accepted for metadata values * Format python * Add additional boolean valid type for operators * Rename error message variable and add Decimal into values accepted for min/max * Format files * Update definitions to allow any_value type to be booleans and update tests * Parametrize tests, add additional test cases and refactor types.py and number_answer_validator.py * Refactor method in types.py * Refactor number_answer_validator and add type hints to types.py * Add metadata of types url/uuid in test_valid_metadata.json and add new test cases to reflect that these types are allowed * Format files * Update when rule to use a different source rather than answers
- Loading branch information
1 parent
b012742
commit 9b38581
Showing
10 changed files
with
235 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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