From 479e2ae89ff640e30657ff7222a2c2143c8a29ca Mon Sep 17 00:00:00 2001 From: bcchang Date: Mon, 19 Feb 2024 14:53:49 -0600 Subject: [PATCH] Update docs to PyData Sphinx Theme and reorganize tabs --- docs/conf.py | 52 ++++++++++--------- docs/index.rst | 13 +---- docs/modules.rst | 7 --- .../generated/dpm_tools.io.io_utils.rst | 29 +++++++++++ .../generated/dpm_tools.io.read_data.rst | 37 +++++++++++++ docs/modules/generated/dpm_tools.io.rst | 33 ++++++++++++ .../generated/dpm_tools.io.write_data.rst | 29 +++++++++++ .../dpm_tools.morphology.features.rst | 34 ++++++++++++ .../generated/dpm_tools.morphology.rst | 31 +++++++++++ .../dpm_tools.visualization.plot_2d.rst | 32 ++++++++++++ .../dpm_tools.visualization.plot_3d.rst | 34 ++++++++++++ .../generated/dpm_tools.visualization.rst | 32 ++++++++++++ docs/modules/index.rst | 15 ++++++ 13 files changed, 335 insertions(+), 43 deletions(-) delete mode 100644 docs/modules.rst create mode 100644 docs/modules/generated/dpm_tools.io.io_utils.rst create mode 100644 docs/modules/generated/dpm_tools.io.read_data.rst create mode 100644 docs/modules/generated/dpm_tools.io.rst create mode 100644 docs/modules/generated/dpm_tools.io.write_data.rst create mode 100644 docs/modules/generated/dpm_tools.morphology.features.rst create mode 100644 docs/modules/generated/dpm_tools.morphology.rst create mode 100644 docs/modules/generated/dpm_tools.visualization.plot_2d.rst create mode 100644 docs/modules/generated/dpm_tools.visualization.plot_3d.rst create mode 100644 docs/modules/generated/dpm_tools.visualization.rst create mode 100644 docs/modules/index.rst diff --git a/docs/conf.py b/docs/conf.py index 0068784..36287cc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,7 +8,7 @@ sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../')) -# sys.path.insert(0, os.path.abspath('../../')) +sys.path.insert(0, os.path.abspath('../../')) # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -48,32 +48,34 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'karma_sphinx_theme' +html_theme = 'pydata_sphinx_theme' html_static_path = ['_static'] html_domain_indices = True html_use_index = True html_split_index = False +html_show_sourcelink = False +html_show_sphinx = True # -# html_theme_options = { -# "icon_links": [ -# { -# "name": "GitHub", -# "url": "https://github.com/digital-porous-media/dpm_tools", -# "icon": "fab fa-github-square", -# }, -# ], -# "external_links": [ -# { -# "name": "Issue Tracker", "url": "https://github.com/digital-porous-media/dpm_tools/issues" -# }, -# { -# "name": "Get Help", "url": "https://github.com/digital-porous-media/dpm_tools/discussions" -# }, -# ], -# "navigation_with_keys": False, -# "show_prev_next": False, -# "icon_links_label": "Quick Links", -# "use_edit_page_button": False, -# "search_bar_position": "sidebar", -# "navbar_align": "left", -# } +html_theme_options = { + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/digital-porous-media/dpm_tools", + "icon": "fab fa-github-square", + }, + ], + "external_links": [ + { + "name": "Issue Tracker", "url": "https://github.com/digital-porous-media/dpm_tools/issues" + }, + { + "name": "Get Help", "url": "https://github.com/digital-porous-media/dpm_tools/discussions" + }, + ], + "navigation_with_keys": False, + "show_prev_next": False, + "icon_links_label": "Quick Links", + "use_edit_page_button": False, + "search_bar_position": "sidebar", + "navbar_align": "left", +} diff --git a/docs/index.rst b/docs/index.rst index 19915d3..898f015 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,19 +3,10 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to DPM_Tools's documentation! +Digital Porous Media Tools ===================================== .. toctree:: :maxdepth: 2 - :caption: Contents: - modules - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + modules/index diff --git a/docs/modules.rst b/docs/modules.rst deleted file mode 100644 index 0f8bbe4..0000000 --- a/docs/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -dpm_tools -========= - -.. toctree:: - :maxdepth: 4 - - dpm_tools diff --git a/docs/modules/generated/dpm_tools.io.io_utils.rst b/docs/modules/generated/dpm_tools.io.io_utils.rst new file mode 100644 index 0000000..4728c15 --- /dev/null +++ b/docs/modules/generated/dpm_tools.io.io_utils.rst @@ -0,0 +1,29 @@ +dpm\_tools.io.io\_utils +======================= + +.. automodule:: dpm_tools.io.io_utils + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + convert_filetype + + + + + + + + + + + + + diff --git a/docs/modules/generated/dpm_tools.io.read_data.rst b/docs/modules/generated/dpm_tools.io.read_data.rst new file mode 100644 index 0000000..1b4d8e6 --- /dev/null +++ b/docs/modules/generated/dpm_tools.io.read_data.rst @@ -0,0 +1,37 @@ +dpm\_tools.io.read\_data +======================== + +.. automodule:: dpm_tools.io.read_data + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + read_image + + + + + + .. rubric:: Classes + + .. autosummary:: + + Image + ImageFromFile + Vector + + + + + + + + + diff --git a/docs/modules/generated/dpm_tools.io.rst b/docs/modules/generated/dpm_tools.io.rst new file mode 100644 index 0000000..4240e63 --- /dev/null +++ b/docs/modules/generated/dpm_tools.io.rst @@ -0,0 +1,33 @@ +dpm\_tools.io +============= + +.. automodule:: dpm_tools.io + + + + + + + + + + + + + + + + + + + +.. rubric:: Modules + +.. autosummary:: + :toctree: + :recursive: + + dpm_tools.io.io_utils + dpm_tools.io.read_data + dpm_tools.io.write_data + diff --git a/docs/modules/generated/dpm_tools.io.write_data.rst b/docs/modules/generated/dpm_tools.io.write_data.rst new file mode 100644 index 0000000..7032294 --- /dev/null +++ b/docs/modules/generated/dpm_tools.io.write_data.rst @@ -0,0 +1,29 @@ +dpm\_tools.io.write\_data +========================= + +.. automodule:: dpm_tools.io.write_data + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + write_image + + + + + + + + + + + + + diff --git a/docs/modules/generated/dpm_tools.morphology.features.rst b/docs/modules/generated/dpm_tools.morphology.features.rst new file mode 100644 index 0000000..8ea362e --- /dev/null +++ b/docs/modules/generated/dpm_tools.morphology.features.rst @@ -0,0 +1,34 @@ +dpm\_tools.morphology.features +============================== + +.. automodule:: dpm_tools.morphology.features + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + chords + constriction_factor + edt + slicewise_edt + slicewise_mis + tof + + + + + + + + + + + + + diff --git a/docs/modules/generated/dpm_tools.morphology.rst b/docs/modules/generated/dpm_tools.morphology.rst new file mode 100644 index 0000000..b147537 --- /dev/null +++ b/docs/modules/generated/dpm_tools.morphology.rst @@ -0,0 +1,31 @@ +dpm\_tools.morphology +===================== + +.. automodule:: dpm_tools.morphology + + + + + + + + + + + + + + + + + + + +.. rubric:: Modules + +.. autosummary:: + :toctree: + :recursive: + + dpm_tools.morphology.features + diff --git a/docs/modules/generated/dpm_tools.visualization.plot_2d.rst b/docs/modules/generated/dpm_tools.visualization.plot_2d.rst new file mode 100644 index 0000000..87f207e --- /dev/null +++ b/docs/modules/generated/dpm_tools.visualization.plot_2d.rst @@ -0,0 +1,32 @@ +dpm\_tools.visualization.plot\_2d +================================= + +.. automodule:: dpm_tools.visualization.plot_2d + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + hist + make_gif + make_thumbnail + plot_slice + + + + + + + + + + + + + diff --git a/docs/modules/generated/dpm_tools.visualization.plot_3d.rst b/docs/modules/generated/dpm_tools.visualization.plot_3d.rst new file mode 100644 index 0000000..acabac1 --- /dev/null +++ b/docs/modules/generated/dpm_tools.visualization.plot_3d.rst @@ -0,0 +1,34 @@ +dpm\_tools.visualization.plot\_3d +================================= + +.. automodule:: dpm_tools.visualization.plot_3d + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + bounding_box + orthogonal_slices + plot_glyph + plot_isosurface + plot_scalar_volume + plot_streamlines + + + + + + + + + + + + + diff --git a/docs/modules/generated/dpm_tools.visualization.rst b/docs/modules/generated/dpm_tools.visualization.rst new file mode 100644 index 0000000..3b09c35 --- /dev/null +++ b/docs/modules/generated/dpm_tools.visualization.rst @@ -0,0 +1,32 @@ +dpm\_tools.visualization +======================== + +.. automodule:: dpm_tools.visualization + + + + + + + + + + + + + + + + + + + +.. rubric:: Modules + +.. autosummary:: + :toctree: + :recursive: + + dpm_tools.visualization.plot_2d + dpm_tools.visualization.plot_3d + diff --git a/docs/modules/index.rst b/docs/modules/index.rst new file mode 100644 index 0000000..fb148cb --- /dev/null +++ b/docs/modules/index.rst @@ -0,0 +1,15 @@ +.. _modules_index + +Modules +===================================== + + +.. automodule:: dpm_tools + + .. autosummary:: + :toctree: generated + :recursive: + + dpm_tools.io + dpm_tools.morphology + dpm_tools.visualization