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

Validate features - enforce types, keep ints in range #300

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

olsen232
Copy link
Collaborator

@olsen232 olsen232 commented Nov 5, 2020

Until now, we don't validate data on commit. Since GPKG doesn't care how many bits an integer has, committing a GPKG working copy can result in the dataset containing integers with too many bits - this would stop you from checking out a postgis working copy.

#293

Checklist:

  • Have you reviewed your own change?
  • Have you included test(s)?
  • Have you updated the changelog?

Copy link
Member

@craigds craigds left a comment

Choose a reason for hiding this comment

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

nice work 🎉

sno/schema.py Outdated Show resolved Hide resolved
@olsen232 olsen232 changed the title Validate features - keep ints in expected range Validate features - enforce types, keep ints in range Nov 5, 2020
@olsen232
Copy link
Collaborator Author

olsen232 commented Nov 5, 2020

This change does also enforce types themselves (eg str vs int) but I was unaware of how important this was - have updated the documentation and the tests now

@olsen232 olsen232 merged commit e1f4ff6 into master Nov 9, 2020
@olsen232 olsen232 deleted the validate_features branch November 9, 2020 06:10
@rcoup
Copy link
Member

rcoup commented Nov 9, 2020

@olsen232 any performance impact from this?

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