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

Fix #429 readthedocs build #436

Closed
wants to merge 75 commits into from
Closed

Fix #429 readthedocs build #436

wants to merge 75 commits into from

Conversation

mkeilman
Copy link
Contributor

@mkeilman mkeilman commented Jan 25, 2024

Updates pykern to conform to the new readthedocs process:

  • adds .readthdocs.yml with required settings (and see below)
  • adds docs/requirements.txt and excepting it from docs/.gitignore
  • creates a ReadTheDocs command class that encapsulates the methods previously invoked directly by setup() and writes docs/conf.py

These are the commands that readthedocs runs to build documents:

git clone --depth 1 https://github.com/radiasoft/pykern.git .
git fetch origin --force --prune --prune-tags --depth 50 refs/heads/<branch>:refs/remotes/origin/<branch>
git checkout --force origin/<branch>
git clean -d -f -f
cat .readthedocs.yml
asdf global python 3.9.18
python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
python -m pip install --upgrade --no-cache-dir pip setuptools
python -m pip install --upgrade --no-cache-dir sphinx readthedocs-sphinx-ext
python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
<commands in .readthedocs.yml/build/jobs/pre_build>
cat docs/conf.py
python -m sphinx -T -E -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html

In our case the only thing in docs/requirements.txt is ".", meaning install pykern itself including its requirements as listed in setup.py._requires(), and the only pre-build command is python setup.py readthedocs to call the new command class.

Another note: we still need sphinx-apidoc to generate the .rst files. It's actually available on readthedocs but we'll do it in the command class so we have control over the packages.

YAN: python setup.py tox fails even in master. It's not related to this issue so I did not address it.

YAN: We may be able to ditch _readthedocs_fixup() but I'm not sure...

@mkeilman mkeilman requested a review from robnagler March 14, 2024 22:00
@robnagler
Copy link
Member

Superseded by #488

@robnagler robnagler closed this Jun 20, 2024
@robnagler robnagler deleted the 429-readthedocs-build branch June 21, 2024 15:14
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.

2 participants