-
Notifications
You must be signed in to change notification settings - Fork 7
Layout
Benjamin Loire edited this page Mar 30, 2023
·
1 revision
As opposed to a flat layout, the src layout is a python packaging convention that puts all code logic in a src/[packagename] folder. It is more robust structure in development and has multiple advantages over the flat layout, some of them listed here.
As OSmOSE is meant to be a toolkit for many application of bioacoustics, all the different tools must be in their own subdirectory. Furthermore, the modules should only be accessed through dot notation to reduce bloating and loading times (eg from OSmOSE.spectro import Spectrogram and not from OSmOSE import Spectrogram).
Only the following scripts are allowed at the top level of the package.
- Dataset.py : as everything using OSmOSE will be a dataset, the superclass should be the easiest to access.
- config.py : contains global parameters
- (very debatable) job.py : Cluster job management, not really a module on its own.