-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
git subtree-ing leads to warnings and inclusion of demo_docs and README.rst #142
Comments
This issue affects us as well. We recently forked the theme at Freeseer/sphinx_rtd_theme so we can make minor modifications and subtreed it at Freeseer/freeseer. But I just tried to build the docs and came across all the warnings as well. My first thought was to delete the demo files (I see @binwiederhier went a step further and deleted everything except the theme). I also don't know how this would affect the subtree when getting updates. But since there's an extra step between our docs and upstream (our docs subtree -> our forked theme -> upstream theme) we should still be able to get updates from upstream by cherry picking them to our fork and then pulling in those changes via the subtree. Unfortunately, I think the process will be a bit more difficult in @binwiederhier's case. |
+1 for the comment; it's not a deal breaker, since the theme doesn't change very often (and doesn't have to), but it's a bit ugly that way... |
I talked to @ericholscher and this is not something that we really want to officially support. |
For anyone else this affects: I was able to fix these issues by including the following in my exclude_patterns = ["_themes/**"] |
Otherwise we get warnings like this: WARNING: autodoc: failed to import module 'test' from module 'test_py_module'; the following exception was raised: No module named 'test_py_module' /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/demo.rst:261: WARNING: Footnote [4] is not referenced. /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/demo.rst:267: WARNING: Footnote [11] is not referenced. /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/demo.rst:18: WARNING: Undefined substitution referenced: "problematic". /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/demo.rst:261: WARNING: Unknown target name: "5". /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/demo.rst:304: WARNING: Unknown target name: "body elements". /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/demo.rst:316: WARNING: Unknown target name: "hyperlink reference without a target". looking for now-outdated files... none found pickling environment... done checking consistency... /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/README.rst: WARNING: document isn't included in any toctree /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/demo_docs/source/index.rst: WARNING: document isn't included in any toctree /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/tests/roots/test-basic/index.rst: WARNING: document isn't included in any toctree /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/tests/roots/test-empty/index.rst: WARNING: document isn't included in any toctree /Users/sacks/cism-code/cism-wrapper/cism-wrapper_master/doc/source/_themes/sphinx_rtd_theme/tests/roots/test-missing-toctree/index.rst: WARNING: document isn't included in any toctree See also readthedocs/sphinx_rtd_theme#142
The readme page says the theme can be git subtree'd. As far as I can tell, this cannot be done without compilation warnings and the unexpected inclusion of some of the rst-files in the project root (README.rst) and demo_docs folder.
Example:
This creates a valid documentation, but it also includes the demo_docs resources and files for some reason (full output below):
An easy fix for this is to manually delete all files and folders, except for the theme directory:
But that obviously affects the git subtree, and I'm not entirely sure how updates/pulls from the subtree would be affected. Any idea how to solve this in a platform agnostic way (no symlinking)? A live example of this can be seen in the Syncany documentation (just started documenting, not much there yet).
Full compilation output:
The text was updated successfully, but these errors were encountered: