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
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
```
I like having a Contents.m file in the top level of a package because it supports using
ver(<toolboxname>)andhelp(<toolboxname>)and will give version information and potentially custom documentation for a toolbox.However, the
toolbox/structure breaks the usehelp, andvercommands for a of Contents.m fileMATLAB's
verandhelpcommands rely on aContents.mfile placed in the root of a package.ver(<toolboxname>)orhelp(<toolboxname>)will not work andhelp toolboxis generic and can conflict if multiple toolboxes use the same folder name on the MATLAB path.By contrast, using:
help <toolboxname>andver <toolboxname>work as intended, showing the correct documentation and version for the user's package.I also thought that the following could work, but it seems
verdoes not pick up Contents.m files placed within a namespace: