-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Feature request: Create new inventory builder #12055
Comments
I think an I would have had a different use case: I wanted to include two separate Sphinx projects in a top-level LaTeX file (according to this example: https://github.com/spatialaudio/nbsphinx/tree/master/include-in-latex). I did this by creating an This did work because the links only went from one project to the other, and not in the other direction. |
I think this makes sense 👍 , I have an orthogonal use case, not to output the In this respect, it is somewhat of a shame, that sphinx/sphinx/domains/__init__.py Line 358 in 5523c9b
|
Technically, using For the line number, it's a bit hard because not all objects have "line number" (it depends where the reference is created and whether we should consider line continuations or not) |
Is your feature request related to a problem? Please describe.
Sometimes it is useful to build a group of Sphinx projects together in a single CI/CD job, for example the package documentation for a collection of internal Python packages or maybe a collection of auto-generated content.
The issue comes when building the projects in series while attempting to use interpsphinx between the projects and one project can't find the
object.inv
for a yet to be built project in that group. To solve this scenario, it seems having a newinventory
builder would be useful so that the CI/CD build could happen in two stages, 1) use theinventory
builder to build all the projects'object.inv
files, then 2) loop back and run all the full builds so all the cross-references are in place. This new builder potentially has other uses beyond this use case.Describe the solution you'd like
In researching this I can across a related issue, #7891. And in that issue it looks like they implemented an inventory_builder.py, so inspiration for a new
inventory
builder that only builds theobjects.inv
file already exists.Describe alternatives you've considered
Alternatively, Sphinx could not support cross-referencing within grouped builds, but that seems unnecessarily restrictive. I've also implemented workarounds for checking deployed assets as a backup, but that is not a proper representation of the local references and temporarily fails until a deploy is forced when cross-references are changed.
Additional context
I was going to attempt a local implementation using an extension, but figured it was worth starting a discussion in parallel, as it would be nice as a core feature.
The text was updated successfully, but these errors were encountered: