Commit 4769e80
authored
docs: fix Sphinx build warnings (#834)
* docs: fix undefined RST substitution in effect_summary docstring
The |effect| notation was being parsed by docutils as an RST
substitution reference, causing an ERROR in the Sphinx build.
Wrapped in double backticks to render as a literal code span.
* docs: fix bullet list indentation in PropensityScore.fit_outcome_model
Continuation lines of RST bullet items must be indented to align
with the text after the `- ` marker. The misaligned lines caused a
"bullet list ends without a blank line; unexpected unindent" WARNING
in the Sphinx build.
* docs: remove __init__ from autosummary methods toctree
autoclass already documents __init__ inline on the class page.
Listing it again in the methods autosummary caused ~30 duplicate
object description WARNINGs (one per public class). Excluding it
from the toctree loop removes the redundant standalone pages.
* docs: switch bibtex style from unsrt to alpha to fix duplicate labels
With bibtex_default_style="unsrt", each per-document bibliography
(filtered with :filter: docname in docnames) assigns sequential
numeric labels [1], [2], ... starting from 1. These collide in
Sphinx's global label registry when the same or different cite keys
appear across multiple documents, producing dozens of
bibtex.duplicate_label and bibtex.duplicate_citation WARNINGs.
Changing to "alpha" gives each entry a unique key derived from
author and year (e.g. [Sha02]), eliminating cross-document clashes.
* docs: fix notebook heading hierarchy to eliminate myst.header WARNINGs
MyST-NB warns when a document's first heading is not H1, or when
heading levels increase non-consecutively (e.g. H2 -> H4).
- structural_causal_models.ipynb: promote title ## -> #; promote
orphan #### subsections (before first ###) to ##
- inv_prop_latent.ipynb: promote title ## -> #; fix #### -> ## for
the Brief Digression subheading
- iv_pymc.ipynb: fix ### Comparison to OLS -> ## (H1 -> H3 jump)
- iv_vs_priors.ipynb: promote title ## -> #; restructure cell 4
from #### to ## / ### to match the two-topic (S&S / Horseshoe)
organisation
- iv_weak_instruments.ipynb: promote title ## -> #; fix
#### Digression -> ### (H2 -> H4 jump)
* docs: enable myst_heading_anchors to fix broken xref links in estimands.md
estimands.md links into quasi_dags.ipynb using slug anchors such as
that exist in the notebook, but MyST never registered them as cross-
reference targets because myst_heading_anchors defaulted to 0.
Setting myst_heading_anchors = 3 makes MyST auto-generate anchors for
all H1–H3 headings across all documents, resolving the four
myst.xref_missing WARNINGs without requiring explicit (label)= markers.
* docs: consolidate bibliography into a single global references page
bibtex.duplicate_citation fires when the same cite key appears in
multiple documents that each have their own {bibliography} block. There
were 18 duplicate keys across 23 documents (~28 warnings). The warning
is emitted by sphinxcontrib-bibtex when the same key is registered more
than once in its global citation registry via citation-list bibliography
blocks.
Replace 22 per-document {bibliography} blocks with a single central
bibliography on a new references.rst page. Each cite key is now
registered exactly once, eliminating all duplicate_citation warnings.
The {cite:p}/{cite:t} inline citations across all notebooks are
unchanged — they still resolve correctly via Sphinx's cross-document
reference machinery.
Changes:
- docs/source/references.rst (new): single .. bibliography:: directive
- docs/source/index.md: add references to toctree
- 22 notebooks/markdown files: remove per-page {bibliography} blocks
and their ## References / ### References headings
- docs/source/knowledgebase/glossary.rst: unchanged (uses footcite)
* docs: normalize whitespace in Hernan2024-HERCIW bib entry
Tabs replaced with spaces by prek on commit. No content change.
* docs: update reference on linden2015
* docs: exclude License section from README include to fix myst.xref_missing
The README's [Apache License 2.0](LICENSE) link is a relative path
that works on GitHub but causes a myst.xref_missing warning when
Sphinx includes the README — there is no LICENSE document in the
docs source tree.
Add a <!-- docs-end --> marker before the License section and update
the {include} directive with :end-before: so Sphinx stops there.
The license is still visible on GitHub via the README.
* docs: fix toc.not_included and trailing transition warnings
- Add rd_skl_drinking.ipynb to the Regression Discontinuity toctree;
the notebook existed but was missing from the index, causing a
toc.not_included WARNING.
- Remove trailing --- from estimands.md; a document-level transition
(horizontal rule) as the last element is invalid in docutils and
caused a WARNING: Document may not end with a transition.
* docs: fix LICENSE link in README to resolve myst.xref_missing
Replace the relative path (LICENSE) with an absolute URL so MyST
treats it as an external link rather than an internal cross-reference.
Removes the <!-- docs-end --> workaround so the License section is
now included in the rendered Sphinx docs as well.
* docs: restore notebook metadata to match main
* docs: move references page under knowledge base
* docs: strip citekey labels from references page with post-transform1 parent 74b7522 commit 4769e80
34 files changed
Lines changed: 103 additions & 446 deletions
File tree
- causalpy
- experiments
- docs/source
- _extensions
- _static
- _templates/autosummary
- knowledgebase
- notebooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
| 358 | + | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
1335 | 1335 | | |
1336 | | - | |
| 1336 | + | |
1337 | 1337 | | |
1338 | | - | |
| 1338 | + | |
1339 | 1339 | | |
1340 | 1340 | | |
1341 | 1341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | | - | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
0 commit comments