-
Notifications
You must be signed in to change notification settings - Fork 5
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 roundtrip test for model files #1007
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like tests are still failing
The binary diff on the database is probably too brittle. It would be more convenient to use sqldiff, which gives:
I cannot seem to get that tool from conda-forge though. I wonder why Python 3.10 and 3.12 are different though, only on Windows. |
def nodes(self): | ||
return { | ||
k: getattr(self, k) | ||
for k in self.model_fields.keys() | ||
if isinstance(getattr(self, k), NodeModel) | ||
if isinstance(getattr(self, k), NodeModel) and k != "network" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left out the network since it really isn't a node, and is such a different beast that it usually needs to be handled separately from the nodes.
This now compares the DataFrames rather than the GeoPackage bytes. |
Fixes #682. It was already fixed, but this ensures it with an extra test.