From c13870b5fc95cf26aca442599ba9dd678c1faf56 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 11 Nov 2022 10:59:03 -0500 Subject: [PATCH] docs: Fix readthedocs build (#154) * docs: trying to fix rtd build * update docs config * style: [pre-commit.ci] auto fixes [...] * fix path Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .gitignore | 1 + .readthedocs.yml | 12 ++++++++---- docs/requirements.txt | 11 ----------- docs/source/conf.py | 2 +- setup.cfg | 9 +++++++++ src/ome_types/__init__.py | 1 + 6 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.gitignore b/.gitignore index fa3820d4..0fb313fa 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ src/ome_types/model/ src/ome_types/_version.py docs/source/_autosummary .benchmarks/ +_build/ diff --git a/.readthedocs.yml b/.readthedocs.yml index 2139ab7c..609a4933 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,15 +5,19 @@ # Required version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/source/conf.py - # Optionally set the version of Python and requirements required to build your docs python: - version: 3.7 install: - - requirements: docs/requirements.txt - - method: setuptools + - method: pip path: . + extra_requirements: + - docs diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index bbfb343e..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -sphinx==4.5.0 -pygments -sphinx-rtd-theme==1.0.0 -# sphinx-autodoc-typehints -ipython==7.16.3 -isort>=5.0 -black -numpydoc -autoflake -xmlschema -pydantic diff --git a/docs/source/conf.py b/docs/source/conf.py index fa069f5f..bd4006db 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,7 @@ import os import sys -sys.path.insert(0, os.path.abspath("../../src")) +sys.path.insert(0, os.path.abspath("../../")) from ome_types import __version__ # isort:skip # noqa diff --git a/setup.cfg b/setup.cfg index 3a535fe7..0731f817 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,6 +44,15 @@ autogen = black isort>=5.0 numpydoc +docs = + autoflake + black + ipython + isort>=5.0 + numpydoc + pygments + sphinx==5.3.0 + sphinx-rtd-theme==1.1.1 test = pytest pytest-benchmark diff --git a/src/ome_types/__init__.py b/src/ome_types/__init__.py index d1dc8541..dc235ce3 100644 --- a/src/ome_types/__init__.py +++ b/src/ome_types/__init__.py @@ -33,6 +33,7 @@ "to_xml", "ureg", "validate_xml", + "__version__", ]