-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I like having a Contents.m file in the top level of a package because it supports using ver(<toolboxname>) and help(<toolboxname>) and will give version information and potentially custom documentation for a toolbox.
However, the toolbox/ structure breaks the use help, and ver commands for a of Contents.m file
-
MATLAB's
verandhelpcommands rely on aContents.mfile placed in the root of a package.- With the recommended structure:
the commands
repo-root/ └── toolbox/ ├── <functions>.m └── Contents.mver(<toolboxname>)orhelp(<toolboxname>)will not work andhelp toolboxis generic and can conflict if multiple toolboxes use the same folder name on the MATLAB path.
- With the recommended structure:
-
By contrast, using:
repo-root/ └── toolbox/ └── <toolboxname>/ │ └── <functions>.m └── Contents.m- The commands
help <toolboxname>andver <toolboxname>work as intended, showing the correct documentation and version for the user's package.
- The commands
I also thought that the following could work, but it seems ver does not pick up Contents.m files placed within a namespace:
```
repo-root/
└── toolbox/
└── +<toolboxname>/
│ └── <functions>.m
└── Contents.m
```
Metadata
Metadata
Assignees
Labels
No labels