Skip to content

Commit 579e19f

Browse files
committed
docs: MkDocs Material site with API reference and example report
- mkdocs.yml: Material theme + mkdocstrings (API auto-generated from docstrings) - home / usage / API-reference pages; standalone report linked as example-report.html - 'docs' optional-dependency group; GitHub Pages deploy workflow (Actions) - replace the root report demo (docs/index.html) with the docs site
1 parent 4dc693f commit 579e19f

9 files changed

Lines changed: 2958 additions & 1818 deletions

File tree

.github/workflows/docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build-deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0 # hatch-vcs needs full history for the version
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.11"
30+
- run: pip install -e ".[docs]"
31+
- run: mkdocs build
32+
- uses: actions/configure-pages@v5
33+
- uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: site
36+
- id: deployment
37+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ data/*html
1212
!data/ref_data/Gibbs_motifs_mouse/motif/*.png
1313
output/*
1414
.DS_Store
15+
# MkDocs build output
16+
/site/
1517
cli/*__pycache__
1618
test_output
1719
poetry.lock

docs/api.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# API reference
2+
3+
Auto-generated from the package docstrings.
4+
5+
## Search engine
6+
7+
::: mhc_tp.engine.search
8+
9+
::: mhc_tp.engine.kernels
10+
11+
## Reference data
12+
13+
::: mhc_tp.refdata.fetch
14+
15+
## Report
16+
17+
::: mhc_tp.report.render
18+
19+
::: mhc_tp.naming

0 commit comments

Comments
 (0)