Add breathe and doxylink for doxygen integration#45
Add breathe and doxylink for doxygen integration#45arnopo merged 11 commits intoOpenAMP:main-nextfrom
Conversation
|
@sipke |
|
Added the requested temporary commit as well as content changes to demonstrate how breathe and doxylink work. Not sure why the readthedocs build did not succeed on checkout, the commit should be there. Alternate locations of examples: |
0533302 to
293a36e
Compare
293a36e to
99be20f
Compare
|
Updated this pull request with new temporary submodule commits for open-amp and libmetal as well as updated remoteproc_design and rpmsg_design with embedded doxygen using breathe extension. I think this should cover the review request items
for issue 38. |
99be20f to
f1cd0f7
Compare
|
Bumped open-amp and libmetal git modules to those with xml and tag file generated by doxygen so this could now be merged as they are not longer temporary commits. |
|
you should be able to rebase it now, I mergered main branch in main-next to align the documentation |
f1cd0f7 to
06263c7
Compare
| .. doxygenstruct:: vring | ||
| :members: | ||
|
|
||
| Refer also :openamp_doc_link:`vring <vring>` documentation and `vring code implementation <https://github.com/OpenAMP/open-amp/blob/main/lib/include/openamp/virtio_ring.h>`_. |
There was a problem hiding this comment.
seems that there is an issue here on doc generation:
https://openamp--45.org.readthedocs.build/en/45/docs/data_structures_content.html#_CPPv45vring
There was a problem hiding this comment.
That looks to be in doxygen generated content (included via breathe), so might be in code comments. Will have to check.
There was a problem hiding this comment.
to address in a separate PR, I created the issue #63
| Platform Specific Remoteproc Driver | ||
| *********************************** | ||
|
|
||
| <<<<<<< HEAD |
There was a problem hiding this comment.
merge conflict need to be fixed in this commit
There was a problem hiding this comment.
I did some rebase mistake there I'll need to check. Had fixed it so must have pushed wrong branch or similar.
There was a problem hiding this comment.
Secondary commit had fixed the forgotten merge conflict, but first hadn't. Squashed the commits into one, as both were adding breathe/doxylink, as b72a3b4
| Platform Specific Porting to Use Remoteproc to Manage Remote Processor | ||
| ********************************************************************** | ||
|
|
||
| <<<<<<< HEAD |
| @@ -0,0 +1,136 @@ | |||
| Remoteproc Design Document | |||
There was a problem hiding this comment.
your proposal is not crystal clear to me. Here, you duplicate the documentation. Do you propose to remove the file in open-amp repo?
What about changing the format from markdown to RST directly in open-amp repo?
There was a problem hiding this comment.
I had read mention of you possibly wanting to move documentation to openamp-docs and only doxygen in code repos, or something like that, so I did this to show how breathe and doxylink looks without needing to change code repos. It's up to you which you prefer to do, then I can change code repos from md to rst or delete md file in code repos and move images from code repos to openamp-docs too.
There was a problem hiding this comment.
I just tested changing md to rst in open-amp repo, and adjusting references in openamp-docs repo, and that works the same, so if you can let me know which of the two locations you want by next week, I can adjust and then create PRs in open-amp repo to either
- change md to rst or
- delete docs and images
There was a problem hiding this comment.
@arnopo / @wmamills if you could let me know if you prefer these design docs to move to openamp-docs repository, or stay in open-amp.
If they stay in open-amp repo, then I suspect they would not generate in that repository cleanly, as the changes require breathe and doxylink, until a similar readthedocs build flow would be created in open-amp repo as is in openamp-docs.
There was a problem hiding this comment.
meeting done to discuss the design base on breathe:
decision:
- integrate this PR and move forward with breathe
- move md and image documentation from openamp repository to openamp-doc repository and convert file in RST.
06263c7 to
164621f
Compare
arnopo
left a comment
There was a problem hiding this comment.
this PR need also to be rebase to solve conflicts
|
|
||
| If you want to contribute and port OpenAMP to your platform read more about OpenAMP porting | ||
| :ref:`here<porting-guide-work-label>`. | ||
| You are encouraged to contribute to the OpenAMP project to help create a successful solution through a vibrant and engaged community. |
There was a problem hiding this comment.
Please apply the rule done on .rst files on the main branch: 100 chars max per line as much as possible
| { | ||
| /* Instantiate the remoteproc instance */ | ||
| remoteproc_init(&rproc, &rproc_ops, &private_data); | ||
| /* Instantiate the remoteproc instance */ |
There was a problem hiding this comment.
tabulation is part of the formating coding ruleof the libraries , I would prefer to keep them except if that generates issues
There was a problem hiding this comment.
put back, but still needs two spaces for the formatting at start. using a tab (instead of two spaces at start) does not format as well.
Add breathe extension to requirements.txt to allow embedding of doxygen content through rst rendered files. Add openamp and libmetal breathe projects to conf.py to integrate breathe to both library generated doxygen content. refer https://breathe.readthedocs.io/en/latest/index.html This commit relies on having doc/Doxyfile.in modified in openamp and libmetal repositories to include GENERATE_XML = YES
Add sphinxcontrib.doxylink extension to requirements.txt to allow linking, in rst files, to generated doxygen files of submodule repositories. refer https://github.com/sphinx-contrib/doxylink https://sphinxcontrib-doxylink.readthedocs.io This commit relies on having doc/Doxyfile.in modified in openamp and libmetal repositories to include GENERATE_TAGFILE = <filename as in doxylink dictionary of conf.py>
adjust the Porting guide for Remoteproc to use breathe's doxygenfunction and doxygenstruct to embed doxygen code documentation of the remoteproc_ops structure and functions using it. Also add doxylink link to the same struct in case anyone wants to look at all the doxygen documentation.
add highlighted code-block for virtio example. code-block requires two spaces for code post tag.
add links for virtio and remote proc driver
…rences the data_structures file is a markdown (md) file in open-amp repository which uses code within the file to demonstrate datastructures. Review comments were to use doxygen linking, so use breathe and doxylink in a new file within readthedocs to achieve the same reference but through linking which will maintain itself as long as doxygen comments are maintained in open-amp repo.
point and new data structures and move it to under design docs and move the porting guide as its own section rather than under library users guide.
…erences the remoteproc-design file is a markdown (md) file in open-amp repository which uses code within the file to demonstrate APIs. Review comments were to use doxygen linking, so use breathe and doxylink in a new file within readthedocs to achieve the same references but through embedding which will maintain itself as long as doxygen comments are maintained in open-amp repo.
the rpmsg-design file is a markdown (md) file in open-amp repository which uses code within the file to demonstrate APIs. Review comments were to use doxygen linking, so use breathe and doxylink in a new file within readthedocs to achieve the same references but through embedding which will maintain itself as long as doxygen comments are maintained in open-amp repo.
remove sentence as design documents have moved to readthedocs to allow embedding of doxygen content via breathe extension to readthedocs.
add line limit of 100 characters per review feedback
164621f to
7546e7c
Compare
| @@ -0,0 +1,136 @@ | |||
| Remoteproc Design Document | |||
There was a problem hiding this comment.
meeting done to discuss the design base on breathe:
decision:
- integrate this PR and move forward with breathe
- move md and image documentation from openamp repository to openamp-doc repository and convert file in RST.
| .. doxygenstruct:: vring | ||
| :members: | ||
|
|
||
| Refer also :openamp_doc_link:`vring <vring>` documentation and `vring code implementation <https://github.com/OpenAMP/open-amp/blob/main/lib/include/openamp/virtio_ring.h>`_. |
There was a problem hiding this comment.
to address in a separate PR, I created the issue #63
In order to be able to embed and link to doxygen content generated by submodules libmetal and openamp, add the sphinx extensions breathe and doxylink.
Adding these, though not trivial, will enable better consolidation of documentation between doxygen of submodule and openamp-docs docs.
Requires pull request changes in libmetal and openamp for the embedding/linking to actually work, otherwise it will give error in build output, though will not block rest of document build.
OpenAMP/libmetal#329
OpenAMP/open-amp#641
openamp-docs git submodule for open-amp and libmetal have been bumped to make the change effective for these repository document generation.