-
Notifications
You must be signed in to change notification settings - Fork 23
Add type hints and tests to analysis
package
#43
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
base: main
Are you sure you want to change the base?
Conversation
- The untyped metadata dicts were replaced with generalized dataclasses SpikeMetadata and ContinousMetadata - Typt hints were gradually introduced in different file formats.
- Recorded with File Reader and Network Events - plugin-gui v0.6.7
+ some fixes here and there
The json schema can be used to validate the structure of a given oebin file.
Thanks for this! Let us know when you're finished making changes and we will test it out. |
analysis
package
@jsiegle, I think I'm done with changes from my side. I'd be happy if you could test it out. |
analysis
packageanalysis
package
Thanks, we should be able to take a closer look at this next week. |
With (the fantastic) 1.0 on the horizon, any news on merging this? |
This makes the elements usable as str objects.
There are a lot of (very helpful) changes here, and we will need time to test everything thoroughly. No guarantees it will happen before the 1.0 release, but we will try our best. Thanks again for all of your contributions! |
While exploring the API of the analysis package, I saw that there is an implicit abstraction of the
Continuous
andSpikes
classes. I made that abstraction explicit (addingContinuousAbstract
andSpikesAbstract
interfaces) and added type hints throughout theanalysis
package.I've also added test datasets for the binary, open-ephys and NWB data formats as well as test cases for reading those data in. While doing so I fixed potential bugs
float64
dtype (see ecd427b)Spikes
from the open-ephys format test dataset causes a reshaping error (seetest_spike_data
intest_openephys_format
).BinaryRecording
contained a call to the non-existent functioncreate_channel_map
If you find any of this useful, feel free to merge and modify my suggestions.Here's the complete CHANGELOG:
Continuous
andSpike
classes of the three formats now have an explicit interface(i.e. abstract parent class) and have been renamed to
BinaryContinuous
,BinarySpike
etc.Continuous
andSpike
in the analysis package now are typed dataclassesinstead of
dict
objects . This makes accessing metadata more reliable.analysis
package.RecordingFormat
enum for the three formatsuv.lock
file for reproducible development environments.BinaryContinuous
andBinarySpike
now have__str__
methods to give an overview overtheir contents.