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
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ jobs:
- name: Run Ruff Format Check
run: uv run ruff format --check

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Run sphinx-build
run: uv run sphinx-build docs docs/_build

unit-tests:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ Setup:
uv sync
uv run pre-commit install
```

Build the documentation

```bash
# oneshot build
uv run sphinx-build docs docs/_build
# continous serving
uv run sphinx-autobuild docs docs/_build
```
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/_build
38 changes: 38 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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
from datetime import date

project = "debmagic"
copyright = f"{date.today().year}, Debmagic Authors"
author = "Debmagic Authors"

master_doc = "index"
language = "en"

extensions = [
"sphinx_copybutton",
"myst_parser",
]
myst_enable_extensions = [
"colon_fence",
]

templates_path = ["_templates"]
exclude_patterns = ["_build"]

# html settings

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_context = {
"display_github": True,
"github_user": "SFTtech",
"github_repo": "debmagic",
"github_version": "main",
"conf_py_path": "/docs/",
}
6 changes: 6 additions & 0 deletions docs/develop/_changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

```{include} ../../debian/changelog
:relative-docs: docs/
:relative-images:
```
7 changes: 7 additions & 0 deletions docs/develop/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contribute

This section covers documentation relevant to developing and maintaining the debmagic
codebase, and some guidelines for how you can contribute.

```{toctree}
```
23 changes: 23 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# debmagic

```{toctree}
:hidden:
:caption: Usage

usage/getting-started.md
usage/installation.md
```

```{toctree}
:hidden:
:caption: Development

develop/index.md
```

```{toctree}
:hidden:
:caption: 📖 Reference

develop/_changelog.md
```
2 changes: 2 additions & 0 deletions docs/usage/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Getting Started

1 change: 1 addition & 0 deletions docs/usage/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Installation
16 changes: 15 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,21 @@ requires = ["setuptools>=77.0.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[dependency-groups]
dev = ["pytest>=9.0.1", "pytest-cov>=7.0.0", "ruff", "pre-commit", "mypy"]
dev = [
{ include-group = "docs" },
"pytest>=9.0.1",
"pytest-cov>=7.0.0",
"ruff",
"pre-commit",
"mypy",
]
docs = [
"sphinx>=8.2.3,<9",
"myst-parser>=4.0.1",
"sphinx-autobuild>=2025.8.25",
"sphinx-copybutton>=0.5.2",
"sphinx-rtd-theme>=3.0.2",
]

[tool.mypy]
mypy_path = '$MYPY_CONFIG_FILE_DIR/src'
Expand Down
543 changes: 543 additions & 0 deletions uv.lock

Large diffs are not rendered by default.