From 032c96861541e530eef22c3dc34525b235b12d3e Mon Sep 17 00:00:00 2001 From: Tom Pike Date: Sat, 8 Jun 2024 12:52:24 -0400 Subject: [PATCH] set up an environment --- .readthedocs.yml | 12 ++++-------- pyproject.toml | 13 ++++++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 82398a01..73325127 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,19 +9,15 @@ build: tools: python: "3.10" -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/source/conf.py - fail_on_warning: false - python: install: - method: pip path: . - extra_requirements: - - docs conda: environment: docs/source/environment.yml - +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + fail_on_warning: false diff --git a/pyproject.toml b/pyproject.toml index f6aed402..41e63136 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,8 +54,19 @@ extend-ignore = [ "ISC001", # ruff format asks to disable this feature ] +[project.optional-dependencies] +docs = [ + "myst_parser", + "pydata-sphinx-theme", + "jupyterlite-xeus>=0.1.8,<0.2.0", +] -extend-exclude = ["docs", "build"] +[tool.hatch.envs.docs] +features = ["docs"] +[tool.hatch.envs.docs.scripts] +build = "sphinx-build -b html docs/source docs/build/html" +serve = "python -m http.server --directory docs/build/html" +#extend-exclude = ["docs", "build"] # Hardcode to Python 3.10. target-version = "py310" \ No newline at end of file