-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Milestone
Description
Description:
To improve modularity, avoid naming collisions, and enable clean usage, we will reorganize the library into a namespace using MATLAB’s +folder convention.
New folder structure:
src/
└── +biosigmat/
├── +ecg/
├── +ppg/
├── +tools/
Why use namespaces:
- Prevents name conflicts with other functions or toolboxes.
- Allows scoped imports like
import biosigmat.ppg.*. - Improves autocompletion and structure within MATLAB IDE.
- Cleaner API and easier maintainability.
User workflow (to be included in the README):
% Step 1: Add the namespace root to the path
addpath('path/to/biosigmat/src/+biosigmat')
% Step 2 (optional): Import specific modules
import biosigmat.ecg.*Setup automation:
We will provide a biosigmat_setup.m script in the root folder that:
- Automatically adds
src/+biosigmatto the MATLAB path. - Can be added to the user’s
startup.mfor permanent use.
Example script:
function biosigmat_setup()
src_path = fullfile(fileparts(mfilename('fullpath')), 'src', '+biosigmat');
fprintf('biosigmat loaded from: %s\n', src_path);
endTasks:
- Rename folders inside
src/to+ecg,+ppg,+tools, etc. - Wrap all of them under a
+biosigmat/namespace. - Update internal function calls if path-dependent.
- Add
biosigmat_setup.mto the root of the repo. - Update README to include setup instructions and optional use in
startup.m:
% In startup.m
run('path/to/biosigmat/biosigmat_setup.m');Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request