Skip to content

Commit 1c5bcf8

Browse files
authored
Merge pull request #18 from openSUSE/docs-2
Improve development and user docs
2 parents 7aa9392 + d736945 commit 1c5bcf8

16 files changed

Lines changed: 143 additions & 30 deletions

changelog.d/18.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Docs: Improve development and user docs

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
extlinks = {
9090
# Example for linking to a specific file/path in the repo:
9191
'gh_path': (f'{gh_repo_url}/blob/main/%s', '%s'),
92+
# Example for linking to a specific directory in the repo:
93+
'gh_tree': (f'{gh_repo_url}/tree/main/%s', '%s'),
9294
# Linking to the GH issue tracker:
9395
'issue': (f'{gh_repo_url}/issues/%s', 'issue #%s'),
9496
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _build-docs:
2+
3+
Building Documentation
4+
======================
5+
6+
To build the documentation for this project, use the following steps:
7+
8+
#. Prepare your environment by following the instructions in :ref:`prepare-devel-env`.
9+
10+
#. Build the HTML documentation using the :ref:`makedocs <devel-helpers>` command:
11+
12+
.. code-block:: shell-session
13+
:caption: Building the documentation
14+
:name: makedocs
15+
16+
$ makedocs
17+
18+
#. Find the generated documentation in the :file:`docs/build/html` directory.

docs/source/developer/create-release.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ To create a new release, follow these steps:
77
#. Create a new branch for your release. The branch name should follow the format: ``release/<VERSION>``, where ``<VERSION>`` is the version number you are releasing (e.g., ``release/1.0.0``).
88
#. Run the alias :command:`bump-version.sh` to update the version number in the project files. For example:
99

10-
.. code-block:: shell
10+
.. code-block:: shell-session
1111
:caption: Bump the version number
1212
13-
bump-version.sh minor
13+
$ bump-version.sh minor
1414
1515
This will update the version number to the next minor version (e.g., from `1.0.0` to `1.1.0`).
1616
#. Update the changelog (see :ref:`update-changelog` for details).
1717
#. Commit your changes with a message that describes the release.
1818
#. Wait for the CI to pass. If it fails, fix the issues and commit again.
1919
#. If the CI passes, (squash-)merge your release branch into the main branch.
20-
#. Tag the commit in the ``main`` branch with the version number. The release process is triggered by this tag in the format ``MAJOR.MINOR.PATCH``.
20+
#. Tag the commit in the ``main`` branch with the version number. The release process is triggered by this tag in the format ``MAJOR.MINOR.PATCH``.
2121

2222
For example, if you are releasing version 1.1.0, you would tag the commit as follows:
2323

24-
.. code-block:: shell
24+
.. code-block:: shell-session
2525
:caption: Tag the release commit
2626
2727
$ git tag 1.1.0

docs/source/developer/devel-helpers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _devel-helpers:
22

3-
Development helper tools
4-
------------------------
3+
Helper Tools
4+
------------
55

66
.. include:: ../../../devel/README.rst
77
:start-line: 3

docs/source/developer/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ Developer Guide
1414
run-ipython
1515
update-changelog
1616
create-release
17+
trigger-actions
18+
knowing-github-setup
19+
build-docs
1720
howto
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. _know-github-setup:
2+
3+
Knowing GitHub Project Setup
4+
============================
5+
6+
This project uses GitHub for version control and issue tracking.
7+
Additionally, it uses GitHub Actions for different tasks like building the documentation, running tests, and creating a release.
8+
9+
10+
GitHub Actions
11+
--------------
12+
13+
* Testing (:file:`.github/workflows/ci.yml`):
14+
Runs the test suite on every push and pull request to the main branch.
15+
It uses the `pytest` framework to execute tests.
16+
17+
* Documentation (:file:`.github/workflows/gh-pages.yml`):
18+
Builds the documentation and deploys it to the `gh-pages` branch.
19+
This is triggered on every push to the main branch and on pull requests that target the main. Furthermore it is only triggered if the workflow file itself is changed or anything inside the `docs/` directory.
20+
The documentation is available at |gh_repo|.
21+
22+
* Release (:file:`.github/workflows/release.yml`):
23+
Create a new release when a tag is pushed to the repository.
24+
It is triggered by a tag in the format `MAJOR.MINOR.PATCH`, e.g. `1.0.0`.
25+
Currently, it creates a release on GitHub where the description is automatically generated from pull requests and issues that are closed in the release.
26+
The releases are available at |gh_release|.
27+
28+
29+
Rulesets
30+
--------
31+
32+
Under https://github.com/openSUSE/docbuild/settings/rules we have rulesets to protect the default branch and tags that matches the semantic versioning format.

docs/source/developer/prepare-environment.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _prepare-your-devel-environment:
1+
.. _prepare-devel-env:
22

33
Preparing Your Development Environment
44
======================================
@@ -14,10 +14,18 @@ This document provides instructions for setting up a development environment for
1414
possible to do so.
1515

1616

17-
1817
.. include:: devel-helpers.rst
1918

2019

20+
GitHub CLI
21+
----------
22+
23+
GiHub CLI is a command-line tool :command:`gh` allows you to interact with GitHub repositories and perform various tasks directly from the terminal.
24+
25+
It is not required for this project, but it can be useful for managing issues, pull requests, and other GitHub-related tasks directly from the terminal.
26+
27+
Find more information at `GitHub CLI <https://cli.github.com/>`_.
28+
2129

2230
Starting the development environment
2331
------------------------------------
@@ -29,6 +37,8 @@ The following steps are recommended to set up your development environment:
2937
2. If you haven't created a virtual environment, do so:
3038

3139
.. code-block:: shell-session
40+
:caption: Creating a virtual environment with |uv|
41+
:name: uv-venv
3242
3343
$ uv venv --prompt venv313 --python 3.13 .venv
3444
@@ -37,9 +47,11 @@ The following steps are recommended to set up your development environment:
3747
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.
3848
See file :file:`pyproject.toml` in ``project.requires-python`` for the exact version.
3949

40-
3. Syncronize the virtual environment with the project dependencies, but use the development group instead of the default group:
50+
3. Synchronize the virtual environment with the project dependencies, but use the development group instead of the default group:
4151

4252
.. code-block:: shell-session
53+
:caption: Synchronizing the virtual environment with the development dependencies
54+
:name: uv-sync-devel
4355
4456
$ uv sync --frozen --group devel
4557
@@ -48,6 +60,8 @@ The following steps are recommended to set up your development environment:
4860
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):
4961

