Skip to content

Commit

Permalink
Fix ReadTheDocs configuration
Browse files Browse the repository at this point in the history
Use the `--force` flag of `mamba env create` in case environment exists.

Skip `poetry run` when running `sphinx-build`
since Poetry installs in the conda environment directly.

Remove the workaround for the unwarranted error
about "missing `conda.environment`" configuration setting,
because it has been fixed already.
See:
* readthedocs/readthedocs.org#10979 (comment)
* readthedocs/readthedocs.org#11040
  • Loading branch information
fabcor-maxiv committed Feb 5, 2024
1 parent 5668661 commit ec939d8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@ build:
python: "mambaforge-22.9"

commands:
- "mamba env create --file conda-environment-dev.yml"
- "mamba env create --file conda-environment-dev.yml --force"
- "mamba run --name mxcubecore poetry install --only=docs,main"
- "mamba run --name mxcubecore poetry run sphinx-build -T -E -b html -c ./docs/ ./docs/source/ ${READTHEDOCS_OUTPUT}/html/"

# `conda.environment` is probably not used, since we use custom commands only,
# but it seems to be required (wrongly) by ReadTheDocs config file validation.
# https://github.com/readthedocs/readthedocs.org/pull/10979#issuecomment-1896036953
conda:
environment: "conda-environment-dev.yml"
- "mamba run --name mxcubecore sphinx-build -T -E -b html -c ./docs/ ./docs/source/ ${READTHEDOCS_OUTPUT}/html/"


... # EOF

0 comments on commit ec939d8

Please sign in to comment.