catalystneuro / datta-lab-to-nwb

MIT License
1 stars 2 forks source link

Remove redundancy in package/module names #15

Closed pauladkisson closed 1 year ago

pauladkisson commented 1 year ago

Currently, the projected is structured with packages like markowitz_gillis_nature_2023/ and modules with redundant names like markowitz_gillis_nature_2023behaviorinterface.py.

When using absolute imports (which PEP 8 explicitly recommends), this leads to long and clunky import idioms like

from datta_lab_to_nwb.markowitz_gillis_nature_2023.markowitz_gillis_nature_2023behaviorinterface import MarkowitzGillisNature2023BehaviorInterface

Therefore, to support more readable absolute imports we should remove the redundant package_name/package_name_module_name.py structure.

But, as @CodyCBakerPhD pointed out, redundant file names can provide important information when individual files are downloaded stand-alone (ex. NWB files in DANDI). So, we should keep the redundant naming structure for metadata files that can stand alone (and could be sensibly moved around the repo).