We currently have quite a lot of files in the project already. With the adding of the GUI, we will be adding a bunch more, and I was thinking we can start organizing the package into sub-packages (i.e. folders with an __init__.py file inside).
This way, we can separate parts of the project a bit better, and we also get a more fine-grained control over what's exposed to the user from each sub-package through the __init__.py file.
I suggest the following categories as a start:
features: we put all the individual feature modules here
gui: we put the GUI files here, so the gui can be accessed as nm.gui
analysis: we put FeatureReader, decode, perhaps nm_plots.py and nm_stats.py, basically everthing that's not realted to real-time stream running
stream: we put here Stream, DataProcessor, Generator, basically everything that has to do with stream analysis, offilne or online.
preprocessing: for filter_proprocessing.py, normalization, and other pre-processing stuff. But also, there is the FeatureNormalization, that is not exactly pre-processing but post-processing rather, but maybe it can go here nonetheless.
utils: we can have the logger and types here, define_channels.py (renamed to channels.py perhaps) and maybe the benchmarking functions when they are added
This is just a proposal, there might be other subdivision scheme that might make more sense, or better names for each of the categories. Or maybe just having the gui and features folders is enough and we can just leave the rest be for now.
I also have thought of the following changes:
Get rid of the nm_ prefix for the project files, it's not common practice and also redundant with the nm import convention we have previously established e.g. nm.nm_types should be nm.types
Rename nm_run_analysis.py to data_processor.py
Rename nm_IO.py to io.py
Get rid of nm_stream_abc abstract class and unify it with nm_stream.py, making GenericStream the common parent class for the OfflineStream and OnlineStream.
We currently have quite a lot of files in the project already. With the adding of the GUI, we will be adding a bunch more, and I was thinking we can start organizing the package into sub-packages (i.e. folders with an
__init__.py
file inside).This way, we can separate parts of the project a bit better, and we also get a more fine-grained control over what's exposed to the user from each sub-package through the
__init__.py
file.I suggest the following categories as a start:
features
: we put all the individual feature modules heregui
: we put the GUI files here, so the gui can be accessed asnm.gui
analysis
: we put FeatureReader,decode
, perhapsnm_plots.py
andnm_stats.py
, basically everthing that's not realted to real-time stream runningstream
: we put here Stream, DataProcessor, Generator, basically everything that has to do with stream analysis, offilne or online.preprocessing
: forfilter_proprocessing.py
,normalization
, and other pre-processing stuff. But also, there is the FeatureNormalization, that is not exactly pre-processing but post-processing rather, but maybe it can go here nonetheless.utils
: we can have thelogger
andtypes
here,define_channels.py
(renamed tochannels.py
perhaps) and maybe the benchmarking functions when they are addedThis is just a proposal, there might be other subdivision scheme that might make more sense, or better names for each of the categories. Or maybe just having the
gui
andfeatures
folders is enough and we can just leave the rest be for now.I also have thought of the following changes:
nm_
prefix for the project files, it's not common practice and also redundant with thenm
import convention we have previously established e.g.nm.nm_types
should benm.types
nm_run_analysis.py
todata_processor.py
nm_IO.py
toio.py
nm_stream_abc
abstract class and unify it withnm_stream.py
, makingGenericStream
the common parent class for the OfflineStream and OnlineStream.