From 7f6e001b8fc4e56ca0998aa4973ca17678d9282e Mon Sep 17 00:00:00 2001 From: Michael Rudolf <rudolf@geo.tu-darmstadt.de> Date: Thu, 22 Jun 2023 11:30:38 +0200 Subject: [PATCH] First Sphinx documentation --- doc/Makefile | 20 ++++++++++++ doc/make.bat | 35 +++++++++++++++++++++ doc/source/conf.py | 34 ++++++++++++++++++++ doc/source/index.rst | 31 ++++++++++++++++++ doc/source/modules.rst | 8 +++++ doc/source/setup.rst | 7 +++++ doc/source/u4py.addons.rst | 53 +++++++++++++++++++++++++++++++ doc/source/u4py.analysis.rst | 45 ++++++++++++++++++++++++++ doc/source/u4py.plotting.rst | 45 ++++++++++++++++++++++++++ doc/source/u4py.rst | 21 +++++++++++++ doc/source/u4py.utils.rst | 61 ++++++++++++++++++++++++++++++++++++ 11 files changed, 360 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/make.bat create mode 100644 doc/source/conf.py create mode 100644 doc/source/index.rst create mode 100644 doc/source/modules.rst create mode 100644 doc/source/setup.rst create mode 100644 doc/source/u4py.addons.rst create mode 100644 doc/source/u4py.analysis.rst create mode 100644 doc/source/u4py.plotting.rst create mode 100644 doc/source/u4py.rst create mode 100644 doc/source/u4py.utils.rst diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000..dc1312a --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..e8c1657 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,34 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html +import os +import sys + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "U4Py" +copyright = "2023, T. Treffeisen, M. Rudolf" +author = "T. Treffeisen, M. Rudolf" +release = "0.0.2dev" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ["sphinx.ext.autodoc"] +# for x in os.walk(r"C:\Users\Michael Rudolf\HESSENBOX-DA\GitRepos\u4py\u4py"): +# path = x[0] +# if ".git" not in path and "__" not in path and "egg-info" not in path: +# sys.path.insert(0, path) + +templates_path = ["_templates"] +exclude_patterns = [] + +language = "en" + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "classic" +html_static_path = ["_static"] diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..52d34b6 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,31 @@ +.. U4Py documentation master file, created by + sphinx-quickstart on Thu Jun 22 10:08:15 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +U4Py Documentation +================== + +This Python module was created in the framework of the project Umwelt 4.0 financed by the Hessian Agency for Nature Conservation, Environment and Geology. It is split into several submodules: + + - :doc:`analysis <../u4py.analysis>`: Does the data analysis, e.g., inversion or spatial analysis. + - :doc:`plotting <../u4py.plotting>`: Pre-made figures and axis objects for specific plots including formatting. + - :doc:`utils <../u4py.utils>`: Various utility functions, e.g., file and project management. + - :doc:`addons <../u4py.addons>`: Tools to read externally supplied data such as groundwater levels or weather data. + + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + +.. automodule:: u4py + :members: + :undoc-members: + :show-inheritance: + +Indices and tables +================== + +* :ref:`Overview of module <modindex>` +* :ref:`Index of all functions <genindex>` +.. * :ref:`search` diff --git a/doc/source/modules.rst b/doc/source/modules.rst new file mode 100644 index 0000000..29c35c6 --- /dev/null +++ b/doc/source/modules.rst @@ -0,0 +1,8 @@ +u4py +==== + +.. toctree:: + :maxdepth: 4 + + setup + u4py diff --git a/doc/source/setup.rst b/doc/source/setup.rst new file mode 100644 index 0000000..552eb49 --- /dev/null +++ b/doc/source/setup.rst @@ -0,0 +1,7 @@ +setup module +============ + +.. automodule:: setup + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/u4py.addons.rst b/doc/source/u4py.addons.rst new file mode 100644 index 0000000..4be688a --- /dev/null +++ b/doc/source/u4py.addons.rst @@ -0,0 +1,53 @@ +u4py.addons package +=================== + +Submodules +---------- + +u4py.addons.climate module +-------------------------- + +.. automodule:: u4py.addons.climate + :members: + :undoc-members: + :show-inheritance: + +u4py.addons.gas\_storage module +------------------------------- + +.. automodule:: u4py.addons.gas_storage + :members: + :undoc-members: + :show-inheritance: + +u4py.addons.geology module +-------------------------- + +.. automodule:: u4py.addons.geology + :members: + :undoc-members: + :show-inheritance: + +u4py.addons.groundwater module +------------------------------ + +.. automodule:: u4py.addons.groundwater + :members: + :undoc-members: + :show-inheritance: + +u4py.addons.rivers module +------------------------- + +.. automodule:: u4py.addons.rivers + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: u4py.addons + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/u4py.analysis.rst b/doc/source/u4py.analysis.rst new file mode 100644 index 0000000..30efb12 --- /dev/null +++ b/doc/source/u4py.analysis.rst @@ -0,0 +1,45 @@ +u4py.analysis package +===================== + +Submodules +---------- + +u4py.analysis.inversion module +------------------------------ + +.. automodule:: u4py.analysis.inversion + :members: + :undoc-members: + :show-inheritance: + +u4py.analysis.other module +-------------------------- + +.. automodule:: u4py.analysis.other + :members: + :undoc-members: + :show-inheritance: + +u4py.analysis.processing module +------------------------------- + +.. automodule:: u4py.analysis.processing + :members: + :undoc-members: + :show-inheritance: + +u4py.analysis.spatial module +---------------------------- + +.. automodule:: u4py.analysis.spatial + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: u4py.analysis + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/u4py.plotting.rst b/doc/source/u4py.plotting.rst new file mode 100644 index 0000000..1ead885 --- /dev/null +++ b/doc/source/u4py.plotting.rst @@ -0,0 +1,45 @@ +u4py.plotting package +===================== + +Submodules +---------- + +u4py.plotting.axes module +------------------------- + +.. automodule:: u4py.plotting.axes + :members: + :undoc-members: + :show-inheritance: + +u4py.plotting.formatting module +------------------------------- + +.. automodule:: u4py.plotting.formatting + :members: + :undoc-members: + :show-inheritance: + +u4py.plotting.plots module +-------------------------- + +.. automodule:: u4py.plotting.plots + :members: + :undoc-members: + :show-inheritance: + +u4py.plotting.preparation module +-------------------------------- + +.. automodule:: u4py.plotting.preparation + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: u4py.plotting + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/u4py.rst b/doc/source/u4py.rst new file mode 100644 index 0000000..c3c6fdb --- /dev/null +++ b/doc/source/u4py.rst @@ -0,0 +1,21 @@ +u4py package +============ + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + u4py.addons + u4py.analysis + u4py.plotting + u4py.utils + +Module contents +--------------- + +.. automodule:: u4py + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/u4py.utils.rst b/doc/source/u4py.utils.rst new file mode 100644 index 0000000..7cde256 --- /dev/null +++ b/doc/source/u4py.utils.rst @@ -0,0 +1,61 @@ +u4py.utils package +================== + +Submodules +---------- + +u4py.utils.cmd\_args module +--------------------------- + +.. automodule:: u4py.utils.cmd_args + :members: + :undoc-members: + :show-inheritance: + +u4py.utils.config module +------------------------ + +.. automodule:: u4py.utils.config + :members: + :undoc-members: + :show-inheritance: + +u4py.utils.convert module +------------------------- + +.. automodule:: u4py.utils.convert + :members: + :undoc-members: + :show-inheritance: + +u4py.utils.files module +----------------------- + +.. automodule:: u4py.utils.files + :members: + :undoc-members: + :show-inheritance: + +u4py.utils.projects module +-------------------------- + +.. automodule:: u4py.utils.projects + :members: + :undoc-members: + :show-inheritance: + +u4py.utils.sql module +--------------------- + +.. automodule:: u4py.utils.sql + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: u4py.utils + :members: + :undoc-members: + :show-inheritance: -- GitLab