Read the Docs is planning to start failing builds for not using configuration file version key 2 on September 25, 2023. I tried the following readthedocs.yaml content with the sklearn project-template and it did not work:
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
The error that I received :
Extension error: Could not import extension numpydoc (exception: No module named ‘numpydoc’)
Here is what I am currently using in my readthedocs.yml but it will not meet requirements in September:
formats:
- none
requirements_file: requirements.txt
python:
pip_install: true
extra_requirements:
- tests
- docs
Does anyone have a readthedocs.yaml configuration file that they know to be working with the sklearn project-template, and will survive the September deadline?
The solution is to put the extra requirements listed in EXTRAS_REQUIRE from setup.py, into requirements.txt. From setup.py, the extra requirements listed here:
get added to requirements.text as:
Your requirements will probably be different. Then the following readthedocs.yml file allowed my read the docs build to pass with the sklearn project-template: