[2] Добавление авто документации проекта второй лабораторной работы
This commit is contained in:
parent
05a9bdd8f4
commit
98c17e18fa
20
skorohodovsa/task_2/docs/Makefile
Normal file
20
skorohodovsa/task_2/docs/Makefile
Normal file
|
|
@ -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)
|
||||
35
skorohodovsa/task_2/docs/make.bat
Normal file
35
skorohodovsa/task_2/docs/make.bat
Normal file
|
|
@ -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
|
||||
9
skorohodovsa/task_2/docs/source/api.md
Normal file
9
skorohodovsa/task_2/docs/source/api.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# API Reference
|
||||
|
||||
## Модуль `models.map`
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: models.map
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
78
skorohodovsa/task_2/docs/source/conf.py
Normal file
78
skorohodovsa/task_2/docs/source/conf.py
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# 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
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
|
||||
|
||||
project = 'Поиск выхода из лабиринта'
|
||||
copyright = '2026, SerKin0'
|
||||
author = 'SerKin0'
|
||||
release = '0.0.1'
|
||||
html_title = project
|
||||
|
||||
|
||||
# --- MyST (Markdown) ---
|
||||
myst_enable_extensions = [
|
||||
"dollarmath", # $x$ и $$x$$
|
||||
"amsmath", # \begin{equation}
|
||||
"colon_fence", # ::: блоки
|
||||
]
|
||||
|
||||
exclude_patterns = ['build', 'draft.md']
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.viewcode',
|
||||
'myst_nb',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx_new_tab_link',
|
||||
'sphinx.ext.autosummary',
|
||||
]
|
||||
|
||||
autosummary_generate = True
|
||||
|
||||
autodoc_default_options = {
|
||||
'members': True,
|
||||
'undoc-members': True,
|
||||
'show-inheritance': True,
|
||||
'special-members': '__init__',
|
||||
'inherited-members': False,
|
||||
'exclude-members': '__weakref__',
|
||||
}
|
||||
|
||||
napoleon_google_docstring = True
|
||||
napoleon_numpy_docstring = False
|
||||
napoleon_include_init_with_doc = True
|
||||
napoleon_include_private_with_doc = False
|
||||
|
||||
# --- Тема ---
|
||||
html_permalinks_icon = '<span>#</span>'
|
||||
html_theme = 'sphinxawesome_theme'
|
||||
language = "ru"
|
||||
|
||||
html_theme_options = {
|
||||
'navigation_with_keys': True,
|
||||
'globaltoc_collapse': False,
|
||||
'globaltoc_includehidden': False,
|
||||
'show_prev_next': True,
|
||||
'main_nav_links': {},
|
||||
}
|
||||
|
||||
pygments_style = 'monokai'
|
||||
pygments_style_dark = 'monokai'
|
||||
|
||||
|
||||
# Для подключения CSS (стили иконок)
|
||||
html_css_files = [
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css',
|
||||
]
|
||||
|
||||
# --- HTML ---
|
||||
html_static_path = ["_static"]
|
||||
5
skorohodovsa/task_2/docs/source/index.md
Normal file
5
skorohodovsa/task_2/docs/source/index.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Лабораторная работа "Поиск выхода из лабиринта"
|
||||
|
||||
:::{toctree}
|
||||
:maxdepth: 2
|
||||
api
|
||||
Loading…
Reference in New Issue
Block a user