Replies: 10 comments
-
Example Header Function (only example not fully with Doxygen syntax): % //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// % //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function [output_a] = niceFunction(input_a,input_b) end |
Beta Was this translation helpful? Give feedback.
-
Example Header for examples or demo (only example not fully with Doxygen syntax): % //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Beta Was this translation helpful? Give feedback.
-
Having a change log in the header defeats the purpose of git, especially in this early stages of development. |
Beta Was this translation helpful? Give feedback.
-
I don't like having lines comments that are just random symbols. It makes the files look cluttered. |
Beta Was this translation helpful? Give feedback.
-
Every file should start with a comment
to show up in the MATLAB file browser. |
Beta Was this translation helpful? Give feedback.
-
Update:
Only using Matlab comments is the most simple solution. The documentation can then be accessed with doc casos.PS or help casos.PS from the Matlab command line. However, using Sphinx allows for even more flexibility as one can combine automatic extraction of classes/functions/methods with custom additional information in the The matlabdoc builder seems to be a good way to automatically turn the Sphinx documentation into the official Matlab html documentation format from 2.
|
Beta Was this translation helpful? Give feedback.
-
Would it be possible to distinguish the documentation between the external and internal API (like CasADi does)? Otherwise, if someone just wants to 'use' the toolbox, they might be overwhelmed by all the internal documentation... |
Beta Was this translation helpful? Give feedback.
-
After trying this, it seems like it will not work in an automated fashion. However, we can exclude methods, meaning for the most important interfaces, the documentation would require some manual work. Here is an example of what it looks like to exclude members: .. autoclass:: PS
:members:
:exclude-members: casadi.SX, casadi.DM However, there could be other ways to achieve this that I am not aware of yet. Personally, I think it would be beneficial to add some guides for using
|
Beta Was this translation helpful? Give feedback.
-
This already exists -- everything within the |
Beta Was this translation helpful? Give feedback.
-
Yes, seperating those is easily possible 👍 |
Beta Was this translation helpful? Give feedback.
-
We should think about adding function headers similar to e.g. sosopt or other toolboxes. Even if we move to another language the header can be moved, too.
The header should include a short description, input, output, if necessary reference (to papers,books etc), license related things and maybe a change record. In sosopt short examples with different in- and outputs are also provided. I provide an example below.
We should also think about code documention using doxygen https://www.doxygen.nl/
There is also a Matlab tool on the exchange that allows us to use Doxygen syntax https://de.mathworks.com/matlabcentral/fileexchange/25925-using-doxygen-with-matlab
If we move to C/C++ we probably only have to exchange the comment indicator i.e. from % to //.
Beta Was this translation helpful? Give feedback.
All reactions