Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include user documents #90

Merged
merged 11 commits into from
Apr 10, 2024
Merged

Conversation

rkent
Copy link
Contributor

@rkent rkent commented Apr 3, 2024

fixes #83

This PR is fairly significant, because it adds user documentation from the /doc folder into rosdoc2.

Notes:

  • The PR includes some previously submitted PRs (like PR Refactor sphinx directories #88) so I might need to rebase it before final.
  • Assuming PR Refactor sphinx directories #88, the items generated into the build document only show up in the docs_build folder, so there is no good reason to tag those with a 'generated/' directory. Also, as we add more items to rosdoc2, there are going to be additional things added. So instead I am using named directories for added things. Here I use 'user_docs', I also renamed the interface landing directory to 'interfaces'
  • The style that I have been using for the parent index has been 'category/details', where category is 'C++ API' or 'Python API' for example. Here I continued that, using 'Documents' as the category. Virtually everyone who customizes their index.rst puts each document instead at the top level of the index. But they are controlling the details of that. If there are a lot of documents, other important categories would get lost, so I think using a containing index entry "Documents" is preferable when that is going to be an unordered list of documents from a folder.
  • What to do with documents in subdirectories? Items like /doc/subdirectory/thedocument.rst are placed in the index with the name 'subdirectory/' with a corresponding .rst document created to list all of those documents.

To help with review, I processed packages that have /doc folders, and uploaded the results to http://test1.rosdabbler.com You can also get some idea looking at the rendering of full_package in the test suite.

Much of the time the result is favorable. However there are a number of issues that can be seen.

  • Internal anchors are not working (like ## Overview [⬆](#swri_dbw_interface)
  • Some documents include embedded math or latex that is not being rendered properly, and instead shows up as embedded code gobbledygook, (like $$\begin{equation}\label{eq:QP}\tag{QP} )
  • Some documents include cross-reference to other documents that assumes things that don't exist in our implementation.

Some of these issues might be fixed with adding additional options to myst, or with other fixes. I am going to recommend though that we deal with those in followup PRs, rather than try here to fix issues in specific package renderings.

@rkent rkent requested review from audrow and tfoote as code owners April 3, 2024 22:35
@tfoote
Copy link
Member

tfoote commented Apr 5, 2024

The others are merged and this now has a conflict, probably the fixups from before the merge.

The example output looks great such as rclcpp's API review just popping out http://test1.rosdabbler.com/rclcpp/

One I noticed as the fuse_doc directory here: http://test1.rosdabbler.com/fuse_doc/ that appears to have overridden the wrapper. Is that from a different test or did it's sphinx take over the wrapped invocation?

@rkent
Copy link
Contributor Author

rkent commented Apr 5, 2024

fuse_doc has completely replaced our generated index.rst and conf.py with their own. See http://docs.ros.org/en/iron/p/fuse_doc/ it should be no different.

This should be ready for review again.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing on this. The updates to bring in these additional resources is great.

@tfoote tfoote merged commit 8d2ceb0 into ros-infrastructure:main Apr 10, 2024
2 checks passed
@rkent rkent deleted the user-documents branch April 21, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show user provided documentation from /doc (and maybe from /docs)
2 participants