-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 hypothesis test for netCDF4 roundtrip #3283
base: main
Are you sure you want to change the base?
Conversation
Hello @takluyver! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-10-12 09:28:07 UTC |
Thanks @takluyver. LGTM but maybe @Zac-HD can review this and #3285 |
properties/test_netcdf_roundtrip.py
Outdated
|
||
# Run for a while - arrays are a bigger search space than usual | ||
settings.register_profile("ci", deadline=None) | ||
settings.load_profile("ci") |
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'd delete this part - it's at best redundant given the changes in #3285 and I'd prefer that config.
compatible_names = st.text( | ||
alphabet=st.characters( | ||
whitelist_categories=("Ll", "Lu", "Nd"), | ||
# It looks like netCDF should allow unicode names, but removing |
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.
Where is this specified? It would be useful to provide a link and prehaps explain what's going on with the categories too 😄
@takluyver - just checking in on this one to see if there is interested in wrapping this up. |
Yes, sorry, it dropped off my radar. I've implemented all the changes suggested above. The datetime64 & timedelta64 cases don't roundtrip completely, so there are test failures. I've added these in a separate commit at the end, so it's easy to cut that back out if you prefer. |
The basic problem seems to be that Hypothesis is generating
So either that's a pretty serious bug, or you should specify the |
Part of #1846: add a property-based test for reading & writing netCDF4 files.
This is the first time I've played with Hypothesis, but it seems to be working - e.g. I got an error with float16, and the netCDF docs show that 16-bit floats are not a supported data type.
However:
max_codepoint=255
in there. I don't know if that's an expected limitation I'm not aware of, or a bug somewhere. But I thought I'd make the test pass for now.