From 39369a65d64658923a6f9cce0bd7796e0682ef64 Mon Sep 17 00:00:00 2001 From: Joscha Dierks Date: Fri, 14 Mar 2025 16:53:44 +0100 Subject: [PATCH] feat/OPS-61: add basic documentation It currently works only for haiku.py for some reason --- .dockerignore | 2 +- .gitignore | 2 +- docs/Makefile | 20 ++++++++++++++ docs/make.bat | 35 +++++++++++++++++++++++++ docs/source/_modules/haiku.rst | 7 +++++ docs/source/_modules/main.rst | 7 +++++ docs/source/_modules/modules.rst | 9 +++++++ docs/source/_modules/store_manager.rst | 7 +++++ docs/source/_static/kanji.png | Bin 0 -> 2386 bytes docs/source/conf.py | 35 +++++++++++++++++++++++++ docs/source/index.rst | 19 ++++++++++++++ docs/source/usage.rst | 4 +++ {docs => requirements}/requirements.md | 0 13 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/make.bat create mode 100644 docs/source/_modules/haiku.rst create mode 100644 docs/source/_modules/main.rst create mode 100644 docs/source/_modules/modules.rst create mode 100644 docs/source/_modules/store_manager.rst create mode 100644 docs/source/_static/kanji.png create mode 100644 docs/source/conf.py create mode 100644 docs/source/index.rst create mode 100644 docs/source/usage.rst rename {docs => requirements}/requirements.md (100%) diff --git a/.dockerignore b/.dockerignore index 1513c39..0d78105 100644 --- a/.dockerignore +++ b/.dockerignore @@ -68,7 +68,7 @@ coverage.xml *.log # Sphinx documentation -docs/_build/ +requirements/_build/ # PyBuilder target/ diff --git a/.gitignore b/.gitignore index a1db2f1..ed76ffc 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +requirements/_build/ # PyBuilder .pybuilder/ 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..dc1312a --- /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/_modules/haiku.rst b/docs/source/_modules/haiku.rst new file mode 100644 index 0000000..6e6e926 --- /dev/null +++ b/docs/source/_modules/haiku.rst @@ -0,0 +1,7 @@ +haiku module +============ + +.. automodule:: haiku + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/_modules/main.rst b/docs/source/_modules/main.rst new file mode 100644 index 0000000..eace87b --- /dev/null +++ b/docs/source/_modules/main.rst @@ -0,0 +1,7 @@ +main module +=========== + +.. automodule:: main + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/_modules/modules.rst b/docs/source/_modules/modules.rst new file mode 100644 index 0000000..d024233 --- /dev/null +++ b/docs/source/_modules/modules.rst @@ -0,0 +1,9 @@ +senju +===== + +.. toctree:: + :maxdepth: 4 + + haiku + main + store_manager diff --git a/docs/source/_modules/store_manager.rst b/docs/source/_modules/store_manager.rst new file mode 100644 index 0000000..aa5fa7f --- /dev/null +++ b/docs/source/_modules/store_manager.rst @@ -0,0 +1,7 @@ +store\_manager module +===================== + +.. automodule:: store_manager + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/_static/kanji.png b/docs/source/_static/kanji.png new file mode 100644 index 0000000000000000000000000000000000000000..345f5a566d7fddd89a42ab6af12e6ad3903c725f GIT binary patch literal 2386 zcmV-Y39a^tP)Yn!ql5Qft&vusm4Y_)A=hi(7=KYYs* zBZ7d^8{@_EaTk<3ki#$xgMpQmm6es1m6es1m6es1m6es1m6cUT`LpQVMR>7B&T01U zGQ3s`$8qMPcbDRoT02i|XW_dG@-jKOh9jx(F%+fp?u(rtYbcm5`A(_zNTMG7;p#97 zVm_yv{#?^@;x;7upGq8{rMS<@ev!*{l6$|(vZ<=p^RBEO58iItw!@Jw)AX-;`?@1!;`vBp6QEQ@u3gHV1tgK3nOl8I|l4HnD zU>M;{{sYW~jc@}ArKTX*2!ao4Gm&<~Ta0mz&a#?T@MzE2( za(QqO!m;8mnFkjkoU*Z|CoG{NgpKqjyBo_h-S*Vv4~mXn&%Rwto% zN|TLW(Ne=tQ9*gqNEj@Ogo#=iWCSe1irZiM2%|AcDP@dS5*Z974N#@D5eCpmLV=L~lgiPqotjk4!2|ON7j;5M?Q=AoFy7Vy_iD!w3@7}n@y*YQeT~_K@w|$+9PN~CTxJs< zs0viDs2}}`9bGXBp{U-M@a2M!D%3@e9oGkv%2Q;Y4wY4L|{ggSQDqPxS; zsbx!z_gVgBX%=lDJl>}QZG;YSfN;Zk2BQX_nzutNOc%tZ;yA7<)o}DG-XE zR*^d2V37H!ZmNGYU_8{ObNU|IBcVrxSwDKB=L-EH%-oExwf?C;gz2((Q}2L#Lzr6E zSOYzBA$+z`b|8qJ5QaDIS&^O)4t6u%TBI+8e03w-^`3BM3DFZCdQUj% zJ>jPJgwx&=Ud!AZ%NTaThkg;fo-mAl$RX?@=bVNb zp_h(6iQbDD+7U)S$qEFrcnpV}QYjGz`QW2BE`~B;@O7MC99q1{L@IGG6=C zWs>gDg5!(aXql3P{=EJcT~V=Egpr&4t~qp%wQiEX7|cq!KQ|!!Y!DMr(`6AX!XNhg zQmx5_GT?L{w|DOp7eghIsv6;d6ENnn3WU>75Nnb9_>P2aJWiwt8F!UDG)yY*i%C1? zm@v8%sz&CLCX5)qW_S9ID^Pg;5pa-buC8w#(M{NWDP4*C-(78z0hUhup$iZO>e9f+ zBLqgYrw**&lK3TF_>VVt1q>>2&E8uDWp4=oZ7yNioo;yUWnipmm|q!8m{%el9gB#x z-@ zI^epGMvH^dgyESV5-tSWYK`^=qX{3YHf}DkVbL75)^I|;rm_XcN(ib@5O)bFA&4D) z6IlI_5&|25D0VbbLShu=FMV_2Bm@Dpgr`1G5`r*x;;=**2}5G(-iz%-7zx3AP2$uw zLPB7Emoa7{BqUb2p^PmPAEA_i4G0~f*nx%;HbO8^NM5*uj1XKdFMA9b86jCS-DJ1D za1oL#2IOyMKt%|qqw-tqmH{0AaBx zTEdnX9&@Yc_|VaZ)d0f0H(5avH=o5^4xN4H%CHi1J(sApP-Z?$z+d8XUZ_7EzJd9( zwD>c()M$8Gz}M%^cBy!8E>HQ7rRQNS6;?K?)7$Va-`cLLO}dRXFVN|-UnUywaSgv_ zuHLg~T^0MjSp~APva+(Wva+(Wva+(Wva+(Wva;%+f9z~*#L!c=P5=M^07*qoM6N<$ Ef`xT#761SM literal 0 HcmV?d00001 diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..d018fed --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,35 @@ +# 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 +import os +import sys +from pathlib import Path +sys.path.insert(0, os.path.abspath("../../senju")) + +project = 'senju' +copyright = '2025, senju hashirama' +author = 'senju hashirama' +release = 'before the light' +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.napoleon'] + +templates_path = ['_templates'] +exclude_patterns = [] + +autodoc_typehints = 'both' + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'nature' +html_static_path = ['_static'] + +html_favicon = '_static/kanji.png' +html_logo = '_static/kanji.png' \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..9915c68 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,19 @@ +.. senju documentation master file, created by + sphinx-quickstart on Fri Mar 14 15:18:32 2025. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome senju documentation +=================== + +Add your content using ``reStructuredText`` syntax. See the +`reStructuredText `_ +documentation for details. + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + usage + _modules/modules \ No newline at end of file diff --git a/docs/source/usage.rst b/docs/source/usage.rst new file mode 100644 index 0000000..10bcfdf --- /dev/null +++ b/docs/source/usage.rst @@ -0,0 +1,4 @@ +Installation +============ + +Its a docker - it just works diff --git a/docs/requirements.md b/requirements/requirements.md similarity index 100% rename from docs/requirements.md rename to requirements/requirements.md