diff --git a/docs/src/conf.py b/docs/src/conf.py index 453bb1047..ecdee45d7 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -10,6 +10,10 @@ ROOT = os.path.abspath(os.path.join("..", "..")) sys.path.insert(0, ROOT) +# when importing metatensor-torch, this will change the definition of the classes +# to include the documentation +os.environ["METATENSOR_IMPORT_FOR_SPHINX"] = "1" + # -- Project information ----------------------------------------------------- # The master toctree document.