diff --git a/docs/source/business_ch21_scenario_planning_sensitivity_stress.rst b/docs/source/business_ch21_scenario_planning_sensitivity_stress.rst index d60344a..53673ac 100644 --- a/docs/source/business_ch21_scenario_planning_sensitivity_stress.rst +++ b/docs/source/business_ch21_scenario_planning_sensitivity_stress.rst @@ -4,6 +4,9 @@ Business Statistics & Forecasting for Accountants (Track D) Chapter 21 — Scenario planning, sensitivity analysis, and stress testing ------------------------------------------------------------------------ +.. |trackd_run| replace:: d21 +.. include:: _includes/track_d_run_strip.rst + This chapter turns your integrated forecast into a **decision tool**: * **Scenarios**: best/base/worst forecasts tied to explicit driver assumptions. diff --git a/docs/source/business_ch22_financial_statement_analysis_toolkit.rst b/docs/source/business_ch22_financial_statement_analysis_toolkit.rst index 43333bd..891c324 100644 --- a/docs/source/business_ch22_financial_statement_analysis_toolkit.rst +++ b/docs/source/business_ch22_financial_statement_analysis_toolkit.rst @@ -4,6 +4,9 @@ Business Statistics & Forecasting for Accountants (Track D) Chapter 22 — Financial statement analysis toolkit (ratios, trends, variance, common-size) ----------------------------------------------------------------------------------------- +.. |trackd_run| replace:: d22 +.. include:: _includes/track_d_run_strip.rst + This chapter is the "accountant's explainer pack": a small set of repeatable analyses that turn monthly statements into decision support: diff --git a/docs/source/business_ch23_communicating_results_governance.rst b/docs/source/business_ch23_communicating_results_governance.rst index 4c90e66..b6eae6d 100644 --- a/docs/source/business_ch23_communicating_results_governance.rst +++ b/docs/source/business_ch23_communicating_results_governance.rst @@ -1,6 +1,9 @@ Chapter 23 — Communicating results: decision memos, dashboards, and governance ============================================================================== +.. |trackd_run| replace:: d23 +.. include:: _includes/track_d_run_strip.rst + This chapter is the "final mile": turning analysis and forecasts into **decision-ready communication** with an audit trail. diff --git a/tests/test_workbook_track_d_runstrip_ch21_23.py b/tests/test_workbook_track_d_runstrip_ch21_23.py new file mode 100644 index 0000000..db889f9 --- /dev/null +++ b/tests/test_workbook_track_d_runstrip_ch21_23.py @@ -0,0 +1,29 @@ +"""Guardrails for Track D PyPI run strip. + +These Track D chapters are included in the full docs build and should always +include the standard Track D "run strip" so learners can reproduce outputs +from the PyPI-installed workbook. +""" + +from __future__ import annotations + +from pathlib import Path + +import pytest + + +ROOT = Path(__file__).resolve().parents[1] + + +SOURCES = { + "docs/source/business_ch21_scenario_planning_sensitivity_stress.rst": "d21", + "docs/source/business_ch22_financial_statement_analysis_toolkit.rst": "d22", + "docs/source/business_ch23_communicating_results_governance.rst": "d23", +} + + +@pytest.mark.parametrize("rel_path, run_id", SOURCES.items()) +def test_track_d_run_strip_present(rel_path: str, run_id: str) -> None: + text = (ROOT / rel_path).read_text(encoding="utf-8") + assert f".. |trackd_run| replace:: {run_id}" in text + assert ".. include:: _includes/track_d_run_strip.rst" in text