diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..f4c3c230a --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,33 @@ +# .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-20.04 + tools: + python: "3.9" + # You can also specify other tool versions: + # nodejs: "16" + # rust: "1.55" + # golang: "1.17" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + fail_on_warning: true + configuration: docs/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +# formats: +# - pdf + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: environment/requirements.txt + - requirements: docs/requirements.txt + - method: pip + path: . diff --git a/docs/conf.py b/docs/conf.py index 4aa57b313..190f555ab 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,4 @@ +# pylint: skip-file # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full @@ -10,10 +11,10 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys +sys.path.insert(0, os.path.abspath("..")) # -- Project information ----------------------------------------------------- @@ -30,10 +31,13 @@ release = "0.0.0" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] +extensions = [ + "sphinx.ext.duration", + "sphinx.ext.doctest", + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.intersphinx", +] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -46,9 +50,4 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "alabaster" - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] +html_theme = "sphinx_rtd_theme" diff --git a/docs/dataset.rst b/docs/dataset.rst new file mode 100644 index 000000000..24eb99a59 --- /dev/null +++ b/docs/dataset.rst @@ -0,0 +1,38 @@ +.. _dataset: + +============ + +Collate +---------------- + +.. automodule:: pyrad.nerf.dataset.collate + :members: + :show-inheritance: + +Colmap Utils +---------------- + +.. automodule:: pyrad.nerf.dataset.colmap_utils + :members: + :show-inheritance: + +Image Dataset +---------------- + +.. automodule:: pyrad.nerf.dataset.image_dataset + :members: + :show-inheritance: + +Structures +---------------- + +.. automodule:: pyrad.nerf.dataset.structs + :members: + :show-inheritance: + +Utils +---------------- + +.. automodule:: pyrad.nerf.dataset.utils + :members: + :show-inheritance: \ No newline at end of file diff --git a/docs/field_modules.rst b/docs/field_modules.rst new file mode 100644 index 000000000..117044fb3 --- /dev/null +++ b/docs/field_modules.rst @@ -0,0 +1,38 @@ +.. _field_modules: + +============ + +Embeddings +---------------- + +.. automodule:: pyrad.nerf.field_modules.embedding + :members: + :show-inheritance: + +Encodings +---------------- + +.. automodule:: pyrad.nerf.field_modules.encoding + :members: + :show-inheritance: + +Field Heads +---------------- + +.. automodule:: pyrad.nerf.field_modules.field_heads + :members: + :show-inheritance: + +Field Losses +---------------- + +.. automodule:: pyrad.nerf.field_modules.field_losses + :members: + :show-inheritance: + +MLP +---------------- + +.. automodule:: pyrad.nerf.field_modules.mlp + :members: + :show-inheritance: \ No newline at end of file diff --git a/docs/fields.rst b/docs/fields.rst new file mode 100644 index 000000000..068ed81dd --- /dev/null +++ b/docs/fields.rst @@ -0,0 +1,24 @@ +.. _fields: + +============ + +Base +---------------- + +.. automodule:: pyrad.nerf.fields.base + :members: + :show-inheritance: + +Instant NGP +---------------- + +.. automodule:: pyrad.nerf.fields.instant_ngp_field + :members: + :show-inheritance: + +NeRF +---------------- + +.. automodule:: pyrad.nerf.fields.nerf_field + :members: + :show-inheritance: \ No newline at end of file diff --git a/docs/graphs.rst b/docs/graphs.rst new file mode 100644 index 000000000..b863c6c3d --- /dev/null +++ b/docs/graphs.rst @@ -0,0 +1,38 @@ +.. _graphs: + +============ + +Base +---------------- + +.. automodule:: pyrad.nerf.graph.base + :members: + :show-inheritance: + +Instant NGP +---------------- + +.. automodule:: pyrad.nerf.graph.instant_ngp + :members: + :show-inheritance: + +Semantic NeRF +---------------- + +.. automodule:: pyrad.nerf.graph.semantic_nerf + :members: + :show-inheritance: + +TensoRF +---------------- + +.. automodule:: pyrad.nerf.graph.tensorf + :members: + :show-inheritance: + +NeRF +---------------- + +.. automodule:: pyrad.nerf.graph.vanilla_nerf + :members: + :show-inheritance: \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 0902c6ce8..65212ff6e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,9 +7,11 @@ Welcome to pyrad's documentation! ==================================== .. toctree:: - :maxdepth: 2 + :maxdepth: 4 :caption: Contents: - + + pyrad + field_modules Indices and tables @@ -17,4 +19,4 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` -* :ref:`search` +* :ref:`search` \ No newline at end of file diff --git a/docs/pyrad.rst b/docs/pyrad.rst new file mode 100644 index 000000000..1edbb4ead --- /dev/null +++ b/docs/pyrad.rst @@ -0,0 +1,50 @@ +.. _pyrad: + +Reference +============ + +Dataset +------------------------------- + +.. toctree:: + :maxdepth: 2 + + dataset + +Field Modules +------------------------------- + +.. toctree:: + :maxdepth: 2 + + field_modules + +Fields +------------------------------- + +.. toctree:: + :maxdepth: 2 + + fields + +Graphs +------------------------------- + +.. toctree:: + :maxdepth: 2 + + graphs + +Renderers +------------------------------- + +.. automodule:: pyrad.nerf.renderers + :members: + :show-inheritance: + +Samplers +------------------------------- + +.. automodule:: pyrad.nerf.sampler + :members: + :show-inheritance: \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..cc1a93a1f --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +readthedocs-sphinx-search==0.1.2 +sphinx==5.0.0 +sphinx-rtd-theme==1.0.0 \ No newline at end of file diff --git a/environment/requirements.txt b/environment/requirements.txt index ef63b43ac..023c14641 100644 --- a/environment/requirements.txt +++ b/environment/requirements.txt @@ -11,9 +11,6 @@ plotly==5.7.0 protobuf==3.20.0 pylint==2.13.4 pytest -readthedocs-sphinx-search==0.1.2 -sphinx==5.0.0 -sphinx-rtd-theme==1.0.0 tensorboard==2.8.0 torch==1.11.0 torchmetrics[image]==0.8.2