Skip to content

Commit 07404b7

Browse files
docs(#72): Sphinx/RTD site + JOSS paper skeleton + coverage ratchet (slice 1) (#94)
* docs(#72): Sphinx/RTD site + JOSS paper skeleton + coverage ratchet 80->90 First bounded slice of roadmap issue #72 (docs + JOSS + coverage; SPEC 7 rng was already landed on main and is out of scope here). - Sphinx docs skeleton under docs/ (furo + MyST + autodoc/napoleon), Diataxis structure, autogenerated API reference from liouscope.__all__. Builds clean under `sphinx-build -W` (warnings-as-errors). Adds .readthedocs.yaml (v2, fail_on_warning) + docs/requirements.txt + a `docs` optional-dependency group. - JOSS paper skeleton: paper/paper.md + paper/paper.bib (JOSS 2026 sections). All six bibliography DOIs resolver-verified; author ORCIDs and research-impact evidence flagged TODO (not fabricated). - Coverage ratchet: fail_under raised 80 -> 90 in pyproject [tool.coverage.report] and CI --cov-fail-under; measured baseline branch coverage 94.61% (py3.14). CONTRIBUTING updated to match. Local verification (Windows, py3.14, this branch): ruff check src tests benchmarks -> exit 0 mypy src/liouscope -> Success, 52 files pytest tests/test_anchors.py -> 21 passed pytest --cov --cov-fail-under=90 -> 533 passed, 94.61% (gate reached) sphinx-build -W docs docs/_build/html -> build succeeded, 0 warnings check_claim_safety.py / hardening.py -> both pass Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(#72): expand JOSS paper.md to full required section set Bring paper/paper.md from a 585-word skeleton to a 1124-word (JOSS-style body count) submission draft covering all 2026-required sections: - State of the field: QuTiP/Trefethen-Embree context, complementary (generator characterisation vs time evolution), no abuse of QuTiP. - Software design: public API (build_liouvillian/steady_state/diagnose/ classify_mechanism), immutable typed result containers, six diagnostic layers, column-stacking order='F' + Roth's identity guard, non-Hermitian eigensolver (numpy.linalg.eig -> LAPACK zgeev), SPEC 7 rng keyword, A-N anchor regressions, D1-D20 submission set within D1-D24 schema, A1-A12-v3.1 taxonomy, fail-closed EnsembleEvidence claim gate (#78/E0706-13). - Research impact: HONEST — first-party use/benchmarks only, no external adoption yet (stated plainly); Zenodo/PyPI archived+citable; QuTiP CI cross-check + anchors are internal verification, not external validation. - AI usage disclosure: substantial — code/docs/paper co-developed with Claude agents under AGENTS.md, human review+merge gate, agent branch namespaces + labels, same required CI; cross-family review = independent model review, explicitly NOT external scientific validation. - Acknowledgements filled (NumPy/SciPy/QuTiP, SPEC 7). Claim discipline: every technical statement is checkable against the repo; no benchmark numbers asserted that are not reproducible. Author ORCID/ affiliation and funding remain marked TODO (must not be fabricated). paper.bib unchanged (6 Crossref-verified DOIs intact). Coverage ratchet (fail_under=90) untouched. Local chain green: ruff/mypy 0, 533 pytest pass, cov 94.61%, sphinx -W 0 warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3edcbce commit 07404b7

16 files changed

Lines changed: 523 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Run anchor regressions (must pass)
4444
run: pytest tests/test_anchors.py -v
4545
- name: Run full test suite
46-
run: pytest --cov=liouscope --cov-report=xml --cov-fail-under=80 -v
46+
run: pytest --cov=liouscope --cov-report=xml --cov-fail-under=90 -v
4747
- name: Upload coverage
4848
if: matrix.python-version == '3.12'
4949
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ benchmarks/output/
5353
*.npz
5454

5555
.ipynb_checkpoints/
56+
57+
# Sphinx documentation build output
58+
docs/_build/

‎.readthedocs.yaml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Read the Docs configuration (v2).
2+
# Docs: https://docs.readthedocs.io/en/stable/config-file/v2.html
3+
# Introduced by issue #72 (Sphinx + furo + MyST docs site).
4+
version: 2
5+
6+
build:
7+
os: ubuntu-24.04
8+
tools:
9+
python: "3.12"
10+
11+
sphinx:
12+
configuration: docs/conf.py
13+
# Mirror the local `sphinx-build -W` gate: any warning fails the RTD build.
14+
fail_on_warning: true
15+
16+
python:
17+
install:
18+
# Install LiouScope itself so autodoc can import the package.
19+
- method: pip
20+
path: .
21+
# Documentation-only tooling (Sphinx, furo, myst-parser).
22+
- requirements: docs/requirements.txt

‎CHANGELOG.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77
## [Unreleased]
88

99
### Added
10+
- **Sphinx + Read the Docs documentation skeleton** (issue #72 item 2).
11+
A `docs/` Sphinx site (furo theme, MyST Markdown, `autodoc` + `napoleon`
12+
API reference) organised along the Diátaxis structure
13+
(tutorials / how-to / reference / explanation), plus a `.readthedocs.yaml`
14+
(v2) and `docs/requirements.txt` / a `docs` optional-dependency group.
15+
Builds clean under `sphinx-build -W` (warnings-as-errors); RTD mirrors that
16+
gate via `fail_on_warning: true`. The Reference section is auto-generated
17+
from the public `liouscope.__all__` surface; tutorials / how-to /
18+
explanation are intentional stubs for a follow-up slice.
19+
- **JOSS paper skeleton** (issue #72 item 3). `paper/paper.md` +
20+
`paper/paper.bib` following the JOSS 2026 section requirements (Summary,
21+
Statement of need, State of the field, Software design, Research impact, AI
22+
usage disclosure). All six bibliography DOIs are resolver-verified; author
23+
identities/ORCIDs and research-impact evidence are flagged TODO (not
24+
fabricated) and must be completed before submission.
1025
- **SPEC 7 `rng` keyword, additive phase (a)** (issue #72 item 1).
1126
`diagnose()`, `seed_everything()` and the D18 surface
1227
(`compute_lep_layer` / `initial_state_sensitivity`) now accept a SPEC 7
@@ -24,6 +39,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
2439
separate SPEC 7 phase. Contract pinned in `tests/test_spec7_rng.py`.
2540

2641
### Changed
42+
- **Coverage ratchet 80 → 90** (issue #72 item 4). Measured branch coverage on
43+
the baseline (Python 3.14) was 94.61%. The `--cov-fail-under` gate in CI and
44+
the new `[tool.coverage.report] fail_under` in `pyproject.toml` are both set
45+
conservatively to 90 (up from the previous fixed 80), leaving headroom for
46+
cross-version variation on the 3.10–3.14 matrix. `CONTRIBUTING.md` updated to
47+
match.
2748
- **Release identity and provenance hardening.** Released `v0.5.0` remains
2849
immutable; default-branch VCS installs now report `0.6.0.dev0`. Manifest
2950
schema `1.4.0` adds the canonical structured-ensemble-evidence digest to

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pip install -e .[dev,qutip]
1616
## Running the test suite
1717

1818
```bash
19-
pytest --cov=liouscope --cov-fail-under=80
19+
pytest --cov=liouscope --cov-fail-under=90
2020
pytest tests/test_anchors.py # correctness-anchor regression gate
2121
```
2222

‎docs/_static/.gitkeep‎

Whitespace-only changes.

‎docs/conf.py‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
"""Sphinx configuration for the LiouScope documentation site.
2+
3+
Skeleton introduced by issue #72 (Sphinx + furo + MyST on Read the Docs).
4+
Only the curated pages under this directory participate in the build; the
5+
pre-existing standalone Markdown docs (release audits, ADRs, CANON status)
6+
are intentionally excluded via ``include_patterns`` so the Sphinx source tree
7+
stays scoped and ``-W`` (warnings-as-errors) builds clean.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
import importlib.metadata
13+
14+
# -- Project information -----------------------------------------------------
15+
16+
project = "LiouScope"
17+
author = "Coworker Research"
18+
copyright = "2026, Coworker Research" # noqa: A001 (Sphinx-mandated name)
19+
20+
# Single source of truth: read the installed package version. Falls back to a
21+
# sentinel so an uninstalled checkout still builds (RTD installs the package).
22+
try:
23+
release = importlib.metadata.version("liouscope")
24+
except importlib.metadata.PackageNotFoundError: # pragma: no cover - build-time guard
25+
release = "0.0.0+unknown"
26+
version = release
27+
28+
# -- General configuration ---------------------------------------------------
29+
30+
extensions = [
31+
"sphinx.ext.autodoc",
32+
"sphinx.ext.napoleon",
33+
"sphinx.ext.viewcode",
34+
"myst_parser",
35+
]
36+
37+
# Scope the Sphinx source scan to the curated Diataxis pages only. Without this
38+
# every pre-existing docs/*.md (RELEASE_AUDIT_*, CANON_STATUS, adr/**) would be
39+
# picked up and warn "document isn't included in any toctree", breaking -W.
40+
include_patterns = [
41+
"index.md",
42+
"tutorials/**",
43+
"how-to/**",
44+
"reference/**",
45+
"explanation/**",
46+
"_static/**",
47+
]
48+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
49+
50+
templates_path = ["_templates"]
51+
52+
# -- Autodoc / napoleon ------------------------------------------------------
53+
54+
autodoc_typehints = "description"
55+
autodoc_member_order = "bysource"
56+
autodoc_default_options = {
57+
"members": True,
58+
"show-inheritance": True,
59+
}
60+
napoleon_google_docstring = True
61+
napoleon_numpy_docstring = True
62+
napoleon_use_rtype = True
63+
64+
# -- MyST --------------------------------------------------------------------
65+
66+
myst_enable_extensions = [
67+
"colon_fence",
68+
"deflist",
69+
]
70+
myst_heading_anchors = 3
71+
72+
# -- HTML output -------------------------------------------------------------
73+
74+
html_theme = "furo"
75+
html_title = f"LiouScope {release}"
76+
html_static_path = ["_static"]

‎docs/explanation/index.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Explanation
2+
3+
*Understanding-oriented background and design rationale.*
4+
5+
:::{note}
6+
Skeleton (issue #72). In-depth methodology lives in the module docstrings (see
7+
{doc}`../reference/index`) and in `docs/RELEASE_AUDIT_v0.5.0.md`. This section
8+
will collect the conceptual narrative in a follow-up slice.
9+
:::
10+
11+
## Topics to cover
12+
13+
- **Why "no single number"** — the Liouvillian gap versus non-normal transient
14+
amplification and pseudospectra.
15+
- **The D1–D24 diagnostic layers** and the A1–A12 mechanism taxonomy.
16+
- **Auditable reproducibility** — run manifests, seeds and the SPEC 7 `rng`
17+
keyword.

‎docs/how-to/index.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# How-to guides
2+
3+
*Goal-oriented recipes for specific tasks.*
4+
5+
:::{note}
6+
Skeleton (issue #72). Task recipes are planned for a follow-up slice. See
7+
`examples/` and `benchmarks/` in the repository for runnable references today.
8+
:::
9+
10+
## Planned how-to guides
11+
12+
- How to export and validate a run manifest.
13+
- How to supply `EnsembleEvidence` for A11 (quantum-Mpemba) confirmation.
14+
- How to cross-check a result against QuTiP.

‎docs/index.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# LiouScope documentation
2+
3+
**LiouScope** is an open-source diagnostic framework for time-homogeneous
4+
Markovian open quantum systems described by Gorini–Kossakowski–Sudarshan–Lindblad
5+
(GKSL) generators. It quantifies *when and why* the Liouvillian gap fails as a
6+
relaxation-time predictor, replacing a single "decay rate" number with a layered,
7+
auditable `DiagnosticReport`.
8+
9+
:::{note}
10+
This documentation site is an initial skeleton introduced by issue #72. It is
11+
organised along the [Diátaxis](https://diataxis.fr/) framework
12+
(tutorials / how-to / reference / explanation). The Reference section is
13+
auto-generated from the package docstrings; the Tutorials, How-to and
14+
Explanation sections are stubs to be filled in follow-up slices.
15+
:::
16+
17+
## Where to start
18+
19+
- **New to LiouScope?** Read the {doc}`tutorials/index`.
20+
- **Have a specific task?** See the {doc}`how-to/index`.
21+
- **Need the API?** Jump to the {doc}`reference/index`.
22+
- **Want the "why"?** Read the {doc}`explanation/index`.
23+
24+
For installation, the design philosophy ("no single number", explicit
25+
uncertainty, auditable manifests) and the current citable release gates, see the
26+
project `README.md` and `docs/RELEASE_AUDIT_v0.5.0.md` in the repository.
27+
28+
```{toctree}
29+
:hidden:
30+
:maxdepth: 2
31+
32+
tutorials/index
33+
how-to/index
34+
reference/index
35+
explanation/index
36+
```

0 commit comments

Comments
 (0)