Skip to content

Commit c016c28

Browse files
committed
Merge main branch into 9-feature-pip-installable
2 parents ca32684 + 666ab32 commit c016c28

54 files changed

Lines changed: 2675 additions & 34 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6.0.2
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v8.1.0
26+
with:
27+
enable-cache: true
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v6.2.0
31+
with:
32+
python-version-file: "pyproject.toml"
33+
34+
- name: Install dependencies
35+
run: uv sync --group docs
36+
37+
- name: Build documentation
38+
run: uv run sphinx-build -b html docs docs/_build/html
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v7.0.1
42+
with:
43+
path: docs/_build/html
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v5.0.0

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
!uv.lock
1515
!.pre-commit-config.yaml
1616

17+
# Except documentation files
18+
docs/_build
19+
!*.rst
20+
!*.html
21+
!*.css
22+
!*.js
23+
!*.svg
24+
1725
# Github
1826
!.github/*
1927
!*.yml

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>=3.10

docs/Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Makefile for Krum documentation
2+
3+
.PHONY: help html clean servedocs live watch
4+
5+
help:
6+
@echo "Available targets:"
7+
@echo " html - Build HTML documentation"
8+
@echo " clean - Remove generated files"
9+
@echo " servedocs - Build and serve static documentation"
10+
@echo " watch - Watch for changes and serve (auto-rebuild)"
11+
12+
html:
13+
uv run sphinx-build -b html . _build/html
14+
15+
clean:
16+
rm -rf _build
17+
18+
servedocs:
19+
uv run sphinx-build -b html . _build/html && uv run python -m http.server 8000 -d _build/html
20+
21+
watch:
22+
uv run sphinx-autobuild -b html . _build/html --port 8000 --host 127.0.0.1

docs/_static/byzantine_attack.svg

Lines changed: 60 additions & 0 deletions
Loading

docs/_static/custom.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* Custom CSS for Krum documentation */
2+
3+
:root {
4+
--pst-color-brand-primary: #2c3e50;
5+
--pst-color-brand-secondary: #3498db;
6+
}
7+
8+
.bd-header {
9+
background-color: #2c3e50;
10+
}
11+
12+
/* Hide empty "On this page" TOC */
13+
.bd-toc .page-toc:empty {
14+
display: none;
15+
}
16+
17+
.bd-toc .page-toc + .sidebar-secondary-item {
18+
display: none;
19+
}

docs/_static/external-links.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
document.querySelectorAll('.viewcode-link, .reference.external[href*="github.com"]').forEach(function (link) {
3+
link.setAttribute("target", "_blank");
4+
link.setAttribute("rel", "noopener noreferrer");
5+
});
6+
});

0 commit comments

Comments
 (0)