Skip to content

Commit bfa1f08

Browse files
Code clean-up and documentation refresh (#201)
* Remove unused _allowed_attrs guard helper * Remove dead pair-plot height helper and unused constants * Remove unused DEFAULT_CREDIBLE_INTERVAL_LEVELS alias * Extract _summary_parameters_by_datablock helper * Remove unused _set_created mutator * Remove never-wired lmfit iteration callback * Fix stale API and inconsistencies in user docs * Standardize single-crystal label on sc- in docs * Promote documentation-ci-build ADR to accepted * Add documentation-snippet-tests implementation plan * Add model-sample-absorption ADR suggestion * Apply prettier formatting to ADR, plan, and issue docs
1 parent be00bc7 commit bfa1f08

46 files changed

Lines changed: 708 additions & 150 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/dev/adrs/suggestions/documentation-ci-build.md renamed to docs/dev/adrs/accepted/documentation-ci-build.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR: Documentation CI and Build Verification
22

3-
**Status:** Proposed
3+
**Status:** Accepted
44
**Date:** 2026-05-31
55

66
## Group
@@ -77,6 +77,20 @@ Use `codespell` first for low-noise spelling checks. Consider `Vale`
7777
after the project has a small EasyDiffraction style vocabulary and an
7878
allowlist for crystallographic terms, package names, and CIF tags.
7979

80+
## Implementation Status
81+
82+
Most of this ADR is already in place; it is accepted to record the
83+
chosen direction and to track the remaining gaps.
84+
85+
| # | Decision | Status |
86+
| --- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87+
| 1 | MkDocs `--strict` build | **Done** — `docs-build` pixi task runs `mkdocs build --strict`; wired into the `lint-format.yml` "docs strict build" gate and the `docs.yml` deploy workflow. |
88+
| 2 | `mkdocstrings` for API pages | **Done** — `mkdocstrings` + `mkdocstrings-python` configured in `docs/mkdocs.yml` (handler `paths: ['src']`); the `api-reference/*.md` pages use `:::` directives. |
89+
| 3 | Snippet smoke tests | **Not done** — no task imports or executes the user-facing snippets in `quick-reference/`, `user-guide/first-steps.md`, or `user-guide/analysis-workflow/*.md`. Highest-value remaining gap. |
90+
| 4 | Tutorial freshness check | **Partial** — `notebook-prepare` plus `notebook-tests`/`notebook-exec-ci` exist, but no no-write task asserts that `notebook-prepare` leaves the committed `.ipynb` unchanged. |
91+
| 5 | `lychee` link checking | **Done for local/relative links** — `link-check` pixi task (config in `lychee.toml`) is wired into `lint-format.yml`. External-URL checking is deferred (see issue 114). |
92+
| 6 | `codespell`, then `Vale` | **codespell done** — `spell-check` pixi task wired into `lint-format.yml`. `Vale` deferred. |
93+
8094
## Options Considered
8195

8296
### MkDocs strict build
@@ -179,11 +193,14 @@ Cons:
179193

180194
## Deferred Work
181195

182-
- Decide whether link checking runs on every pull request, nightly, or
183-
both.
184-
- Decide whether snippet smoke tests extract fenced code blocks
196+
- Add snippet smoke tests for user-facing examples (decision 3). Tracked
197+
by the `documentation-snippet-tests` implementation plan. Open
198+
question carried into that plan: extract fenced code blocks
185199
automatically or rely on explicitly named snippets.
186-
- Decide whether docs CI should build only source Markdown or also build
187-
rendered notebooks.
188-
- Add the chosen checks to `pixi.toml`, CI configuration, and developer
189-
documentation after this ADR is accepted.
200+
- Add a no-write `notebook-prepare-check` task that fails CI when the
201+
committed notebooks are out of date with their `.py` sources (decision
202+
4).
203+
- Enable external-URL link checking in the docs gate (decision 5),
204+
scheduled or cached to avoid flakiness. Tracked by issue 114.
205+
- Adopt `Vale` prose linting once an EasyDiffraction style vocabulary
206+
and crystallographic-term allowlist exist (decision 6).

‎docs/dev/adrs/accepted/plotting-docs-performance.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ Settled in discussion on 2026-06-02:
450450
payload + faster draw) — a separate, data-side optimization.
451451
- A docs CI budget check (page weight / figure count) to catch
452452
regressions, aligning with
453-
[`documentation-ci-build.md`](../suggestions/documentation-ci-build.md).
453+
[`documentation-ci-build.md`](documentation-ci-build.md).
454454
- Hoist a single importmap into the **report** template `<head>` for
455455
standalone reports that render multiple Three.js scenes (the same
456456
per-scene-importmap bug as docs, but governed by

‎docs/dev/adrs/accepted/test-suite-and-validation.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ accumulated:
6666
slow and therefore runs on pull requests only. There is no fast,
6767
every-push check that the site builds strictly, links resolve, and
6868
prose is clean. This overlaps the unimplemented
69-
[Documentation CI and Build Verification](../suggestions/documentation-ci-build.md)
69+
[Documentation CI and Build Verification](documentation-ci-build.md)
7070
suggestion.
7171

7272
This ADR amends [Test Strategy](../accepted/test-strategy.md): the
@@ -338,7 +338,7 @@ prompt drift feedback. It is deliberately **separate from `docs.yml`**,
338338
which executes all tutorials and then builds and deploys — slow, and
339339
therefore pull-request-only. The detailed catalogue of documentation
340340
checks is owned by
341-
[Documentation CI and Build Verification](../suggestions/documentation-ci-build.md),
341+
[Documentation CI and Build Verification](documentation-ci-build.md),
342342
which this ADR coordinates with: that ADR defines _what_ the checks are;
343343
this ADR's decision is that the cheap, deterministic subset runs as part
344344
of the every-push test workflow. Promoting that ADR is part of this
@@ -443,15 +443,15 @@ drafting conversation, per the dependency-approval rule):
443443
- `pytest-benchmark` — performance-regression benchmarks (§7).
444444

445445
Coordinated with
446-
[Documentation CI and Build Verification](../suggestions/documentation-ci-build.md),
446+
[Documentation CI and Build Verification](documentation-ci-build.md),
447447
which carries the documentation-check tools (`codespell`, a link checker
448448
such as `lychee`, and later `Vale`) used by §9.
449449

450450
## Related ADRs
451451

452452
- [Test Strategy](../accepted/test-strategy.md) — amended by this ADR.
453-
- [Documentation CI and Build Verification](../suggestions/documentation-ci-build.md)
454-
— coordinated with §9.
453+
- [Documentation CI and Build Verification](documentation-ci-build.md) —
454+
coordinated with §9.
455455
- [Lint Complexity Thresholds](../accepted/lint-complexity-thresholds.md)
456456
— sibling Quality guardrail.
457457
- [Notebook Generation Source of Truth](../accepted/notebook-generation.md)

‎docs/dev/adrs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ folders.
3333
| Documentation | Accepted | Help Method Discoverability | Requires primary public objects and facades to expose consistent `help()` output. | [`help-discoverability.md`](accepted/help-discoverability.md) |
3434
| Documentation | Accepted | Notebook Generation Source of Truth | Treats tutorial `.py` files as editable sources and notebooks as generated artifacts. | [`notebook-generation.md`](accepted/notebook-generation.md) |
3535
| Documentation | Accepted | Plotting & Docs Performance for Interactive Figures | Self-hosts a lazy, shared figure runtime so docs pages load fast and progressively while staying interactive. | [`plotting-docs-performance.md`](accepted/plotting-docs-performance.md) |
36-
| Documentation | Suggestion | Documentation CI and Build Verification | Proposes strict MkDocs builds, API-derived docs, snippet smoke tests, link checks, and prose/spelling checks. | [`documentation-ci-build.md`](suggestions/documentation-ci-build.md) |
36+
| Documentation | Accepted | Documentation CI and Build Verification | Strict MkDocs builds, API-derived docs, snippet smoke tests, link checks, and prose/spelling checks. | [`documentation-ci-build.md`](accepted/documentation-ci-build.md) |
3737
| Experiment model | Accepted | Immutable Experiment Type | Makes experiment type axes creation-time state rather than mutable runtime state. | [`immutable-experiment-type.md`](accepted/immutable-experiment-type.md) |
3838
| Experiment model | Accepted | Automatic Line-Segment Background Estimation | Detects line-segment background control points from the measured pattern, peak-insensitive and editable. | [`background-auto-estimate.md`](accepted/background-auto-estimate.md) |
3939
| Experiment model | Accepted | Calculation Without Measured Data | Adds a writable `data_range` category so a structure-only experiment is calculable and plottable without loaded data. | [`calculation-without-measured-data.md`](accepted/calculation-without-measured-data.md) |

0 commit comments

Comments
 (0)