Trouble with trying to build docs locally with gitpod

Hi all,

I’ve spent my whole day trying to figure this out but I think it is time to call in some help :sweat_smile:

So I have been working on a github issue concerning the absence of inverse trig functions from pymc, but on doing a clean install that issue disappeared and so the problem reduced to basically just updating the docs and so I updated the math.rst file which I think should fix the error but in order to do the pull request I have to check that this change obviously doesn’t break the docs which is fair enough, but now this is where my issue is.

I am on Windows and the build documentation locally page on the contribution section says you need containerisation software to go about it on Windows, I tried Docker but couldn’t get my head around it and I saw gitpod was also mentioned which I have found nicer success with. I am able to set it up OK, by following the instructions on (Using Gitpod — PyMC dev documentation) but then here is where the trouble arises. With Gitpod I have been using the default VS code IDE that you can choose (currently v1.87.0), running the .gitpod.yml file in the repo starts off opens up a new debugging window, and rerunning the setup instructions yields no dice and when I try and preview the page I get a 404 error. But even then I don’t think that is what I should be doing anyway.

The other path which I think is more along the lines of what I need to do is that on the building documentation locally page it gives instructions to put into the terminal window, the first one is

conda install -f conda-envs/environment-docs.yml

but then since this is going through gitpod it tells me that conda is not a recognised command. Running the ‘pip install -e .’ works completely fine as far as I can tell other than a deprecation warning:

The later instructions:

make clean
make html
make rtd

Also don’t cooperate as I am told make is not a recognised bash command either, I see there is a Makefile which when I click on it I can’t run anything but VScode gives me a prompt to download the makefile tools extension (Makefile Tools - Visual Studio Marketplace) but it still doesn’t allow me to use those commands through terminal instead I can only really seem to use this:

but I can’t really make sense of that either :sweat_smile:

So yeah basically if anyone can help me make sense of compiling the docs, whether it is an issue with VScode/gitpod compatability or if I am just running the wrong things then any help is welcomed :sob:

Hi, sorry I missed the question. A quick answer is if you are on Windows create a PR (could be a draft one) and check the documentation preview from there. It takes longer to generate than locally, but the documentation infrastructure is not designed for windows and several dependencies can be tricky to install too.

Might be worth looking into doc building within GitPod too, or even from windows, and I’d be happy to help and review PRs and such, but I’d definitely need help. I am not familiar with GitPod and I don’t have access to any windows computer

1 Like

Thanks, coincidentally Ricardo replied to my Github issue with the same suggestion today as well :sweat_smile: so I shall probably use that approach in the meantime. There are some docs on using gitpod but it is all about setting it up rather than previewing how the website would look on a build, probably for the exact reasons you mentioned! But thanks for getting in touch anyways!