Closed JohnTaurus closed 5 years ago
At the moment, we can only handle one folder. So I think you are facing a problem that the base class is not documented. I will test this as soon as possible.
Edit: can you by any chance come with an example .rst and .m files where this problem occurs?
Thanks for your quick answer.
The full file path to the base class is determined correctly, and the base class in the other module is also documented in the expected way.
Oh. That should work. Which version of Sphinx and matlab-domain do you use.
Sphinx version 1.8.1 (not the latest) and matlab-domain version 0.4.0.
I'm back at a computer now and running the the test scripts, it works as desired. Can you upload a minimal example with the problem?
Ok, thanks! I will have a closer look at my setup, maybe I can find the problem. Otherwise I will create am example for you.
I tried again and could not find the problem. I prepared a minimal example for you. If you need further files, please let me know. The example also contains a screenshot of the generated documentation created on my machine. minimal_example_sphinx_matlab.tar.gz
I think I found the issue. You have to parse module3
and module2
before module1
. If you change the file modules/module1/_functions.rst
to
module1
-------
.. automodule:: module3
.. automodule:: module2
.. automodule:: module1
.. autoclass:: Base1Derived2
:show-inheritance:
:members:
It works as expected.
Thanks a lot! It solved the issue. Is there a more detailed documentation?
No, unfortunately I haven't had the time to work on improving the documentation. I have started with read-the-docs site, but is far from complete. I'm wondering about the automodule
thing though, it doesn't really fit into MATLAB, as there is no such thing as a module. But, because this toolbox is built upon Python autodoc feature, we are stuck with it for now. I'm considering, just parsing everything in the folder given by matlab_src_dir
.
If the base class of class A is in another module B, which is also part of the project, the link to the base class does not work properly when using
:show-inheritance:
with the autodoc command.. autoclass::
. The link is not a hyperlink and the link contains the full path to the base class file. If the base class is in the same module, it works properly.Did I miss to set a parameter?