forked from Advanced_Python/advanced-python-homework-2023
Made last step in TASK1
This commit is contained in:
parent
e78b7b5b14
commit
091c87af7e
34
README.md
34
README.md
@ -20,3 +20,37 @@ poetry install
|
||||
# Для проектов с использованием pip
|
||||
pip install -r requirements-dev.txt
|
||||
Теперь в вашем виртуальном окружении будут установлены Sphinx, Pylint и MyPy, которые рекомендуется использовать для разработки проекта.
|
||||
|
||||
|
||||
|
||||
## Генерация документации
|
||||
|
||||
#Документация создана с использованием Sphinx. Для ее перегенерации выполните следующие шаги:
|
||||
|
||||
cd advanced-python-homework-2023
|
||||
mkdir doc
|
||||
cd doc
|
||||
sphinx-quickstart
|
||||
cd ..
|
||||
sphinx-apidoc -o doc .
|
||||
cd doc
|
||||
rm modules.rst
|
||||
rm setup.rst
|
||||
|
||||
#Отредактируйте файл docs/conf.py и добавьте следующий код:
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('../'))
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon', # Для поддержки Google-style docstrings
|
||||
]
|
||||
|
||||
|
||||
#Выполните команду для генерации документации:
|
||||
|
||||
cd ..
|
||||
make html
|
||||
#Open file:///home/timur/Gitea/advanced-python-homework-2023/doc/build/html/search.html THAT`s ALL FOR TODAY)
|
||||
|
@ -0,0 +1,16 @@
|
||||
"""Controls Package
|
||||
|
||||
This package implements the control logic for a SCADA (Supervisory Control and Data Acquisition) system.
|
||||
|
||||
SCADA systems are used to monitor and control industrial processes. They provide the following capabilities:
|
||||
|
||||
- Real-time Data Acquisition: Collect data from sensors and devices in real-time.
|
||||
- Process Monitoring: Monitor and display the status of industrial processes.
|
||||
- Remote Control: Allow remote operators to control industrial processes.
|
||||
- Alarming: Raise alarms in case of abnormal conditions.
|
||||
- Historical Data Logging: Record and store historical data for analysis.
|
||||
- Human-Machine Interface (HMI): Provide a graphical interface for operators.
|
||||
|
||||
This package is designed to encapsulate the control logic required for a SCADA system, providing a modular
|
||||
and maintainable structure for implementing the various functionalities.
|
||||
"""
|
20
doc/Makefile
Normal file
20
doc/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)
|
21
doc/controls.rst
Normal file
21
doc/controls.rst
Normal file
@ -0,0 +1,21 @@
|
||||
controls package
|
||||
================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
controls.my\_module module
|
||||
--------------------------
|
||||
|
||||
.. automodule:: controls.my_module
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: controls
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
35
doc/make.bat
Normal file
35
doc/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
|
35
doc/source/conf.py
Normal file
35
doc/source/conf.py
Normal file
@ -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
|
||||
|
||||
project = 'Sphinx_project'
|
||||
copyright = '2023, Temur'
|
||||
author = 'Temur'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('../'))
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon', # Для поддержки Google-style docstrings
|
||||
]
|
||||
|
||||
|
||||
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']
|
21
doc/source/index.rst
Normal file
21
doc/source/index.rst
Normal file
@ -0,0 +1,21 @@
|
||||
.. Sphinx_project documentation master file, created by
|
||||
sphinx-quickstart on Fri Sep 29 02:08:39 2023.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to Sphinx_project's documentation!
|
||||
==========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
Loading…
Reference in New Issue
Block a user