-
Notifications
You must be signed in to change notification settings - Fork 69
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] Build only latest version / unmodified ones #63
Comments
Hi, I believe I have addressed this issue in #64. Maybe you would like to give it a try and comment on the PR? |
I've just went through the PR, and I think that will solve the issue (partially). If I understood correctly, you clone the repo to a temporary folder and build the doc for each tag/ref using sphinx in a different folder. This raises two issues: Issue 1 is (partially) solved by always keeping master branch. Although it would be ideal to have some sort of selector that works using javascript and reads the possible tags from a remote json that it's updated with every build. From the plugin side, it's just as spitting a json file in the root with a predetermined format. Then the rest is on the templates, which instead of adding it as html, it can be added as javascript that requests the json file and populates accordingly. Additionally, it will need some extra-setup when you use it within CI as GithubPages, as you will need to checkout the gh-pages branch in the output dir Issue 2 is more problematic. Not too much if you set it up as CI and every time you add a tag is gets built with the latest master/main which at that point in time corresponds to the tag. Nevertheless, I think it's worth documenting the behaviour so users realise that the code is always run on the same version of the virtual environment, that it's just the doc versions that changes. In any case, it's a great plugin and a great start to the issue. I'm just worried about the end-users of my library who might not be aware of the versions of the library. They consider master/main is the development one and if they see only one tag before that, then that would be latest stable. |
Thanks for the feedback. |
Hi! I'm basically looking for this functionality too - our project currently has a ton of jupyter notebooks we run through to generate a suite of tutorial documentation for graspologic. Currently our notebooks are breaking readthedocs' runtime limits on memory consumption - something that's way less of a concern in a Github action. Rebuilding all of the documents for every published version would be ~13 mins per release, which is... going to be pretty brutal, after only a few releases. Using RTD as an example, I know it doesn't rebuild all of our documentation from scratch when it gives us a drop-down selector of updated versions, but it's clearly doing something to support this. I would have to imagine it's something like what @fraimondo suggested - an ancillary artifact in addition to the documentation, probably json (or something) that gets output to a specific, fixed location on maybe the I suppose you can just consider this a long-winded 👍 to the request! (And if you have any ideas on how to use |
I integrated this solution into my package: https://github.com/juaml/julearn/ Now the existing tags are not built. However, I still have one issue. When there is a pull request, docs are not built. You can check here the output: https://github.com/juaml/julearn/runs/1786309367?check_suite_focus=true My guess is that since it is not the main/master branch, it is not being built. This is because my I just made a simple local test, and indeed it builds main + tags (skipped if already present). If I remove How can I achieve this? Can I override the whitelist somehow in run time? I'm trying something like
|
For pull requests I usually just build that particular branch without sphinx-multiversion. When reviewing aPR I'm not interested in other branches/tags. This also saves build time on the CI servers. |
@fraimondo my project does build the docs on a pull request. For example see https://github.com/PandABlocks/PandABlocks-client/pull/13/checks?check_run_id=1550010895 . A PR does two builds, one against the source branch and one against the test merge to master. The latter does cause sphinx-multiversion with branch_whitelist 'master' and rebuild_tags=False to build the docs in my experience. I've taken a quick look at your project and can't immediately see why you are not getting the same result. 'unknown config value' seems to imply I have not fully implemented smv_branch_whitelist. @Holzhaus can you comment on this please? |
You can't override a value that is not present in the sphinx config. Why not set it to |
Hi there, I'm also trying to build a single branch. I've tried to set smv_branch_whitelist to I've tried:
For some reason the current branch is built but also some other with completely different name are. |
The other built branch were actually tags.. so it is resolved using
I'm using read the docs template, however using this override, the index is populated with the current branch only. Is there any way of having all branches in the sidebar? The template:
|
I use
sphinx-multiversion
to keep track of the documentation history so users can read the documentation that matches their version of the software. However, after a few releases, Travis-CI is taking quite some time to build since it has to checkout every version of the doc and build it. Furthermore, it happens that the examples (sphinx-gallery) are ran against the latest version of the library.It would be great if sphinx-multiversion can somehow do incremental builds as sphinx-build. So in this case, in the Travis-CI/GitHub Pages integration, we could check-out the current GitHub Pages, build on top of it (so it will only update certain files) and then push the updated documentation.
Great package by the way! Just trying to optimise resources here.
The text was updated successfully, but these errors were encountered: