diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..ffdd1d6 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,19 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.8" + +python: + install: + - method: pip + path: . + extra_requirements: + - doc diff --git a/doc/conf.py b/doc/conf.py index 5f5bac6..7456920 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -11,9 +11,8 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os -# import sys import tomli -from importlib.metadata import version +import pkg_resources from datetime import datetime # sys.path.insert(0, os.path.abspath('.')) @@ -30,7 +29,7 @@ copyright = f"2022-{datetime.now().year}, {_author}s <{_email}s>" author = f"{_author}s" -_version = version(project) +_version = pkg_resources.require(project)[0].version # The full version, including alpha/beta/rc tags release = _version @@ -42,6 +41,7 @@ # ones. extensions = [ "sphinx.ext.autodoc", + "numpydoc", ] # Add any paths that contain templates here, relative to this directory. diff --git a/pyproject.toml b/pyproject.toml index e279ffd..2417bae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,11 @@ dev = [ "isort == 5.8.0", "pre-commit >= 2.9.0", ] +doc = [ + "sphinx", + "sphinx-rtd-theme", + "tomli", +] [project.scripts] ae_bundle_streamlines = "scripts:ae_bundle_streamlines.main"