Skip to content

Commit

Permalink
DOC: move from make to sphinx, incl apidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob-Stevens-Haas committed Dec 30, 2022
1 parent 850eb8b commit d66326a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
7 changes: 4 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF
formats:
- pdf
# formats:
# - pdf

# Optionally set the version of Python and requirements required to build your docs
python:
Expand All @@ -20,4 +21,4 @@ python:
- method: pip
path: .
extra_requirements:
- dev
- docs
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_build
source/api
7 changes: 6 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# import os
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
# sys.path.insert(0, str(Path(__file__).parent.parent.parent))

from tehom._version import get_versions
revision = get_versions()['version']
Expand All @@ -37,13 +37,18 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinxcontrib.apidoc',
'sphinx.ext.autodoc',
'sphinx.ext.todo', #optional. Allows inline "todo:"
'sphinx.ext.imgmath', #optional. Allows LaTeX equations
'sphinx.ext.napoleon', #Allows google/numpy docstrings
'sphinx.ext.githubpages', #Adds .nojekyll file
]

apidoc_module_dir = str(Path("../..").resolve() / project)
apidoc_output_dir = str(Path().resolve())
print(apidoc_output_dir)

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
7 changes: 0 additions & 7 deletions docs/source/tehom.datalib.rst

This file was deleted.

10 changes: 6 additions & 4 deletions docs/source/tehom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ tehom package
Submodules
----------

.. toctree::
:maxdepth: 4
tehom.downloads module
----------------------

tehom.datalib
tehom.shared
.. automodule:: tehom.downloads
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------
Expand Down
7 changes: 0 additions & 7 deletions docs/source/tehom.shared.rst

This file was deleted.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ dev = [
"build~=0.9"
]
docs = [
"sphinx==4.0.2",
"sphinx==6.0.0",
"sphinxcontrib-apidoc",
]

[tool.setuptools]
Expand Down

0 comments on commit d66326a

Please sign in to comment.