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

Improve portability of docs automation #1166

Open
jakob-keller opened this issue Aug 21, 2024 · 1 comment
Open

Improve portability of docs automation #1166

jakob-keller opened this issue Aug 21, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@jakob-keller
Copy link
Collaborator

          FWIW, it's nice to run the same automation @ RTD, CI, and locally. I like using tox for this (some people go for nox).

You can make RTD call tox as follows:

$ cat .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
---

version: 2

build:
  os: ubuntu-24.04
  tools:
    python: >-  # has to be parsed as a YAML string
      3.11
  commands:
  - >-
    PYTHONWARNINGS=error
    python3 -Im venv "${READTHEDOCS_VIRTUALENV_PATH}"
  - >-
    PYTHONWARNINGS=error
    "${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
    pip install tox
  - >-
    PYTHONWARNINGS=error
    "${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
    tox -e build-docs --notest -vvvvv
  - >-
    PYTHONWARNINGS=error
    "${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
    tox -e build-docs --skip-pkg-install -q
    --
    "${READTHEDOCS_OUTPUT}"/html -b dirhtml
...

Another example: pytest-dev/pytest-asyncio#920

This would allow wiring such a self-install into tox that could be run locally and in any other envs the same way.

Originally posted by @webknjaz in #1165 (comment)

@jakob-keller jakob-keller added the documentation Improvements or additions to documentation label Aug 21, 2024
@jakob-keller jakob-keller mentioned this issue Aug 21, 2024
13 tasks
@jakob-keller
Copy link
Collaborator Author

          Remember to add `-n -W --keep-going` to the invocation in a follow-up.

Originally posted by @webknjaz in #1189 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant