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

add user config value validation #85

Merged

Conversation

stevebachmeier
Copy link
Contributor

Title: Add user configuration value validation

Description

  • Category: feature
  • JIRA issue: MIC-4007

This PR adds to the already-existing age perturbation value checks. Specifically:

  • zipcode digit probabilities: is it a list of exactly 5 floats between [0, 1]
  • everything without a special validation function: is it a float between [0, 1]

Testing

added pytests. all tests pass.

@stevebachmeier stevebachmeier requested a review from a team as a code owner April 18, 2023 00:12
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@rmudambi rmudambi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some minor notes.

src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Show resolved Hide resolved
src/pseudopeople/configuration/validator.py Outdated Show resolved Hide resolved
src/pseudopeople/constants/metadata.py Outdated Show resolved Hide resolved
src/pseudopeople/schema_entities.py Show resolved Hide resolved
@stevebachmeier stevebachmeier merged commit def90de into develop Apr 18, 2023
@stevebachmeier stevebachmeier deleted the feature/sbachmei/validate-user-configuration-values branch April 18, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants