From 29f743a2f40c03581b3b92f0ea8a156192f5c264 Mon Sep 17 00:00:00 2001 From: ilyavasilev Date: Mon, 25 Sep 2023 22:39:20 +0300 Subject: [PATCH] Make homework 1 --- scada_system/LICENSE | 21 +++++++++++++++++ scada_system/README.md | 17 ++++++++++++++ scada_system/controls/__init__.py | 9 ++++++++ scada_system/controls/setup.py | 0 scada_system/docs/Makefile | 20 +++++++++++++++++ scada_system/docs/make.bat | 35 +++++++++++++++++++++++++++++ scada_system/docs/source/conf.py | 28 +++++++++++++++++++++++ scada_system/docs/source/index.rst | 20 +++++++++++++++++ scada_system/pyproject.toml | 4 ++++ scada_system/requirements.txt | 36 ++++++++++++++++++++++++++++++ 10 files changed, 190 insertions(+) create mode 100644 scada_system/LICENSE create mode 100644 scada_system/README.md create mode 100644 scada_system/controls/__init__.py create mode 100644 scada_system/controls/setup.py create mode 100644 scada_system/docs/Makefile create mode 100644 scada_system/docs/make.bat create mode 100644 scada_system/docs/source/conf.py create mode 100644 scada_system/docs/source/index.rst create mode 100644 scada_system/pyproject.toml create mode 100644 scada_system/requirements.txt diff --git a/scada_system/LICENSE b/scada_system/LICENSE new file mode 100644 index 0000000..6020313 --- /dev/null +++ b/scada_system/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Vasilev Ilya + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/scada_system/README.md b/scada_system/README.md new file mode 100644 index 0000000..c2abefb --- /dev/null +++ b/scada_system/README.md @@ -0,0 +1,17 @@ +## Installation + +1. Install Python + +2. Create and activate your virtual environment following the [instructions](https://docs.python.org/3/tutorial/venv.html) + +3. Install the 'requirements.txt' dependencies using the commands: +''' +cd ./scada_system +pip install -r requirements.txt +''' + +4. To generate documentation in HTML format, you need to run the following commands: +''' +cd ./docs +make html +''' \ No newline at end of file diff --git a/scada_system/controls/__init__.py b/scada_system/controls/__init__.py new file mode 100644 index 0000000..7d879d4 --- /dev/null +++ b/scada_system/controls/__init__.py @@ -0,0 +1,9 @@ +''' +Supervisory control and data acquisition (SCADA) + +It is a control system architecture comprising computers, +networked data communications and graphical user interfaces for +high-level supervision of machines and processes. It also covers +sensors and other devices, such as programmable logic controllers, +which interface with process plant or machinery. +''' \ No newline at end of file diff --git a/scada_system/controls/setup.py b/scada_system/controls/setup.py new file mode 100644 index 0000000..e69de29 diff --git a/scada_system/docs/Makefile b/scada_system/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/scada_system/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/scada_system/docs/make.bat b/scada_system/docs/make.bat new file mode 100644 index 0000000..747ffb7 --- /dev/null +++ b/scada_system/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/scada_system/docs/source/conf.py b/scada_system/docs/source/conf.py new file mode 100644 index 0000000..f86af73 --- /dev/null +++ b/scada_system/docs/source/conf.py @@ -0,0 +1,28 @@ +# 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 = 'SCADA' +copyright = '2023, ilyavasilev' +author = 'ilyavasilev' +release = '0.0.1' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [] + +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/scada_system/docs/source/index.rst b/scada_system/docs/source/index.rst new file mode 100644 index 0000000..bf131f2 --- /dev/null +++ b/scada_system/docs/source/index.rst @@ -0,0 +1,20 @@ +.. SCADA documentation master file, created by + sphinx-quickstart on Mon Sep 25 22:24:00 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to SCADA's documentation! +================================= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/scada_system/pyproject.toml b/scada_system/pyproject.toml new file mode 100644 index 0000000..80c7591 --- /dev/null +++ b/scada_system/pyproject.toml @@ -0,0 +1,4 @@ +[project] +name = "SCADA" +description = "Cистема управления для сбора, анализа и визуализации данных" +version = "0.0.1" diff --git a/scada_system/requirements.txt b/scada_system/requirements.txt new file mode 100644 index 0000000..bd125d3 --- /dev/null +++ b/scada_system/requirements.txt @@ -0,0 +1,36 @@ +alabaster==0.7.13 +astroid==2.15.7 +Babel==2.12.1 +certifi==2023.7.22 +charset-normalizer==3.2.0 +dill==0.3.7 +docutils==0.20.1 +idna==3.4 +imagesize==1.4.1 +importlib-metadata==6.8.0 +isort==5.12.0 +Jinja2==3.1.2 +lazy-object-proxy==1.9.0 +MarkupSafe==2.1.3 +mccabe==0.7.0 +mypy==1.5.1 +mypy-extensions==1.0.0 +packaging==23.1 +platformdirs==3.10.0 +Pygments==2.16.1 +pylint==2.17.6 +requests==2.31.0 +snowballstemmer==2.2.0 +Sphinx==7.2.6 +sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-serializinghtml==1.1.9 +tomli==2.0.1 +tomlkit==0.12.1 +typing_extensions==4.8.0 +urllib3==2.0.5 +wrapt==1.15.0 +zipp==3.17.0