Skip to content

Commit 111d7e1

Browse files
igerberclaude
andcommitted
docs: custom autosummary template + residual triage (PR 2.5 of 2.5)
Closes the gap PR #407 left: 614 of 635 PR #407-residual warnings were member-level duplicate-object descriptions because :no-index: on page-level autoclass directives doesn't propagate to autodoc-generated members. PR 2.5 adds a custom autosummary class.rst template with :no-members: on the stub autoclass, and a function.rst template with :no-index: on the stub autofunction. All 50 class stubs and 48 function stubs are auto-regenerated on the next clean build (autosummary_generate_overwrite=True default). Architecture: - Class cross-refs resolve to stub URL (per PR #407 page-level :no-index:) - Member cross-refs resolve to page-level URL (only place still registered) - Function cross-refs resolve to page-level URL (stub now :no-index:) - Page-level pages keep current full inline member rendering (UX preserved) - Stubs become "header + autosummary tables linking to page-level" Also addresses 18 non-duplicate residuals so make html now warns 0: - 4 footnote-not-referenced + 1 def-list blank-line in source docstrings - 4 :doc: refs to .md files (myst-parser absent) converted to literal text - 4 broken markdown links to REGISTRY.html in T18/T19 notebooks - 3 orphan benchmarks.rst citations removed - T19 + T20 added to Tutorials: Business Applications toctree - 2 stale autosummary entries fixed (DiDResults.ci, CallawaySantAnnaResults.aggregate) - 3 page-vs-page function dups (chaisemartin_dhaultfoeuille, stacked_did, trop) resolved by adding :no-index: to page-level autofunction directives and switching 3 path-qualified autoclass directives to top-level paths Result: Sphinx make html went 2,170 (PR #407 start) -> 0 warnings (PR 2.5 end). This unblocks PR 3 (queued: -W enforcement in docs-tests.yml). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6679455 commit 111d7e1

126 files changed

Lines changed: 872 additions & 229 deletions

File tree

Some content is hidden

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

diff_diff/results.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ def in_time_placebo(
12751275
- ``pre_fit_rmse`` — RMSE on the fake pre-window
12761276
- ``n_pre_fake`` — periods before the fake date
12771277
- ``n_post_fake`` — periods from the fake date onward
1278+
12781279
NaN is emitted only for dimensional infeasibility. Frank-Wolfe
12791280
does not expose a mid-solver non-convergence signal; inspect
12801281
``pre_fit_rmse`` for poor refit quality.

diff_diff/triple_diff.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,13 @@ class TripleDifference:
355355
356356
Estimates the Average Treatment effect on the Treated (ATT) when treatment
357357
requires satisfying two criteria: belonging to a treated group AND being
358-
in an eligible partition of the population.
358+
in an eligible partition of the population. The DDD design was popularized
359+
by Gruber (1994) [2]_.
359360
360-
This implementation follows Ortiz-Villavicencio & Sant'Anna (2025), which
361-
shows that naive DDD implementations (difference of two DiDs, three-way
362-
fixed effects) are invalid when covariates are needed for identification.
361+
This implementation follows Ortiz-Villavicencio & Sant'Anna (2025) [1]_,
362+
which shows that naive DDD implementations (difference of two DiDs,
363+
three-way fixed effects) are invalid when covariates are needed for
364+
identification.
363365
364366
Parameters
365367
----------
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
:no-members:
7+
8+
{% block methods %}
9+
{% if methods %}
10+
.. rubric:: {{ _('Methods') }}
11+
12+
.. autosummary::
13+
{% for item in methods %}
14+
~{{ name }}.{{ item }}
15+
{%- endfor %}
16+
{% endif %}
17+
{% endblock %}
18+
19+
{% block attributes %}
20+
{% if attributes %}
21+
.. rubric:: {{ _('Attributes') }}
22+
23+
.. autosummary::
24+
{% for item in attributes %}
25+
~{{ name }}.{{ item }}
26+
{%- endfor %}
27+
{% endif %}
28+
{% endblock %}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autofunction:: {{ objname }}
6+
:no-index:

docs/api/_autosummary/diff_diff.BaconDecomposition.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
.. currentmodule:: diff_diff
55

66
.. autoclass:: BaconDecomposition
7+
:no-members:
78

89

9-
.. automethod:: __init__
10-
1110

1211
.. rubric:: Methods
1312

docs/api/_autosummary/diff_diff.BaconDecompositionResults.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
.. currentmodule:: diff_diff
55

66
.. autoclass:: BaconDecompositionResults
7+
:no-members:
78

89

9-
.. automethod:: __init__
10-
1110

1211
.. rubric:: Methods
1312

@@ -30,6 +29,7 @@
3029

3130
~BaconDecompositionResults.decomposition_error
3231
~BaconDecompositionResults.n_obs
32+
~BaconDecompositionResults.survey_metadata
3333
~BaconDecompositionResults.twfe_estimate
3434
~BaconDecompositionResults.comparisons
3535
~BaconDecompositionResults.total_weight_treated_vs_never

docs/api/_autosummary/diff_diff.CSBootstrapResults.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
.. currentmodule:: diff_diff
55

66
.. autoclass:: CSBootstrapResults
7+
:no-members:
78

89

9-
.. automethod:: __init__
10-
1110

1211
.. rubric:: Methods
1312

docs/api/_autosummary/diff_diff.CallawaySantAnna.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
.. currentmodule:: diff_diff
55

66
.. autoclass:: CallawaySantAnna
7+
:no-members:
78

89

9-
.. automethod:: __init__
10-
1110

1211
.. rubric:: Methods
1312

1413
.. autosummary::
1514

1615
~CallawaySantAnna.__init__
16+
~CallawaySantAnna.diagnose_propensity
1717
~CallawaySantAnna.fit
1818
~CallawaySantAnna.get_params
1919
~CallawaySantAnna.print_summary

docs/api/_autosummary/diff_diff.CallawaySantAnnaResults.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
.. currentmodule:: diff_diff
55

66
.. autoclass:: CallawaySantAnnaResults
7+
:no-members:
78

89

9-
.. automethod:: __init__
10-
1110

1211
.. rubric:: Methods
1312

1413
.. autosummary::
1514

1615
~CallawaySantAnnaResults.__init__
16+
~CallawaySantAnnaResults.epv_summary
1717
~CallawaySantAnnaResults.print_summary
1818
~CallawaySantAnnaResults.summary
1919
~CallawaySantAnnaResults.to_dataframe
@@ -27,16 +27,30 @@
2727
.. autosummary::
2828

2929
~CallawaySantAnnaResults.alpha
30+
~CallawaySantAnnaResults.anticipation
31+
~CallawaySantAnnaResults.att
3032
~CallawaySantAnnaResults.base_period
3133
~CallawaySantAnnaResults.bootstrap_results
3234
~CallawaySantAnnaResults.cband_crit_value
35+
~CallawaySantAnnaResults.coef_var
36+
~CallawaySantAnnaResults.conf_int
3337
~CallawaySantAnnaResults.control_group
38+
~CallawaySantAnnaResults.epv_diagnostics
39+
~CallawaySantAnnaResults.epv_threshold
3440
~CallawaySantAnnaResults.event_study_effects
41+
~CallawaySantAnnaResults.event_study_vcov
42+
~CallawaySantAnnaResults.event_study_vcov_index
3543
~CallawaySantAnnaResults.group_effects
3644
~CallawaySantAnnaResults.influence_functions
3745
~CallawaySantAnnaResults.is_significant
46+
~CallawaySantAnnaResults.p_value
47+
~CallawaySantAnnaResults.panel
48+
~CallawaySantAnnaResults.pscore_fallback
3849
~CallawaySantAnnaResults.pscore_trim
50+
~CallawaySantAnnaResults.se
3951
~CallawaySantAnnaResults.significance_stars
52+
~CallawaySantAnnaResults.survey_metadata
53+
~CallawaySantAnnaResults.t_stat
4054
~CallawaySantAnnaResults.group_time_effects
4155
~CallawaySantAnnaResults.overall_att
4256
~CallawaySantAnnaResults.overall_se
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
diff\_diff.ChaisemartinDHaultfoeuille
2+
=====================================
3+
4+
.. currentmodule:: diff_diff
5+
6+
.. autoclass:: ChaisemartinDHaultfoeuille
7+
:no-members:
8+
9+
10+
11+
.. rubric:: Methods
12+
13+
.. autosummary::
14+
15+
~ChaisemartinDHaultfoeuille.__init__
16+
~ChaisemartinDHaultfoeuille.fit
17+
~ChaisemartinDHaultfoeuille.get_params
18+
~ChaisemartinDHaultfoeuille.set_params
19+
20+
21+
22+
23+
24+
.. rubric:: Attributes
25+
26+
.. autosummary::
27+
28+
~ChaisemartinDHaultfoeuille.n_bootstrap
29+
~ChaisemartinDHaultfoeuille.bootstrap_weights
30+
~ChaisemartinDHaultfoeuille.alpha
31+
~ChaisemartinDHaultfoeuille.seed
32+
33+

0 commit comments

Comments
 (0)