Working with git submodules
See original GitHub issueI’m attempting to switch to sphinx-multiversion, but I’ve run into an issue that I don’t think there is an existing solution for. If there isn’t, I’m curious if this is something you’d be willing to support and how you’d like it implemented.
I have a project where the code is in one repository and the sphinx docs source files are in another. The docs repository is included in the code repository as a git submodule. So you have something like:
myrepos/
mypkg/
__init__.py
doc/ <-- git submodule
conf.py
I’d like sphinx-multiversion to take the tags and branches it uses from the code repository (myrepos/), but because doc/ is also a git repository itself sphinx-multiversion is only using the ones defined there. Is it possible to make sphinx-multiversion look one level up for the main repository?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Git - Submodules - Git SCM
Let's start by adding an existing Git repository as a submodule of the repository that we're working on. To add a new submodule...
Read more >Git submodule - Atlassian
A git submodule is a record within a host git repository that points to a specific commit in another external repository. Submodules are...
Read more >Using submodules in Git - Tutorial - Vogella.com
Submodules are Git repositories nested inside a parent Git repository at a specific path in the parent repository's working directory. A submodule can...
Read more >Working with submodules - The GitHub Blog
Git submodules work well enough for simple cases, but these days there are often better tools available for managing dependencies than what Git ......
Read more >Mastering Git submodules - Medium
Submodules, like subtrees, aim to reuse code from another repo somewhere inside your own repo's tree. The goal is usually to benefit from ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I also ran into another issue that is probably related to the
git archivestrategy. In my project I’m using the extensionmatplotlib.sphinxext.plot_directiveto generate plots dynamically. The images generated using this extension are pointing to the build directory in the final html (e.g./var/folders/0x/lypfmsxn567blxmckglkdk7w0000gn/T/tmpnnbp7yj1/95cac2b19a3156da5a6d46f657da237d0ad4f54d/docs), so when I deploy my docs to github pages the images are not found. I wasn’t able to find any workaround to deal with this issue.For now I guess I will deploy only the docs generated for the latest version of my project, but in the future I plan to dive further into this issue.
@taironemagalhaes That sounds like a bug in the extension you’re using. It should generate the images in the output directory, not the source directory. Or it should use relative paths and copy the generated images to the output dir.