-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix up scratch API #1309
Fix up scratch API #1309
Conversation
A key problem with empty string is that it is basically just side-stepping a required field by leaving it blank. I think requiring that users provide a description for the data they put into scratch is not much of a burden and at least provides some minimal documentation what those fields are about. |
This PR is ready to go. Previously the default values for 'notes' and 'table_description' were empty string (both are required in the schema). I changed these arguments to be required, which is a breaking change. This will be pushed in the next version, PyNWB 2.0.0, which will include other breaking changes (e.g. TimeSeries.data will be required). |
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 agree with Oliver.
Motivation
Fix #1307, add missing unit tests, fix incorrect docval, clean up warnings and errors.
ScratchData
requires notes, so set the default to empty string. A warning is raised inadd_scratch
if the notes argument is None or empty string. A warning is also raised inadd_scratch
if a pandas.DataFrame is provided and the table_description argument (required for DynamicTable) is None or empty string.@bendichter I remember you saying something about empty strings being problematic. Could you elaborate?
Checklist
flake8
from the source directory.#XXX
notation whereXXX
is the issue number?