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

Additional bbox validation. #122

Merged
merged 4 commits into from
May 16, 2023

Conversation

eseglem
Copy link
Collaborator

@eseglem eseglem commented May 16, 2023

What I am changing

  • Add consistent bbox validation across the board.
  • Add more specific validation errors to bbox.

How I did it

  • Create a generic bbox validation function, and re-use it everywhere.

How you can test it

  • Existing tests, plus one additional.

Related Issues

I tried a lot of different ways to accomplish this with mixins and such, but none of it worked out for Pydantic 1.x. Mostly had issues with differences between GenericModel and BaseModel. Looks like there are probably better ways to do some of this for Pydantic 2.x, but haven't dug into it yet. Just wanted to push this so I wouldn't forget again.

@vincentsarago vincentsarago self-requested a review May 16, 2023 06:53
Copy link
Member

@vincentsarago vincentsarago left a comment

Choose a reason for hiding this comment

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

Thanks @eseglem

I'll cut a release with this later today 🙏

@vincentsarago vincentsarago merged commit d2a484d into developmentseed:main May 16, 2023
5 checks passed
@eseglem eseglem deleted the feature/bbox-validation branch July 5, 2023 14:47
@eseglem eseglem restored the feature/bbox-validation branch July 5, 2023 14:48
@eseglem eseglem deleted the feature/bbox-validation branch July 5, 2023 14:48
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.

None yet

2 participants