Skip to content

Commit 450c588

Browse files
authored
Add project dependencies (#40)
* Describe project and system dependencies * Add link to susedoc/docserv-config * Amend glossary
1 parent 42ea1b2 commit 450c588

6 files changed

Lines changed: 149 additions & 12 deletions

File tree

changelog.d/40.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add project dependencies, add link to ``susedoc/docserv-config`` repo, and amend the glossary

docs/source/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,20 @@
1717
gh_repo_url = f'https://github.com/{gh_user}/{project}'
1818
gh_repo_slug = f'{gh_user}/{project}'
1919

20+
xml_config_repo = 'https://gitlab.suse.de/susedoc/docserv-config'
21+
xml_config_slug = '/'.join(xml_config_repo.rsplit('/', 2)[-2:])
2022

2123
# --- Prolog configuration
2224
rst_prolog = f"""
25+
.. |daps| replace:: :command:`daps`
2326
.. |project| replace:: {project}
2427
.. |gh_repo_slug| replace:: {gh_repo_slug}
2528
.. |github_user| replace:: {gh_user}
2629
.. |gh_repo| replace:: {gh_repo_url}
2730
.. |gh_repo_url| replace:: `{gh_repo_slug} <{gh_repo_url}>`__
2831
.. |uv| replace:: :command:`uv`
2932
.. |gh_release| replace:: `Releases <{gh_repo_url}/releases/>`__
33+
.. |gl_xmlconfig| replace:: `GL://{xml_config_slug} <{xml_config_repo}>`__
3034
"""
3135

3236
# -- General configuration
@@ -144,7 +148,7 @@
144148
'icon_links': [
145149
{
146150
'name': 'GitLab susedoc/docserv-config',
147-
'url': 'https://gitlab.suse.de/susedoc/docserv-config',
151+
'url': xml_config_repo,
148152
'icon': 'fa-brands fa-square-gitlab',
149153
'type': 'fontawesome',
150154
},

docs/source/developer/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This guide provides all the necessary information for contributing to the projec
1414
:maxdepth: 2
1515
:caption: Tasks
1616

17+
project-dependencies
1718
prepare-environment
1819
develop-project
1920
run-testsuite

docs/source/developer/prepare-environment.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ The following diagram illustrates the relationship between the main components o
4646
.. include:: devel-helpers.rst
4747
:start-after: -text-begin-
4848

49+
50+
.. _github-cli:
51+
4952
GitHub CLI
5053
----------
5154

@@ -61,9 +64,9 @@ Setting up the development environment
6164

6265
The following steps are recommended to set up your development environment:
6366

64-
1. Follow the steps in :ref:`prepare-installation` and :ref:`installing-docbuild`.
67+
#. Follow the steps in :ref:`prepare-installation` and :ref:`installing-docbuild`.
6568

66-
2. If you haven't created a virtual environment, do so:
69+
#. If you haven't created a virtual environment, do so:
6770

6871
.. code-block:: shell-session
6972
:caption: Creating a virtual environment with |uv|
@@ -76,7 +79,7 @@ The following steps are recommended to set up your development environment:
7679
The example above uses Python 3.13, but you can adjust it according to your needs as long as it is compatible with the project.
7780
See file :file:`pyproject.toml` in ``project.requires-python`` for the exact version.
7881

79-
3. Synchronize the virtual environment with the project dependencies, but use the development group instead of the default group:
82+
#. Synchronize the virtual environment with the project dependencies, but use the development group instead of the default group:
8083

8184
.. code-block:: shell-session
8285
:caption: Synchronizing the virtual environment with the development dependencies
@@ -86,7 +89,7 @@ The following steps are recommended to set up your development environment:
8689
8790
The option ``--frozen`` ensures that the dependencies are installed exactly as specified in the lock file, preventing any unexpected changes.
8891

89-
4. Optionally, source the shell aliases defined in :file:`devel/activate-aliases.sh` to abbreviate the longer :command:`uv` calls (see :ref:`devel-helpers` for more information):
92+
#. Optionally, source the shell aliases defined in :file:`devel/activate-aliases.sh` to abbreviate the longer :command:`uv` calls (see :ref:`devel-helpers` for more information):
9093

9194
.. code-block:: shell-session
9295
:caption: Activating the shell aliases for development
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.. _project-deps:
2+
3+
Project Dependencies
4+
====================
5+
6+
Although this project contains pure Python code, it needs other dependencies to work correctly:
7+
8+
* **Python installation dependencies**
9+
10+
Minimum dependencies that the program can run at all.
11+
12+
* **Testing dependencies**
13+
14+
Dependencies used for testing.
15+
16+
* **Documentation Dependencies**
17+
18+
For building the documentation.
19+
20+
* **System dependencies**
21+
22+
These are explained in this topic.
23+
24+
All of the above points (except for the last one) are defined in the :file:`pyproject.toml` file.
25+
26+
27+
Operating System
28+
----------------
29+
30+
The code is developed on openSUSE, but should work on any Linux distribution.
31+
The project will support MacOS too. It's currently not planned to support Windows.
32+
33+
34+
.. note::
35+
36+
If you use a different OS than Linux, dependency resolution may be challenging. Either the required package is not available for your OS or it is hard to get it right.
37+
38+
You may have a better experience developing in a virtual machine running openSUSE or using a Docker container.
39+
40+
41+
Python
42+
------
43+
44+
The minimal Python version is defined in the :file:`pyproject.toml` file. It's strongly recommended to have the Python versions managed by |uv|.
45+
46+
47+
Editor
48+
------
49+
50+
You can use any editor you like. Rudimentary support is available for `VSCode <https://code.visualstudio.com/>`_.
51+
52+
53+
External tools
54+
--------------
55+
56+
* |daps|: our tool to build documentation. This is an obligatory requirement. This adds other dependencies.
57+
* |uv|, the Python package manager. This is explained in :ref:`devel-helpers`.
58+
* :command:`make` is used to build the documentation.
59+
* :command:`jing`: for validation the XML configuration files.
60+
* :command:`gh`: optional tool for interacting with GitHub, see :ref:`github-cli`.
61+
62+
63+
64+
XML configuration
65+
-----------------
66+
67+
Formerly known as the *Docserv XML configs*. These configuration files defines the :term:`products <Product>`, their :term:`releases <Docset>`, their :term:`lifecycle <Lifecycle>` status and more.
68+
69+
Clone the |gl_xmlconfig| or use the RNC schema from :gh_tree:`src/docbuild/config/xml/data/` to create this configuration.

docs/source/glossary.rst

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,37 @@ Glossary
44
.. glossary::
55
:sorted:
66

7+
ADoc
8+
ASCIIDoc
9+
A lightweight markup language, similar to Markdown, but with a more powerful and extensive syntax designed for writing complex technical documentation, articles, and books.
10+
11+
See also :term:`DocBook`, https://docs.asciidoctor.org/asciidoc/latest/.
12+
13+
Argument
14+
* Python: A value or object that you pass into a function/method.
15+
* Command-line: Data that the command operates on, usually a file name, a directory path, a URL, or a string of text that the program needs to perform its primary function.
16+
17+
See also :term:`Option`.
18+
19+
Asynchronous Programming
20+
A style of concurrent programming that allows a program to start long-waiting operations (like a network request) and then perform other work while waiting for the original operation to complete.
21+
With the ``async`` and ``await`` keywords, this method prevents the application from blocking on slow I/O tasks, keeping it efficient and responsive.
22+
23+
asyncio
24+
Python's standard library for writing concurrent code using the ``async``/``await`` syntax.
25+
26+
See also :term:`Asynchronous Programming`
27+
728
Changelog
829
A record of all notable changes made in a project.
930

1031
See also :ref:`create-release`.
1132

33+
Concurrency
34+
The ability of a system to manage and make progress on multiple tasks over an overlapping time period. It's about dealing with many things at once, but not necessarily executing them at the exact same instant. A single CPU core can be concurrent by rapidly switching between tasks.
35+
36+
See also :term:`Asynchronous Programming`, :term:`asyncio`, :term:`Parallelism`
37+
1238
DAPS
1339
The *Documentation and Publishing System* (DAPS) is a tool to build documentation from DocBook or ADoc files.
1440
It is used to generate various output formats such as HTML, PDF, and EPUB.
@@ -25,7 +51,7 @@ Glossary
2551
A semantic markup language based on :term:`XML` used for writing
2652
and publishing technical documentation.
2753

28-
See https://www.docbook.org
54+
See also :term:`ADoc`, https://www.docbook.org
2955

3056
Docset
3157
Usually a release or version of a project. For example, ``15-SP6``.
@@ -35,21 +61,54 @@ Glossary
3561
The syntax is ``[PRODUCT]/[DOCSET][@LIFECYCLES]/LANGS`` and
3662
contains product, docset, lifecycles, and language.
3763

38-
See also :ref:`doctype-syntax`.
64+
See section :ref:`doctype-syntax`.
65+
66+
GIL
67+
Global Interpreter Lock
68+
A mutex (a lock) in the standard CPython interpreter that ensures only one thread can execute Python bytecode at any given time within a single process. This lock effectively prevents multi-threaded, CPU-bound Python programs from achieving true parallelism on multi-core processors, as only one thread can run on one core at a time.
69+
70+
See also :term:`Mutex`.
3971

4072
IPython
4173
An interactive command-line interface for Python that enhances
4274
the standard Python shell with additional features.
4375

44-
See :ref:`use-ipython`.
76+
See section :ref:`use-ipython`.
4577

4678
Lifecycle
4779
Describes the distinct stages a product goes through, from its initial introduction to the market until its eventual decline and retirement.
4880

49-
This project defines the lifecycle stages ``supported``, ``beta``, ``unsupported`` and ``hidden``.
50-
5181
See class :class:`~docbuild.models.lifecycle.LifecycleFlag`.
5282

83+
Module
84+
In Python context, a single Python file containing code.
85+
86+
See also :term:`Package`.
87+
88+
Mutex
89+
Short for *Mutual Exclusion* is a locking mechanism in concurrent programming that ensures only one thread can access a shared resource at any given time. By requiring a thread to "acquire" the lock before using the resource and "release" it afterward, it prevents race conditions and protects shared data from being corrupted.
90+
91+
See also :term:`Concurrency`.
92+
93+
Option
94+
* Python: An optional settings that modify the function's behavior.
95+
* Command-line: a flag or switch that modifies a program's execution or triggers a specific behavior.
96+
97+
See also :term:`Argument`.
98+
99+
Package
100+
In Python context, a directory containing one or more Python modules.
101+
The Python interpreter treats a directory as a regular package if it contains a :file:`__init__.py` file.
102+
103+
See also :term:`Module`
104+
105+
Parallelism
106+
The simultaneous execution of multiple tasks at the exact same instant, which requires a system with multiple hardware resources like CPU cores.
107+
108+
*Parallelism* is about executing multiple tasks simultaneously. This requires multiple CPU cores
109+
110+
See also :term:`Concurrency`
111+
53112
PEP
54113
*Python Enhancement Proposal (PEP)* are design documents that
55114
describe a new feature for Python and documenting the design decisions.
@@ -97,7 +156,7 @@ Glossary
97156
reStructuredText (reST or RST) files into various output formats
98157
such as HTML, PDF, or manual pages or more.
99158

100-
See :ref:`build-docs`.
159+
See section :ref:`build-docs`.
101160

102161
UV
103162
A fast package manager which simplifies the building, installing,
@@ -118,7 +177,7 @@ Glossary
118177
By convention, a project's VENV is stored in a directory
119178
named :file:`.venv` located at the root of the project folder.
120179

121-
See :ref:`prepare-devel-env`.
180+
See section :ref:`prepare-devel-env`.
122181

123182
XML
124183
The *eXtensible Markup Language* is a text-based markup

0 commit comments

Comments
 (0)