Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXINTL ?= sphinx-intl
SOURCEDIR = .
BUILDDIR = _build/html
SPHINXOPTS += -W --keep-going -n
Expand All @@ -18,5 +19,6 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXINTL) update -p _build/gettext -l en -l ru
@$(SPHINXBUILD) -b html -D language=en "$(SOURCEDIR)" "$(BUILDDIR)/en" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -b html -D language=ru "$(SOURCEDIR)" "$(BUILDDIR)/ru" $(SPHINXOPTS) $(O)
Empty file removed docs/_static/.gitkeep
Empty file.
252 changes: 252 additions & 0 deletions docs/_static/ci_graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Below is the table of contents for the Parallel Programming Course documentation
user_guide/download
user_guide/environment
user_guide/submit_work
user_guide/ci
46 changes: 46 additions & 0 deletions docs/locale/en/LC_MESSAGES/user_guide/ci.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2025, Learning Process
# This file is distributed under the same license as the Parallel
# Programming Course package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-25 16:54+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
"Language-Team: en <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: ../../user_guide/ci.rst:2
msgid "Continuous Integration (CI)"
msgstr ""

#: ../../user_guide/ci.rst:4
msgid ""
"Students need to pass all the checks in the CI pipeline before their work"
" can be considered for submission. This includes successful code "
"checkout, build ans testing stages. Each integration is verified by an "
"automated build and automated tests."
msgstr ""

#: ../../user_guide/ci.rst:9
msgid "CI Pipeline"
msgstr ""

#: ../../user_guide/ci.rst:11
msgid "The CI pipeline for this project is illustrated in the following diagram:"
msgstr ""

#: ../../user_guide/ci.rst:13
msgid "CI Pipeline Diagram"
msgstr ""

47 changes: 47 additions & 0 deletions docs/locale/ru/LC_MESSAGES/user_guide/ci.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2025, Learning Process
# This file is distributed under the same license as the Parallel
# Programming Course package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-25 16:54+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: ru\n"
"Language-Team: ru <LL@li.org>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: ../../user_guide/ci.rst:2
msgid "Continuous Integration (CI)"
msgstr ""

#: ../../user_guide/ci.rst:4
msgid ""
"Students need to pass all the checks in the CI pipeline before their work"
" can be considered for submission. This includes successful code "
"checkout, build ans testing stages. Each integration is verified by an "
"automated build and automated tests."
msgstr ""

#: ../../user_guide/ci.rst:9
msgid "CI Pipeline"
msgstr ""

#: ../../user_guide/ci.rst:11
msgid "The CI pipeline for this project is illustrated in the following diagram:"
msgstr ""

#: ../../user_guide/ci.rst:13
msgid "CI Pipeline Diagram"
msgstr ""

15 changes: 15 additions & 0 deletions docs/user_guide/ci.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Continuous Integration (CI)
============================

Students need to pass all the checks in the CI pipeline before their work can be considered for submission.
This includes successful code checkout, build ans testing stages.
Each integration is verified by an automated build and automated tests.

CI Pipeline
------------

The CI pipeline for this project is illustrated in the following diagram:

.. image:: ../_static/ci_graph.svg
:alt: CI Pipeline Diagram
:align: center
46 changes: 46 additions & 0 deletions scripts/jobs_graph.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import os

try:
import yaml
except ImportError:
print("Please install pyyaml: pip install pyyaml")
exit(1)

try:
import graphviz
except ImportError:
print("Please install graphviz: pip install graphviz")
exit(1)


def parse_gha_yml(file_path):
with open(file_path, "r") as file:
gha_data = yaml.safe_load(file)
return gha_data


def build_jobs_graph(gha_data):
jobs = gha_data.get("jobs", {})
dot = graphviz.Digraph()

for job_name, job_data in jobs.items():
dot.node(job_name)
needs = job_data.get("needs", [])
if isinstance(needs, str):
needs = [needs]
for dependency in needs:
dot.edge(dependency, job_name)

return dot


def save_graph(dot, filename, file_format):
dot.render(filename, format=file_format, cleanup=True)


if __name__ == "__main__":
gha_file_path = os.path.join(".github", "workflows", "main.yml")
svg_path = os.path.join("docs", "_static", "ci_graph")
gha_data = parse_gha_yml(gha_file_path)
jobs_graph = build_jobs_graph(gha_data)
save_graph(jobs_graph, svg_path, "svg")
Loading