From f76f9bd79d7fed7bad3968b2c3afbdf8c614729b Mon Sep 17 00:00:00 2001 From: Riccardo Farris Date: Mon, 24 Aug 2026 15:41:17 +0200 Subject: [PATCH] Install mcpy on the docs builder The API reference switched to autodoc, which imports mcpy, but Read the Docs installs only docs/requirements.txt. Every autodoc directive therefore failed to import and the whole reference built empty, with warnings that nothing gated on (fail_on_warning is off). Adds the package to the docs environment and moves the builder to Python 3.12: the move signatures use PEP 604 unions, which 3.9 cannot even parse. The optional GPU backends stay out; conf.py already mocks torch, mace, nvalchemi, cuequivariance and mpi4py. Verified in a clean env with only sphinx, the RTD theme and mcpy installed: the build now emits no warnings and the reference pages carry their classes. --- .readthedocs.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e2b54c7..7f4a772 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,9 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.9" + # mcpy needs >=3.11 (PEP 604 unions in the move signatures), and autodoc + # imports it below. + python: "3.12" # You can also specify other tool versions: # nodejs: "20" # rust: "1.70" @@ -35,3 +37,8 @@ sphinx: python: install: - requirements: docs/requirements.txt + # The API reference is generated with autodoc, which imports mcpy. Without + # this the whole reference silently builds empty. The optional GPU backends + # stay uninstalled; docs/conf.py mocks them. + - method: pip + path: .