From 26a9d8a6daf2dfb49329c15b063e46101b4ae358 Mon Sep 17 00:00:00 2001 From: kolo Date: Tue, 15 Apr 2025 22:26:20 +0300 Subject: [PATCH] work on --- .gitignore | 2 ++ Makefile | 20 ++++++++++++++++++++ make.bat | 35 +++++++++++++++++++++++++++++++++++ pyproject.toml | 4 ++-- source/conf.py | 27 +++++++++++++++++++++++++++ source/index.rst | 20 ++++++++++++++++++++ 6 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 Makefile create mode 100644 make.bat create mode 100644 source/conf.py create mode 100644 source/index.rst diff --git a/.gitignore b/.gitignore index c0c90cc..084165a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ dist poetry.lock *__pycache__/ *.hist* +build +source diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/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/make.bat b/make.bat new file mode 100644 index 0000000..dc1312a --- /dev/null +++ b/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/pyproject.toml b/pyproject.toml index 09c727b..e7b0dd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = {text = "MIT"} readme = "README.md" requires-python = ">=3.11" -dependencies = ["rich (>=14.0.0,<15.0.0)", "art (>=6.4,<7.0)"] +dependencies = ["rich (>=14.0.0,<15.0.0)", "art (>=6.4,<7.0)", "pyreadline3 (>=3.5.4,<4.0.0)"] [tool.ruff] @@ -27,5 +27,5 @@ requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry.group.dev.dependencies] -pyreadline3 = "^3.5.4" +sphinx = "^8.2.3" diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..56d5e8f --- /dev/null +++ b/source/conf.py @@ -0,0 +1,27 @@ +# 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 = 'Argenta' +copyright = '2025, kolo' +author = 'kolo' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ['sphinx.ext.autodoc'] + +templates_path = ['_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] diff --git a/source/index.rst b/source/index.rst new file mode 100644 index 0000000..8165076 --- /dev/null +++ b/source/index.rst @@ -0,0 +1,20 @@ +.. Argenta documentation master file, created by + sphinx-quickstart on Tue Apr 15 01:13:28 2025. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Argenta documentation +===================== + +Add your content using ``reStructuredText`` syntax. See the +`reStructuredText `_ +documentation for details. + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + +.. automodule:: argenta + :members: +