From 6c6b1a4d6047680d5313b6a72c2482a80204117f Mon Sep 17 00:00:00 2001 From: mpecchi Date: Tue, 30 Apr 2024 22:51:39 -0400 Subject: [PATCH] added documentation on RTD with sphinx --- docs/Makefile | 20 +++++++++++++++++++ docs/make.bat | 35 ++++++++++++++++++++++++++++++++++ docs/source/README.md | 1 + docs/source/conf.py | 36 +++++++++++++++++++++++++++++++++++ docs/source/index.rst | 23 ++++++++++++++++++++++ docs/source/myfigure.rst | 7 +++++++ docs/source/requirements.txt | Bin 0 -> 756 bytes pyproject.toml | 3 ++- 8 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 docs/Makefile create mode 100644 docs/make.bat create mode 120000 docs/source/README.md create mode 100644 docs/source/conf.py create mode 100644 docs/source/index.rst create mode 100644 docs/source/myfigure.rst create mode 100644 docs/source/requirements.txt diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/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/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..747ffb7 --- /dev/null +++ b/docs/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/docs/source/README.md b/docs/source/README.md new file mode 120000 index 0000000..fe84005 --- /dev/null +++ b/docs/source/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..92bdf4d --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,36 @@ +# 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 + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "myfigure" +copyright = "2024, Matteo Pecchi" +author = "Matteo Pecchi" +release = "1.0.0" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration +extensions = [ + "sphinx.ext.autodoc", + "sphinx_autodoc_typehints", + "sphinx.ext.viewcode", + "myst_parser", + "sphinx.ext.napoleon", +] + + +exclude_patterns = [] + +templates_path = ["_templates"] + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "sphinx_rtd_theme" + +html_static_path = ["_static"] +autoclass_content = "both" diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..7680de3 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,23 @@ +.. myfigure documentation master file, created by + sphinx-quickstart on Tue Apr 30 22:46:15 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to myfigure's documentation! +==================================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + README.md + + myfigure + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/source/myfigure.rst b/docs/source/myfigure.rst new file mode 100644 index 0000000..3fec92d --- /dev/null +++ b/docs/source/myfigure.rst @@ -0,0 +1,7 @@ +tga_data_analysis.myfigure +================================ + +.. automodule:: myfigure.myfigure + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5057d45bcdc4f764412dc4258ab7bd29340a2c9c GIT binary patch literal 756 zcmah{+fKqj5IxT(eo753D!%yQBMAu!A3zo;?IMNJ0#QF+J!f`_jT#!Vq}@5Una*v7kx z$d)$=@s3_CS&gB`mT1G<4A1-xafg&=Xw`|KU+G(8#^*J8LS+&4V5lk83(LHtN83S+ zh|3J)S$9O`tb2S!9XZ{bmXbT>by)Bys}jm4^$1ZB}G%@jOQ&0wZJoWNdWS#%zhGf^gOXjHP*>%