-
Notifications
You must be signed in to change notification settings - Fork 25
make html works but readthedocs-build fails inside readthedocs/build:latest #35
Comments
I'm not sure to understand your issue. From what I know by reading the README, this repository shouldn't be tied to the docker image and it should be completely independent. |
As you say, this repository does not need to be tied to any image at all, because it seems to be expected to run natively. However, I do not want to install neither python nor any dependency in the host. I want a fully portable build system. Therefore, an alternative is to write my own image which includes all the dependencies: sphinx, latex, themes, recommonmark, etc. For example, https://microbadger.com/images/ghdl/ext:sphinx is a stripped down version of Now, I want to have the missing features. I want to reproduce exactly the same build steps I get every time I push to the repo: build html, build pdf and update links in the "versions" menu of the frontrend for all the existing verions. Ideally, if I want to have some version/release but it is not generated already, I'd like the same call to look for the tag in the git history and build that too. I expect to require quite many additional packages to do so. Then, instead of extending my image to include texlive, graphviz, or any other dependency I may need, I'd like to use I don't think that adding these lines would make a difference, because all of the dependencies are already installed above. I am not using neither Supossing that I can have Shall this not be a supported workflow/feature now, do you think it is useful? Would you be open to supporting it? To be more explicit, I think this issue is a gray area according to open-source-philosophy. I'd word it like this:
What's the main motivation here? To allow users to extend RTD, using it as a stage in larger site building pipes. That is, let users enhance the base build image(s), add tools for additional pre/post-processing; have them build the site locally, and then upload the product to RTD.org. Indeed, there is no need for the last part, so you may consider the second case to be unsupported even for RTD.org. Yet, I think it'd be desirable to let people stay with RTD.org, instead of moving to GitHub pages or any other hosting service. Considering the big picture here, it'd be great to have
However, I am afraid to know that you don't actually execute multiple calls to docker run, but that you spin a single container, copy the project there and execute everything at once, as if it was a VM. Is there any resource I should check in order to know what is the 'runner sequence'? Something as: clone project, move to, pull image, spin container with bind mount, start virtualenv, install dependencies... Somehow related to this, the structure we are using in the master branch branch works with RTD.org: https://github.com/ghdl/ghdl
However, it won't work with rtd-build:
|
OK. I will try to explain my self as best I can and trying to answer your questions here. I had to read your message a couple of times to fully understand it and maybe I'm still confused in some parts.
First of all, this repository it's not stable yet and I think it's the future of RTD (but those are still just ideas since the core team has not the time to work heavily on this repo).
This sounds like a custom use of RTD since RTD is not meant (at least at this time) to be ran/called in that way. I mean, nowadays everything fits percect in the whole RTD codebase but all of those parts are not prepared to be ran independently. As I said before, I'd say that the original authors of RTD want to go in this direction but at the moment it's not possible without making some custom mofidications.
I don't have these answers, but what I can say is that RTD codebase doesn't use this command. It calls
There is nothing that blocks anyone to use the code for the open source projects.
There are a couple of options here:
and finally, what you are proposing here
Not sure to follow you here. In the cases you mentioned, why people would move to GH pages? The only thing that I can think of from the top of my head is because it allows people to upload random html instead of build the docs; but in that case, using RTD to build the docs and push them to GH pages makes no sense to me.
I agree in a 100% with you here. The only limitation to move on this direction I'd say that it has been time. But definetely it's something that we want.
You can find this at https://github.com/rtfd/readthedocs.org/blob/3e464e2fc5cf5e239a7f7db6af065d52160c64b9/readthedocs/projects/tasks.py#L67 That's where the RTD building process starts. It's not very easy to follow, so it can take you some time to fully understand it :( I'd say that most of the things/features/changes that you want are something that has been discussed some time ago (or is still in discussion) but there are other priorities for the core team to work on now. So, I'd say that we would be very happy to accept PR's to move forward on these topics if they are compatible with the RTD platform itself (I mean, I think that a PR won't be accepted if it adds a feature to this custom building process but breaks rtd.org in the middle) Hope my comment helps you to understand where we are and where we are going. Let me know your thoughts.
|
NOTE: although I didn't explicitly say it, in my previous comment I used RTD to refer to the codebase related to sphinx/latex builds and RTD.org to refer to the full app/stack. I keep this approach here.
Does this mean that there is ATM no RTD builder as a library, i.e. separated from the backend and frontend, from user and project management, etc.?
I'd add outside of readthedocs.org. Actually, I can check the sequence of instructions that RTD.org executes. E.g., in this build:
We get:
This partially resembles the suggestion in #48. Indeed, the error I get when tying to execute
Although not meant to do so, the system is almost ready. The only missing parts are steps which are executed before and/or after the snippet above. I expect these to be, cloning the repo before, uploading products after, an optionally retrieving/sending some info to the database.
I have no problem with introducing custom modifications to test this. However, I'd like to avoid the codebase related to the frontend, user creation, webhooks, etc. I.e., I want to know what happens when I manually trigger 'Build version master' in the RTD.org frontend, that is related to clone and build execution. Is this content separated or is everything defined in the same source files?
Thanks for explaining this. Indeed, it makes me think that I've been asking for a non-existent feature. That might have made it more difficult for you to understand/follow this issue. Sorry about that. If I don't take it wrong now,
No, there is not. But that is due to the license. I was suggesting to include it in the 'official support' list. As you stated above, RTD as a project is not supporting any usage outside readthedocs.org, not even reproducing the build procedure locally. Then, in practice, it is quite difficult to use RTD, and not RTD.org. To word it differently, I see little incentive to use RTD as a builder (not a hosted service) instead of sphinx. At the same time, I'd like to have that incentive, because of the main RTD.org feature: multiple versions of the documentation, related to either branches or releases.
None of these options provide a solution to have a tarball with the RTD built site that I can upload to any static file server. Well, the custom RTD.org installation would allow me to explore the container and copy the files. But that's quite dirty, and so overkill. This is especially so because I might want to use it in a external CI service. Spinning RTD.org inside a CI and having it automatically configured is not a option. Sure, it can be configured locally and upload a snapshot of the stack. Yet, it is a workaround, not a desired solution.
Well, what's missing here? Let's guess it!
Say we want to build a site with a manually written landing page, hosted at Right now, we need to build The point here is that I don't know if maintainers are ok with pushing in this direction. In the sense that making it easier to use RTD resources outside of RTD.org might make it easier to integrate RTD docs in larger sites. If RTD does not officially host those larger sites, it is expected that the number of projects actually using the service might be reduced. This can be a good new, because traffic and resource requirements to keep readthedocs.org online would be reduced. I also believe that it would help spread the usage of RTD as a library/tool. However, traffic reduction might affect income due to ads. I don't know whether it'd be possible for projects built with rtd-theme to keep the ad shown in readthedocs.org, while being hosted outside of readthedocs.org.
Is there any analysis/roadmap about the architecture of the RTD codebase and/or the required changes? I mean, there has been little time to implement it, but was any at all dedicated to it until now? Just trying to guess what the situation is. I don't want to sound critical at all.
Thanks a lot. Sadly, I know so little python. Do you know of any tool which provides an 'execution flow graph' in order to make it easier to see the sequence?
Yet, we are 'spending' a few comments to know what the current status is. Shall we make profit of this conversation and gather the related content in a section such as Using RTD as a static site generator? If the content must be 'this is currently not supported and it is not a priority', let it be. But I believe we can add some meaningful references: readthedocs-docker-images#48, this repo, this thread... Can you think of any hard-to-find related conversation/discussion which I might not easily find in the issues and/or the documentation?
As said, I feel not comfortable at all with Python. However, I can contribute with analyzing modularization possibilities in order to optimize the build process and hopefully make it easier to reuse individual resources outside of RTD.org. E.g. in readthedocs/readthedocs-docker-images#29 I made a very first demo of how to use docker multi-stage builds. If the suggestion is accepted, we should discuss about removing the first two commands (i.e. creation of the virtualenv and installation of base dependencies), and use multiple images instead. This should not break RTD.org, because we are just changing when and how dependencies are installed. But I'd probably need help with the syntax for the required Python modifications. Have a look at this alternative snippets:
They did. Thanks a lot! Note: I think we share the same mother tongue. So, the same applies to rudeness ;) and pre-apologies. |
I think we can just say at the current time, this repo is only used as a configuration parser for readthedocs.org builds, and it's unsupported for other uses. If you want to build things locally, I'd recommend using Docker, which this tool has no knowledge of. |
@ericholscher, what do you mean with 'using Docker'? All the examples here use docker containers. Precisely |
I'm saying running |
I created a PR to remove references to unsupported uses. In the comment above you suggested to use docker in order to build things locally. Did you mean using some library/package in the RTD codebase on it's own, or to use the full RTD.org stack? |
Either way, but note that those aren't supposed use cases either. You can read more here: http://docs.readthedocs.io/en/latest/open-source-philosophy.html#official-support -- we don't support installs or doing builds on any third party platform, as that is too much work for us. |
This works:
But this fails:
with error:
The text was updated successfully, but these errors were encountered: