Skip to content

Commit 89487d1

Browse files
committed
test 2 locales
1 parent 79c4f8f commit 89487d1

35 files changed

+6206
-119
lines changed

.gitignore

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,34 @@
1+
# Byte-compiled / optimized / DLL / temporary / generated files
12
*~
2-
*.py[co]
3+
*__pycache__*
4+
*$py.class
5+
*.py[cod]
36
*.cpp
47
*.so
58
*.orig
69

7-
### Python template
8-
# Byte-compiled / optimized / DLL files
9-
*__pycache__*
10-
*.py[cod]
11-
*$py.class
12-
*experiments/explainers_metrics*
10+
# Virtual env
11+
/venv
1312

13+
# IDE files
1414
.cache
1515
.idea
1616
.project
17-
18-
_static
19-
build
20-
config
21-
pics
22-
pic
23-
results
24-
sphinx_docs
25-
*explainers_metrics*
26-
experiments/explainers_metrics/**/*_metrics.json
27-
28-
datasets
29-
explanations
30-
models
31-
models_exp
32-
results
33-
data_info
34-
#user_models_obj
35-
#user_models_managers
36-
user_datasets
37-
PGE_gen_models
38-
39-
venv
40-
venv_new
41-
42-
4317
.vscode
4418

45-
gnn
46-
torch_install
47-
gnn_aid/.vscode
48-
4919
# Mac OS extentions
5020
*.DS_Store
5121

22+
# Project directories
23+
/data/ptg-library-graphs/
24+
/datasets/
25+
/explanations/
26+
/models/
27+
/data_info/
28+
/user_datasets
29+
/PGE_gen_models
30+
5231
# Sphinx documentation
53-
docs/_build/
32+
/docs/source/_build/
33+
/docs/**/*.mo
5434

docs/source/conf.py

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Configuration file for the Sphinx documentation builder.
22

3+
# # Извлечь тексты для перевода
4+
# sphinx-build -b gettext . _build/gettext
5+
#
6+
# # Создать/обновить англ переводы
7+
# sphinx-intl update -p _build/gettext -l en
8+
#
9+
# # Собрать документацию на англ и русском
10+
# sphinx-build -b html -D language=en . _build/html/en
11+
# sphinx-build -b html -D language=ru . _build/html/ru
12+
13+
314
# -- Path setup --------------------------------------------------------------
415

516
# If extensions (or modules to document with autodoc) are in another directory,
@@ -15,6 +26,7 @@
1526
# Use fake imports sto avoid readthedocs fails because of installation timeout
1627
sys.path.insert(0, os.path.abspath("../")) # path to docs/
1728
import docs.mock_imports
29+
import sphinx_rtd_theme
1830

1931
# -- Project information
2032

@@ -53,20 +65,6 @@
5365

5466
templates_path = ['_templates']
5567

56-
# -- Options for HTML output
57-
58-
html_theme = 'sphinx_rtd_theme'
59-
html_theme_options = {
60-
'collapse_navigation': True,
61-
'titles_only': False,
62-
}
63-
64-
html_static_path = ["_static"]
65-
html_logo = "_static/logo.png"
66-
67-
# -- Options for EPUB output
68-
epub_show_urls = 'footnote'
69-
7068
# ---------------------
7169
autodoc_member_order = 'bysource'
7270
autodoc_special_members = '__init__'
@@ -82,4 +80,25 @@
8280
autosummary_generate = True
8381
add_module_names = False # убирает 'datasets.ptg_datasets.' перед именем
8482

85-
todo_include_todos = True
83+
todo_include_todos = True
84+
85+
# -- locale
86+
87+
language = 'ru' # русский как основной
88+
locale_dirs = ['locale/']
89+
gettext_compact = False
90+
91+
# -- Options for HTML output
92+
93+
html_theme = 'sphinx_rtd_theme'
94+
html_theme_options = {
95+
'collapse_navigation': True,
96+
'titles_only': False,
97+
}
98+
99+
html_static_path = ["_static"]
100+
html_logo = "_static/logo.png"
101+
102+
# -- Options for EPUB output
103+
epub_show_urls = 'footnote'
104+

docs/source/getting_started.rst

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,122 @@
1-
Getting started
2-
***************
1+
Начало работы
2+
*************
33

44
.. contents::
55
:local:
66
:depth: 2
77

88
..
9-
гайд по установке и запуску (на не более 30мин), с ощущением достижения для читателя
9+
гайд по установке и запуску (не более 30 минут), с ощущением достижения для читателя
1010
1111
установка
12-
запуск на бэке
12+
запуск на бэкенде
1313
взять датасет, обучить модель, добавить 2 атаки и посмотреть числа
14-
запуск фронта
14+
запуск фронтенда
1515
запуск main и как открыть в браузере
1616
запуск из докера?
1717

1818

19-
Installation
20-
============
19+
Установка
20+
=========
2121

22-
| GNN-AID was developed and tested under Ubuntu 20.04 and 22, so they
23-
suit best for it.
24-
| For another OS consider docker.
22+
| GNN-AID разрабатывался и тестировался под Ubuntu 20.04 и 22.04, поэтому
23+
они подходят лучше всего.
24+
| Для других операционных систем рекомендуется использовать Docker.
2525
26-
You need python of version ``3.11`` or higher. We advice to create
27-
virtual environment with ``pip``.
26+
Вам понадобится Python версии ``3.11`` или выше. Мы рекомендуем создать
27+
виртуальное окружение с помощью ``pip``.
2828

2929
::
3030

3131
python -m pip install --upgrade pip
3232

33-
First, get auxiliary libraries
33+
Сначала установите вспомогательные библиотеки
3434

3535
::
3636

3737
sudo apt-get install -y build-essential python3-dev libfreetype6-dev pkg-config
3838

39-
Then install all project dependencies
39+
Затем установите все зависимости проекта
4040

4141
::
4242

4343
pip install -r requirements1.txt
4444
pip install -r requirements2.txt
4545
pip install -r requirements3.txt
4646

47-
The 3rd pack of requirements will take around 20 minutes.
47+
Третий набор зависимостей устанавливается примерно 20 минут.
4848

49-
Problems
49+
Проблемы
5050
--------
5151

52-
If you see 139 or 134 error code when run the script, it is likely a
53-
compatibility issue. Try the following:
52+
Если при запуске скрипта вы видите код ошибки 139 или 134, скорее всего,
53+
это проблема совместимости. Попробуйте следующее:
5454

55-
1. Update video card drivers (if you have decided to use cuda).
56-
2. Update gcc to the most recent version.
57-
3. Remove all torch modules that use С++ code.
58-
4. Install all torch packages again.
55+
1. Обновите драйверы видеокарты (если вы используете CUDA).
56+
2. Обновите gcc до самой новой версии.
57+
3. Удалите все модули torch, использующие C++ код.
58+
4. Установите все пакеты torch заново.
5959

60-
Run in backend
60+
Запуск бэкенда
6161
==============
6262

6363
.. todo::
6464

6565
TODO
6666

6767

68-
Create dataset
69-
--------------
68+
Создание датасета
69+
-----------------
7070

7171
.. todo::
7272

7373
TODO
7474

7575

76-
Build and train model
77-
---------------------
76+
Сборка и обучение модели
77+
------------------------
7878

7979
.. todo::
8080

8181
TODO
8282

83-
Run in frontend
84-
===============
8583

86-
Suppose you are at the project root folder. Activate virtual environment
84+
Запуск фронтенда
85+
================
86+
87+
Предполагается, что вы находитесь в корневой директории проекта.
88+
Активируйте виртуальное окружение
8789

8890
.. code:: text
8991
9092
source venv/bin/activate
9193
92-
Go to ``gnn_aid`` folder and add it to python dependencies
94+
Перейдите в каталог ``gnn_aid`` и добавьте его в зависимости Python
9395

9496
.. code:: text
9597
9698
cd gnn_aid
9799
export PYTHONPATH=.
98100
99-
Run ``main.py`` script
101+
Запустите скрипт ``main.py``
100102

101103
.. code:: text
102104
103105
python web_interface/main.py
104106
105-
You will see something like this
107+
Вы увидите примерно следующее
106108

107109
.. code:: text
108110
109111
======== Running on http://0.0.0.0:5000 ========
110112
(Press CTRL+C to quit)
111113
112-
Then go to `127.0.0.1:5000 <http://127.0.0.1:5000>`__ in your browser.
113-
You should see web-interface is loaded.
114+
Затем откройте `127.0.0.1:5000 <http://127.0.0.1:5000>`__ в браузере.
115+
Вы должны увидеть загруженный веб-интерфейс.
114116

115-
Docker version
116-
--------------
117+
Версия с Docker
118+
---------------
117119

118120
.. todo::
119121

120-
TODO
122+
TODO

docs/source/index.rst

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1-
Welcome to GNN-AID documentation!
2-
=================================
1+
Добро пожаловать в документацию GNN-AID!
2+
=========================================
33

4-
GNN-AID is an open framework for **A**\ nalysis, **I**\ nterpretation, and **D**\ efensing Graph Neural Networks.
5-
It is built on `PyTorch-Geometric <https://pytorch-geometric.readthedocs.io>`_ and:
4+
**GNN-AID** — это открытый фреймворк для визуализации, анализа, интерпретации графовых нейронных сетей с возможность применять атаки и защиты.
5+
Фреймворк построен на базе `PyTorch-Geometric <https://pytorch-geometric.readthedocs.io>`_ и:
66

7-
- includes preloaded `datasets from PyG <https://pytorch-geometric.readthedocs.io/en/latest/cheatsheet/data_cheatsheet.html>`_
8-
- extendable API for custom architectures: datasets, models, explainers, attacks and defense methods
9-
- MLOps features for experiments reproducibility
7+
- включает готовые `датасеты из PyG <https://pytorch-geometric.readthedocs.io/en/latest/cheatsheet/data_cheatsheet.html>`_
8+
- расширяемый API для пользовательских архитектур на уровне датасетов, моделей, методов интерпретации, атак и защит
9+
- MLOps техники для воспроизводимых экспериментов
1010

11-
GNN-AID has a web interface which supports:
11+
GNN-AID имеет веб-интерфейс, который поддерживает:
12+
13+
- интерактивную визуализацию графов
14+
- конструктор модели "без кода"
15+
- визуализация объяснений решения модели
16+
- визуализация результатов атак на модель
1217

13-
- graph visualization and analysis tools
14-
- no-code model building
15-
- visualization of models explanations
1618

1719
.. Check out :doc:`installation` of the project.
1820
1921
.. .. note::
2022

21-
.. This project is under active development.
23+
.. Проект находится в разработке.
2224
2325
2426
.. toctree::
2527
:maxdepth: 1
26-
:caption: Getting started
28+
:caption: Начало
2729

2830
getting_started
2931

3032
.. toctree::
3133
:maxdepth: 1
32-
:caption: Tutorials
34+
:caption: Примеры
3335

3436
tutorials
3537

3638
.. toctree::
3739
:maxdepth: 1
38-
:caption: User guide
40+
:caption: Руководство пользователя
3941

4042
user_guide/pipeline
4143
user_guide/backend
@@ -47,7 +49,7 @@ GNN-AID has a web interface which supports:
4749

4850
.. toctree::
4951
:maxdepth: 1
50-
:caption: Developer guide
52+
:caption: Руководство разработчика
5153

5254
dev_guide/arch_back.rst
5355
dev_guide/arch_front.rst
@@ -56,7 +58,7 @@ GNN-AID has a web interface which supports:
5658

5759
.. toctree::
5860
:maxdepth: 1
59-
:caption: Package reference
61+
:caption: Обзор пакетов
6062

6163
api/aux
6264
api/data_structures

0 commit comments

Comments
 (0)