Build doc, without code

Hi!
I have two questions.

  1. Usually, I use this to build:
$ cd openturns
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install -DPYTHON_INCLUDE_PATH=/usr/include/python3.7m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_EXECUTABLE=/usr/bin/python3 -DUSE_SPHINX=ON -DSPHINX_FLAGS="-j4"
$ make -j4

But I sometimes want to build the doc to check how it looks like, but I do not need the code. Is there any way to build the doc without the code? That would allow to make much faster doc updates, by avoiding to wait the time required to build the code.

  1. Some doc updates can be done directly with online github tools. The problem is that we generally do not look how the produced doc looks like. In this case, the continuous integration system builds it automatically. 2.a) Is it possible to publish the doc in some temporary server and see how it goes online? This would provide an option to build it locally. 2.b) Is it possible to create an “Artifact” containing a tar.gz containing the doc. We would just download the doc and see the result. Is that technically doable?

Regards,
Michaël

Concerning 1., I doubt it since we need to run Python scripts in order to produce the example. I agree 2. would be great, though.

Hi,

It is not a problem to have python scripts (or something else) to generate figures. In SciPy for instance, building the code and the doc is a different step. Sphinx is calling scripts to generate some figures. So if you already have built the code, you can just build the doc. Sphinx has some caching and subsequent builds of the doc are also faster.

As for the artifact, Circle CI allows you to build and distribute an artifact. So you can view the doc for a given commit on github.

2 Likes

Thanks for this information @tupui! I have updated our config.yml file to make sure CircleCI build_linux saves all doc pages as artifacts.