Skip to content

Enable ReadTheDocs on v3 #4805

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

Merged
merged 12 commits into from
Jul 3, 2021
Merged

Enable ReadTheDocs on v3 #4805

merged 12 commits into from
Jul 3, 2021

Conversation

Sayam753
Copy link
Member

@Sayam753 Sayam753 commented Jun 25, 2021

Preview - https://pymc3-fork.readthedocs.io/en/v3_rtd_docs/

This PR

  • Adds a .readthedocs.yml file to build/deploy v3.11.3 docs on ReadTheDocs. The docs will follow the same theme as docs.pymc.io
  • Updates the pymc-examples submodule

TODOs

Questions -

  • Should we pin pymc-examples submodule to a specific commit for building v3.11.3 docs?
  • In the preview, the Tutorials and Examples pages are empty. Did I miss something while building docs?
    • The contents show up by manually creating the static directories before gallery extension is used
  • I created a wiki page here on how to generate documentation for v3. What would be better - Linking this wiki page in PyMC3 documentation or having the instructions inside the documentation itself?

@twiecki
Copy link
Member

twiecki commented Jun 26, 2021

Thanks! Why do we need RTD if we already have a site?

@Sayam753
Copy link
Member Author

The plan is to switch the deployment to ReadTheDocs from GitHub pages.

Majorly RTD will help in hosting multi versioned docs. Because after v4 release, v3.11.3 docs still need to be present. That's what @OriolAbril's ideas are.

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!
looking forward to fresh docs.

On the landing page we should probably link to the installation guite wikis. I just tested the conda forge command on Windows and it's not working as expected.

@Sayam753
Copy link
Member Author

On the landing page we should probably link to the installation guite wikis. I just tested the conda forge command on Windows and it's not working as expected.

Definitely yes. Once I get the basic structure ready, we can quickly iterate to add/change stuff.

I have a question though, can the tests be disabled though for some time being for this branch? I am simply changing docs and feeling an overkill that GitHub Actions are running the entire test suite each time.

@michaelosthege
Copy link
Member

@Sayam753 you can insert this on the relevant job definitions:

jobs:
  ubuntu:
    if: false

Or alternatively comment out

on:
  #pull_request:
  push:
    branches: [main]

Comment on lines +47 to +67
<div class="ui vertical segment">
<h2 class="ui dividing header">Installation</h2>
<div class="ui three stackable cards">

.. code-block:: bash
<a class="ui link card" href="https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(Linux)">
<div class="content">
<div class="header">Instructions for Linux</div>
</div>
</a>

pip install git+https://github.com/pymc-devs/pymc3
<a class="ui link card" href="https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(MacOS)">
<div class="content">
<div class="header">Instructions for MacOS</div>
</div>
</a>

.. raw:: html
<a class="ui link card" href="https://github.com/pymc-devs/pymc3/wiki/Installation-Guide-(Windows)">
<div class="content">
<div class="header">Instructions for Windows</div>
</div>
</a>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed the installation instructions and here's how they look like - https://pymc3-fork.readthedocs.io/en/v3_rtd_docs/

@Sayam753 Sayam753 requested a review from michaelosthege July 3, 2021 14:58
@Sayam753
Copy link
Member Author

Sayam753 commented Jul 3, 2021

The PR is ready to review.

There are a few simple questions remaining in the issue description. Definitely worth discussing.
But they are not a blocker for this PR.

@Sayam753 Sayam753 requested a review from canyon289 July 3, 2021 15:51
Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The links in the In-Depth Guides section are broken, but I guess that's known?

If we merge his, it won't affect http://docs.pymc.io until we redirect the DNS registration, right?
Because in that case I'd say we should merge so we can iterate faster.

Also it will need to be cherry-picked onto main, right?

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pin pymc-examples submodule to a specific commit for building v3.11.3 docs?

I guess so? @OriolAbril maybe via date-based releases?

I created a wiki page here on how to generate documentation for v3. What would be better - Linking this wiki page in PyMC3 documentation or having the instructions inside the documentation itself?

Those instructions are essentially just the standard ones for Sphinx-based doc setups, right?
How about a README.md in the /docs/ directory?

@Sayam753
Copy link
Member Author

Sayam753 commented Jul 3, 2021

Those instructions are essentially just the standard ones for Sphinx-based doc setups, right?

Yes. I just need a place to mention the last step of rendering docs. This is an also attempt at resolving #4619

Furthermore, the instructions will get PyMC specific in case we need to pin pymc-examples to a specific commit for v3.

How about a README.md in the /docs/ directory?

I dont get it. Do you mean inside /docs/source/? because everything that needs to be in hosted documentation, has to be inside /docs/source

@michaelosthege
Copy link
Member

I dont get it. Do you mean inside /docs/source/? because everything that needs to be in hosted documentation, has to be inside /docs/source

Just a plain /docs/README.md file in the repository. Not even including it in the hosted documentation.
GitHub renders README.md files also for subdirectories.

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to play around doing similar things for the main branch. It is one option, yes. But I am not sure 100% sure if this will work (because the theme is entirely different at main)

RTD should have no problems with different versions having multiple themes, see xarray's docs for example: http://xarray.pydata.org/en/stable/ and http://xarray.pydata.org/en/v0.17.0/ have different themes but rtd allows changing between them.

I guess so? @OriolAbril maybe via date-based releases?

Not yet, we have not started using myst yet on pymc-examples so it would be best to build using the latest commit so all notebooks and updates are included. For v4 I think we landed on building examples and docs independently so that would not be an issue.

I created a wiki page here on how to generate documentation for v3. What would be better - Linking this wiki page in PyMC3 documentation or having the instructions inside the documentation itself?

I am strongly opinionated on that being part of the development guide eventually, but to get started a wiki or non-rendered readme are fine.

@Sayam753
Copy link
Member Author

Sayam753 commented Jul 3, 2021

Not yet, we have not started using myst yet on pymc-examples so it would be best to build using the latest commit so all notebooks and updates are included. For v4 I think we landed on building examples and docs independently so that would not be an issue.

I think we will be iterating on development of documentation as things get clear.

I am strongly opinionated on that being part of the development guide eventually, but to get started a wiki or non-rendered readme are fine.

I was about to add a README.md file in /docs/ as suggested by @michaelosthege . But yeah lets keep it a wiki until we have both v3/v4 docs enabled and later decide on where to add/merge it.

@michaelosthege michaelosthege merged commit 46cd323 into pymc-devs:v3 Jul 3, 2021
@Sayam753 Sayam753 deleted the v3_rtd_docs branch August 16, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants