-
Notifications
You must be signed in to change notification settings - Fork 99
Restructure Documentation #1813
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
base: develop
Are you sure you want to change the base?
Conversation
The linop group is often added with other groups. These other groups are mostly subgroups of linop, so there is no need to specify it twice. Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
This does the following things: - add sphinx to create non-reference/api documentation - move doxygen stuff into a subdirectory of the sphinx configuration - enable read-the-docs to host documentation Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
Signed-off-by: Marcel Koch <marcel.koch@kit.edu>
- spelling - fix yaml formatting Co-authored-by: Thomas Grützmacher <thomas.gruetzmacher@tum.de>
Plain program under the example shows empty block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not review the major part yet
|
||
{# | ||
Copied from: https://github.com/executablebooks/sphinx-book-theme/blob/master/src/sphinx_book_theme/theme/sphinx_book_theme/macros/buttons.html | ||
to remove the light/dark theme switcher button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to remove light/data theme button?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the doxygen API doesn't work with it. The doxygen thing will not change entirely, so there are always some blocks which are light colored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is exactly the issue I mentioned. I have no idea how to fix those white blocks, so I would put this as an issue to fix later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can change the Sphinx theme ? I prefer ones where both dark and light themes work well. Some themes which seem to be quite nice:
- https://sphinx-book-theme.readthedocs.io/en/stable/
- https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
In particular, the PyData seems nice, because it has support for Jupyter extensions, which could be useful for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current theme is sphinx-book
. Because of doxysphinx, we are limited to the sphinx themes supported by them: https://boschglobal.github.io/doxysphinx/#caveats.
The issue with the light/dark theme isn't due to the sphinx theme, it's due to doxygen. I'm sure it's possible to get it working, but I don't have it on my priority list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I am not sure how useful the detailed doxygen documentation is. It might be better to not have the complete class/namespace list, but only focus on specific user-facing API and integrate it in the Sphinx documentation through breathe: https://breathe.readthedocs.io/en/latest/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breathe makes the doxygen API available as sphinx docs, which has the advantage of simpler integration, but the generated formatting of C++ API is just plain horrible. Since Sphinx is python focus it doesn't care about parameter types, so types aren't aligned for multi-line function signatures.
@@ -1,4 +1,4 @@ | |||
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors | |||
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should jacobi.hpp be deleted in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, this just keeps all of the documentation as it currently is. This PR changes only how it's presented.
- deactivate unnecessary cmake options - typos - generate sphinx config info Co-authored-by: Yu-Hsiang M. Tsai <yhmtsai@gmail.com>
Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to remove something like GINKGO_DOC_GENERATE_DEV
in install.md
|
||
{# | ||
Copied from: https://github.com/executablebooks/sphinx-book-theme/blob/master/src/sphinx_book_theme/theme/sphinx_book_theme/macros/buttons.html | ||
to remove the light/dark theme switcher button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add_custom_command(TARGET "doxygen" POST_BUILD | ||
COMMAND make | ||
COMMAND "${CMAKE_COMMAND}" -E copy refman.pdf | ||
"${CMAKE_CURRENT_BINARY_DIR}/${name}.pdf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name is undefined here
doc/CMakeLists.txt
Outdated
CREATE_LINK ${Ginkgo_SOURCE_DIR}/LICENSE ${Ginkgo_BINARY_DIR}/LICENSE | ||
SYMBOLIC | ||
) | ||
file( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we use test_install somewhere in documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in install.md
, right at the bottom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested it, but it actually downloaded the file.
I think it should be a link to the github page on the code rather than download that file.
- copy directories directly - add missing examples - remove doc of removed cmake option Co-authored-by: Yu-Hsiang M. Tsai <yhmtsai@gmail.com>
@@ -0,0 +1,38 @@ | |||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after this pr, we need to have registered in readthedoc. They will constantly fetch the repo or get the notification by some API hook. We do not need to do anything on our CI, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it gets automatically picked up: MarcelKoch#20.
I think all of the configuration happens on the read-the-docs side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I have also seen https://docs.readthedocs.com/platform/stable/guides/automation-rules.html such that we can set up a rule to just make the release and latest version documentation not-hidden to user.
We can make the normal branch either in hidden state (still build) or deactivated (no build).
for code ```c++ will give a ++ in the beginning on the section https://ginkgo-test.readthedocs.io/doxysphinx/doxygen/html/group__Executor.html |
It's the same for our current documentation: https://ginkgo-project.github.io/ginkgo-generated-documentation/doc/develop/group__Executor.html#gae20be793db14dfd6249a315281201550. |
- use link to GH repo instead of relative file path Co-authored-by: Yu-Hsiang M. Tsai <yhmtsai@gmail.com>
Error: The following files need to be formatted:
You can find a formatting patch under Artifacts here or run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this documentation configuration.
You seems to still update something. I will review again when you finish.
@@ -0,0 +1,38 @@ | |||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I have also seen https://docs.readthedocs.com/platform/stable/guides/automation-rules.html such that we can set up a rule to just make the release and latest version documentation not-hidden to user.
We can make the normal branch either in hidden state (still build) or deactivated (no build).
project = 'Ginkgo' | ||
copyright = f'{datetime.date.today().year}, The Ginkgo Authors' | ||
author = 'The Ginkgo Authors' | ||
release = '@Ginkgo_VERSION@' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe need the version tag to distinguish develop/release?
This PR splits the documentation into a part that is generated by sphinx and one that is generated by doxygen.
The doxygen part will cover only the reference API documentation, and anything else will be left to sphinx. The full separation is not done in this PR.
Changes:
usr
doc is available, thedev
doc is removed. IMO there is no need for adev
doc, since we can expect developers to look into the Ginkgo source code and discover the documentation there.This is a continuation from #1679. Compared to the previous PR, this has a cleaner integration of doxygen into the documentation build by sphinx.
Link to generated docs: https://ginkgo-test.readthedocs.io/doxysphinx/index.html
Todo: