From 6f07349c504c4254ed2d4e537cd31536504759fa Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 3 Jul 2024 17:27:59 -0400 Subject: [PATCH 1/2] docs: speed up RtD Signed-off-by: Henry Schreiner --- .readthedocs.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 0d70c293..a64ffb7a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,21 +8,13 @@ version: 2 build: os: "ubuntu-22.04" tools: - python: "3.10" + python: "3.12" apt_packages: - graphviz - - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py - -# Include PDF and ePub -formats: all - -python: - install: - - method: pip - path: . - extra_requirements: - - docs + commands: + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv venv + - uv pip install .[docs] + - .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html From 1b59bf1d4172036f9b17e8b785f14f95c9dd2e20 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 3 Jul 2024 17:34:54 -0400 Subject: [PATCH 2/2] docs: do not require setuptools for docs Signed-off-by: Henry Schreiner --- docs/conf.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index df33c772..3032a0ce 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,16 +6,14 @@ from __future__ import annotations -# Warning: do not change the path here. To use autodoc, you need to install the -# package first. -from pkg_resources import get_distribution +import importlib.metadata # -- Project information ----------------------------------------------------- project = "Hist" copyright = "2020, Henry Schreiner" author = "Henry Schreiner and Nino Lau" -version = get_distribution("hist").version +version = importlib.metadata.version("hist") # -- General configuration ---------------------------------------------------