Skip to content

docs: fix RST in Model.debug docstring numbered list#8281

Merged
ricardoV94 merged 1 commit into
pymc-devs:mainfrom
anevolbap:docs/fix-debug-docstring-rst
May 8, 2026
Merged

docs: fix RST in Model.debug docstring numbered list#8281
ricardoV94 merged 1 commit into
pymc-devs:mainfrom
anevolbap:docs/fix-debug-docstring-rst

Conversation

@anevolbap
Copy link
Copy Markdown
Contributor

@anevolbap anevolbap commented May 7, 2026

Description

The numbered list in the Model.debug docstring uses a single leading space on each item, with no blank line separating it from the preceding paragraph. Sphinx/docutils reads that single-space indent as the start of an indented block and emits WARNING: Unexpected indentation. [docutils].

This was caught while working on the CausalPy repo: building the CausalPy docs surfaces this warning multiple times because the build pulls in the pymc.Model autodoc reference.

This PR adds a blank line before the list and removes the single-space indent so docutils parses it as a proper enumerated list.

Before:

When an evaluation fails or produces a non-finite value we print:
 1. The graph of the parameters
 2. The value of the parameters (if those can be evaluated)
 3. The output of `fn` (if it can be evaluated)

After:

When an evaluation fails or produces a non-finite value we print:

1. The graph of the parameters
2. The value of the parameters (if those can be evaluated)
3. The output of `fn` (if it can be evaluated)

Related Issue

None.

Checklist

  • Checked that the pre-commit linting/style checks pass
  • Included tests that prove the fix is effective or that the new feature works
  • Added necessary documentation (docstrings and/or example notebooks)

Tests are not applicable: this is a docstring RST formatting fix, no behavior change.

Type of change

  • Documentation

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 pymc | 🛠️ Build #32582291 | 📁 Comparing 52bfa53 against latest (151672a)

  🔍 Preview build  

3 files changed
± glossary.html
± _modules/pymc/model/core.html
± api/model/generated/classmethods/pymc.model.core.Model.debug.html

Copy link
Copy Markdown
Contributor

@williambdean williambdean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.93%. Comparing base (ca5180d) to head (52bfa53).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8281      +/-   ##
==========================================
+ Coverage   88.64%   91.93%   +3.29%     
==========================================
  Files         125      125              
  Lines       20302    20302              
==========================================
+ Hits        17997    18665     +668     
+ Misses       2305     1637     -668     
Files with missing lines Coverage Δ
pymc/model/core.py 93.47% <ø> (ø)

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ricardoV94 ricardoV94 merged commit 9491f60 into pymc-devs:main May 8, 2026
42 checks passed
@welcome
Copy link
Copy Markdown

welcome Bot commented May 8, 2026

Congratulations Banner]
Congrats on merging your first pull request! 🎉 We here at PyMC are proud of you! 💖 Thank you so much for your contribution 🎁

@ricardoV94 ricardoV94 added the docs label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants