Skip to content

Commit 24765c8

Browse files
Hendrik-codeclaude
andcommitted
Phase 4: add MkDocs + ReadTheDocs documentation infrastructure
- mkdocs.yml: Material theme site with mkdocstrings (Google style, show_source) and full nav covering all sub-packages - .readthedocs.yml: ReadTheDocs v2 config pointing to mkdocs.yml, Python 3.12, installs package with docs extras - .github/workflows/docs.yml: CI job that builds docs on every push/PR to main - docs/: landing page, getting-started guide, and 12 API reference pages (one per sub-package) using mkdocstrings ::: directives Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dc784af commit 24765c8

18 files changed

Lines changed: 604 additions & 95 deletions

.github/workflows/docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.12"
18+
19+
- name: Install package and docs dependencies
20+
run: |
21+
pip install -e .
22+
pip install mkdocs mkdocs-material "mkdocstrings[python]" mkdocs-gen-files mkdocs-literate-nav
23+
24+
- name: Build docs
25+
run: mkdocs build

.readthedocs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-24.04
5+
tools:
6+
python: "3.12"
7+
8+
mkdocs:
9+
configuration: mkdocs.yml
10+
11+
python:
12+
install:
13+
- method: pip
14+
path: .
15+
extra_requirements:
16+
- docs

CLAUDE.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

docs/api/bids.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# BIDS Files
2+
3+
Classes for navigating BIDS-compliant datasets, parsing filenames into structured entities,
4+
and filtering/querying files across subjects and sessions.
5+
6+
## BIDS_Global_info
7+
8+
::: TPTBox.core.bids_files.BIDS_Global_info
9+
options:
10+
show_source: true
11+
members_order: source
12+
13+
## Subject_Container
14+
15+
::: TPTBox.core.bids_files.Subject_Container
16+
options:
17+
show_source: true
18+
19+
## BIDS_FILE
20+
21+
::: TPTBox.core.bids_files.BIDS_FILE
22+
options:
23+
show_source: true
24+
25+
## Searchquery
26+
27+
::: TPTBox.core.bids_files.Searchquery
28+
options:
29+
show_source: true
30+
31+
## BIDS_Family
32+
33+
::: TPTBox.core.bids_files.BIDS_Family
34+
options:
35+
show_source: true

docs/api/logger.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Logger
2+
3+
Structured, consistent logging for long-running medical image processing pipelines.
4+
5+
## Logger
6+
7+
::: TPTBox.logger.log_file.Logger
8+
options:
9+
show_source: true
10+
11+
## Logger_Interface
12+
13+
::: TPTBox.logger.log_file.Logger_Interface
14+
options:
15+
show_source: true
16+
17+
## No_Logger
18+
19+
::: TPTBox.logger.log_file.No_Logger
20+
options:
21+
show_source: true
22+
23+
## String_Logger
24+
25+
::: TPTBox.logger.log_file.String_Logger
26+
options:
27+
show_source: true
28+
29+
## Log_Type
30+
31+
::: TPTBox.logger.log_constants.Log_Type
32+
options:
33+
show_source: true

docs/api/mesh3d.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Mesh 3D
2+
3+
3D surface mesh generation from segmentation volumes and snapshot rendering.
4+
5+
## Snapshot 3D
6+
7+
::: TPTBox.mesh3D.snapshot3D
8+
options:
9+
show_source: true
10+
filters: ["!^_"]
11+
12+
## Mesh
13+
14+
::: TPTBox.mesh3D.mesh
15+
options:
16+
show_source: true
17+
filters: ["!^_"]
18+
19+
## Mesh Colors
20+
21+
::: TPTBox.mesh3D.mesh_colors
22+
options:
23+
show_source: true
24+
filters: ["!^_"]
25+
26+
## HTML Preview
27+
28+
::: TPTBox.mesh3D.html_preview
29+
options:
30+
show_source: true
31+
filters: ["!^_"]

docs/api/nii.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# NII — NIfTI Image Wrapper
2+
3+
The [`NII`][TPTBox.core.nii_wrapper.NII] class is the central image abstraction in TPTBox.
4+
It wraps a nibabel `Nifti1Image` and exposes reorientation, resampling, masking, arithmetic,
5+
and I/O operations through a consistent interface.
6+
7+
## NII
8+
9+
::: TPTBox.core.nii_wrapper.NII
10+
options:
11+
show_source: true
12+
members_order: source

docs/api/np_utils.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# NumPy Utilities
2+
3+
Low-level array helpers used throughout TPTBox for label extraction, morphological operations,
4+
connected components, centre-of-mass computation, and more.
5+
6+
::: TPTBox.core.np_utils
7+
options:
8+
show_source: true
9+
members_order: source
10+
filters:
11+
- "!^_"

docs/api/poi.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# POI — Points of Interest
2+
3+
[`POI`][TPTBox.core.poi.POI] maps `(vertebra_id, subregion_id)` tuples to 3D coordinates and
4+
provides save/load, coordinate-space conversion, and iteration helpers.
5+
6+
## POI
7+
8+
::: TPTBox.core.poi.POI
9+
options:
10+
show_source: true
11+
members_order: source
12+
13+
## POI_Global
14+
15+
::: TPTBox.core.poi_fun.poi_global.POI_Global
16+
options:
17+
show_source: true
18+
19+
## Helper functions
20+
21+
::: TPTBox.core.poi
22+
options:
23+
show_source: true
24+
members:
25+
- calc_centroids
26+
- calc_poi_from_subreg_vert
27+
- calc_poi_from_two_segs

docs/api/poi_fun.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# POI Strategies
2+
3+
Internal modules that implement the various strategies for computing Points of Interest
4+
from segmentation volumes.
5+
6+
## Ray Casting
7+
8+
::: TPTBox.core.poi_fun.ray_casting
9+
options:
10+
show_source: true
11+
filters: ["!^_"]
12+
13+
## Vertebra Direction
14+
15+
::: TPTBox.core.poi_fun.vertebra_direction
16+
options:
17+
show_source: true
18+
filters: ["!^_"]
19+
20+
## Vertebra Non-Centroid POIs
21+
22+
::: TPTBox.core.poi_fun.vertebra_pois_non_centroids
23+
options:
24+
show_source: true
25+
filters: ["!^_"]
26+
27+
## Pixel-Based Point Finder
28+
29+
::: TPTBox.core.poi_fun.pixel_based_point_finder
30+
options:
31+
show_source: true
32+
filters: ["!^_"]
33+
34+
## Strategies
35+
36+
::: TPTBox.core.poi_fun.strategies
37+
options:
38+
show_source: true
39+
filters: ["!^_"]
40+
41+
## Save / Load
42+
43+
::: TPTBox.core.poi_fun.save_load
44+
options:
45+
show_source: true
46+
filters: ["!^_"]

0 commit comments

Comments
 (0)