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

WIP: Feature: Allow min and max values in any checks file to have null value #68

Merged
merged 9 commits into from
Oct 17, 2023

Conversation

simojo
Copy link
Collaborator

@simojo simojo commented Sep 22, 2023

This PR changes the json schema used in validation of checks files, and it changes the pydantic BaseModel class structure. See the diffs for details. This is one of two steps towards PR #59. The next step after this is to change the local checks file: .chasten/checks.yml, which will be merged after this PR is merged.

this also uses the pydantic conint type to constrain the min and max values to be greater than or equal to zero, as there is no need to have a check count be negative.
@simojo
Copy link
Collaborator Author

simojo commented Sep 22, 2023

It's worth noting that this also ships a fix where

  • if min was null, then it would check if the number of checks is higher than max
  • if max was null, then it would check if the number of checks is lower than min

This is, of course, the opposite of the expected behavior. See commit 682f54c for this fix.

@simojo simojo added the ready-for-review This pull request is ready for review label Sep 22, 2023
@simojo simojo self-assigned this Sep 22, 2023
@simojo simojo added this to the Week 5 Features milestone Sep 22, 2023
@simojo simojo added the infrastructure Docker and CI/CD setup and/or configuration label Sep 22, 2023
@gkapfham
Copy link
Collaborator

Hello @simojo, this check seems to be presenting a problem and, thus far, we've not had a team member devote the time to removing the tracking of test coverage and/or rewrite the tracking of test coverage. Your build is failing for this reason. What do you think is the best step forward?

@gkapfham gkapfham marked this pull request as draft September 26, 2023 19:54
@gkapfham gkapfham changed the title Feature: Allow min and max values in any checks file to have null value WIP: Feature: Allow min and max values in any checks file to have null value Sep 26, 2023
@jnormile jnormile self-requested a review October 17, 2023 19:53
Copy link
Collaborator

@jnormile jnormile left a comment

Choose a reason for hiding this comment

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

Directly related to PR #88 ; in any case, approved!

Copy link
Collaborator

@CalebKendra CalebKendra left a comment

Choose a reason for hiding this comment

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

This command is needed and works to fix the build

Copy link
Collaborator

@laurennevill laurennevill left a comment

Choose a reason for hiding this comment

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

Looks good

@simojo simojo marked this pull request as ready for review October 17, 2023 19:57
@laurennevill laurennevill merged commit f345eaa into AstuteSource:master Oct 17, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Docker and CI/CD setup and/or configuration ready-for-review This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants