Skip to content
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

Documentation: Add configuration for "Read the Docs" #142

Merged
merged 3 commits into from
Jan 9, 2023

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Jan 7, 2023

This patch implements the suggestion from GH-140, to use "Read the Docs" for hosting the documentation.

@blaylockbk
Copy link
Owner

Thanks for your efforts here and elsewhere.
Yes, I agree hosting on readthedocs would be great. I went ahead and signed up and imported Herbie. My only question before merging this is the URL the docs are hosted from. You changed all the docs URL to https://herbie-data.readthedocs.io/, but when I imported Herbie to readthe docs, it says the URL would be http://herbie.readthedocs.io/ (herbie and not herbie-data).

I think I'd like to keep it http://herbie.readthedocs.io/ to have the URL match the repo and package name. The name herbie-data I have only used for installing because herbie is already claimed on pypi.

@amotl
Copy link
Contributor Author

amotl commented Jan 9, 2023

Sounds good. I will update all links accordingly.

@amotl
Copy link
Contributor Author

amotl commented Jan 9, 2023

04c6a3f now uses https://herbie.readthedocs.io/ across the board.

@blaylockbk blaylockbk merged commit 25c52d5 into blaylockbk:main Jan 9, 2023
@blaylockbk
Copy link
Owner

The docs build failed because ModuleNotFoundError: No module named 'herbie'.

I thought selecting this checkbox would have taken care of this
image

Is there another way of telling rtd to install herbie?

@blaylockbk
Copy link
Owner

Hmmm, I added these lines to .readthedocs.config

- method: pip
      path: .

which did attempt to install herbie, but then it ran into the issue where cartopy couldn't be installed with pip. Do you know of a workaround for this? The docs use the sphinx autosummary, which I think requires herbie to be installed, but I may be wrong.

@blaylockbk
Copy link
Owner

another thing I tried was adding herbie and herbie.archive to the autodoc_mock_imports in docs/config.py, but that didn't help either. I'm not sure what else to try next.

@amotl
Copy link
Contributor Author

amotl commented Jan 10, 2023

The docs use the sphinx autosummary, which I think requires the herbie package to be installed. The installation on RTD ran into the issue where cartopy couldn't be installed with pip.

Oh I see, thanks. Based on learnings from GH-139, let's see how we can add this to the RTD configuration. It should satisfy the prerequisites for installing cartopy (geos), and others (eccodes), without needing to go all in with a full Conda environment.

- name: Install prerequisites (Linux)
if: runner.os == 'Linux'
run: |
sudo apt -y install libgeos-dev libeccodes-dev

@amotl amotl deleted the readthedocs branch January 10, 2023 11:08
@amotl amotl mentioned this pull request Jan 10, 2023
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.

None yet

2 participants