-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip ci] Resolve "Add a documentation"
- Loading branch information
1 parent
5aaaedd
commit fe32ea2
Showing
22 changed files
with
784 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2023 Benjamin Thomas Schwertfeger | ||
# GitHub: https://github.com/btschwertfeger | ||
# | ||
# Template workflow to build documentation. | ||
# | ||
|
||
name: Build Doc | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
type: string | ||
required: true | ||
python-version: | ||
type: string | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
Build: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
DEBIAN_FRONTEND=noninteractive sudo apt install -y pandoc | ||
uv venv | ||
source .venv/bin/activate | ||
echo ${GITHUB_WORKSPACE}/.venv/bin >> $GITHUB_PATH | ||
uv pip install -r doc/requirements.txt . | ||
- name: Build the documentation | ||
run: make doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
apt_packages: | ||
- pandoc | ||
|
||
# Build documentation in the doc/ directory with Sphinx | ||
sphinx: | ||
configuration: doc/conf.py | ||
|
||
# If using Sphinx, optionally build your docs in additional formats such as PDF | ||
formats: | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: doc/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Copyright (C) 2023 Benjamin Thomas Schwertfeger | ||
# GitHub: https://github.com/btschwertfeger | ||
# | ||
# 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 | ||
# pylint: disable=invalid-name | ||
|
||
""" | ||
This module is the configuration for the Sphinx documentation building process. | ||
""" | ||
|
||
import sys | ||
from pathlib import Path | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "kraken-infinity-grid" | ||
copyright = "2025, Benjamin Thomas Schwertfeger" # noqa: A001 # pylint: disable=redefined-builtin | ||
author = "Benjamin Thomas Schwertfeger" | ||
|
||
# to import the package | ||
parent_directory: Path = Path("..").resolve() | ||
sys.path.insert(0, str(parent_directory)) | ||
|
||
rst_epilog = "" | ||
# Read link all targets from file | ||
with Path("links.rst").open(encoding="utf-8") as f: | ||
rst_epilog += f.read() | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"nbsphinx", | ||
"sphinx_click", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.coverage", | ||
"sphinx.ext.doctest", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.autosectionlabel", | ||
"IPython.sphinxext.ipython_console_highlighting", | ||
] | ||
|
||
templates_path = ["_templates"] | ||
exclude_patterns = [ | ||
"_build", | ||
"Thumbs.db", | ||
".DS_Store", | ||
"links.rst", | ||
"**.ipynb_checkpoints", | ||
] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
# html_static_path = ["_static"] | ||
html_context = { | ||
"display_github": True, | ||
"github_user": "btschwertfeger", | ||
"github_repo": "kraken-infinity-grid", | ||
"github_version": "master/doc/", | ||
} |
Oops, something went wrong.