5062
.. code-block:: shell-session
63+
:caption: Activating the shell aliases for development
64+
:name: activate-aliases
5165
5266
$ source devel/activate-aliases.sh
5367
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _trigger-actions:
2+
3+
Triggering Actions Manually
4+
===========================
5+
6+
In case you need to trigger a GitHub Action manually, you can do so by using the "Run workflow" button available in the "Actions" tab of the repository on GitHub.
7+
8+
Currently, the following workflows can be triggered manually:
9+
10+
* Testing
11+
* Documentation

docs/source/glossary.rst

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,39 @@ Glossary
66

77
Changelog
88
A record of all notable changes made in a project.
9+
910
See also :ref:`update-changelog`.
1011

12+
DAPS
13+
The *Documentation and Publishing System* (DAPS) is a tool to build documentation from DocBook or ADoc files.
14+
It is used to generate various output formats such as HTML, PDF, and EPUB.
15+
16+
DC File
17+
The *DAPS Configuration File* (DC file) is a configuration file used by DAPS to define parameters for building documentation. For example, it contains information about the entry file, what stylesheets to use, and other build options.
18+
19+
Deliverable
20+
The smallest unit of documentation that can be built. It's mapped to a DC File. A deliverable is usually being built in different formats.
21+
1122
Docset
12-
Usually a release or version of a project. For example, 15-SP6.
23+
Usually a release or version of a project. For example, ``15-SP6``.
1324

1425
Doctype
1526
A formal syntax to identify one or many set of documents.
1627
The syntax is ``[PRODUCT]/[DOCSET][@LIFECYCLES]/LANGS`` and
1728
contains product, docset, lifecycles, and language.
1829

30+
See also :ref:`doctype-syntax`.
31+
1932
Lifecycle
2033
The state of a document in its lifecycle.
21-
For example, `supported`, `beta`, `unsupported` or `hidden`.
34+
For example, ``supported``, ``beta``, ``unsupported`` or ``hidden``.
35+
36+
See class :class:`~docbuild.models.lifecycle.LifecycleFlag`.
37+
38+
Product
39+
A abbreviated name for a SUSE product. For example, ``sles``.
2240

23-
Projects
24-
A name for a SUSE project. For example, `sles`.
25-
See :class:`~docbuild.models.product.Product`.
41+
See class :class:`~docbuild.models.product.Product`.
2642

2743
Virtual Python Environment (VENV)
2844
A self-contained and isolate directory that contains a Python

0 commit comments

Comments
 (0)