Skip to content

docs(clv): align MAP vs MCMC comparison in quickstart (#2575) #230

docs(clv): align MAP vs MCMC comparison in quickstart (#2575)

docs(clv): align MAP vs MCMC comparison in quickstart (#2575) #230

Workflow file for this run

# Docs build: any new sphinx/myst/numpydoc warning fails this job.
#
# History: #1210 tracked a backlog of ~900 warnings; the cleanup landed in
# this PR. Going forward, any new warning is a regression and blocks the
# merge. The same gate is enforced on RTD via sphinx.fail_on_warning: true
# in .readthedocs.yaml.
name: Docs
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
should_build: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
docs:
- ".github/workflows/docs.yml"
- "pyproject.toml"
- "docs/**"
- "pymc_marketing/**"
- "scripts/generate_gallery.py"
build:
needs: changes
if: ${{ needs.changes.outputs.should_build == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install package and docs dependencies
run: |
sudo apt-get install graphviz graphviz-dev
pip install -e .[docs]
pip list
- name: Generate gallery thumbnails
# Mirrors what RTD runs in its pre_build step (see .readthedocs.yaml).
run: python scripts/generate_gallery.py
- name: Build HTML
# -W: turn warnings into errors. --keep-going: collect every warning
# before failing, so the job summary shows the full list (not just
# the first).
run: |
sphinx-build docs/source docs/build -b html -W --keep-going \
2> docs_warnings.log
- name: Report warning count
if: always()
run: |
warnings=$(grep -cE 'WARNING|ERROR' docs_warnings.log || echo 0)
{
echo "## Docs build"
echo ""
echo "Warnings/errors: **${warnings}**"
echo ""
echo "<details><summary>First 50 entries</summary>"
echo ""
echo '```'
grep -E 'WARNING|ERROR' docs_warnings.log | head -50 || true
echo '```'
echo "</details>"
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload warning log
if: always()
uses: actions/upload-artifact@v7
with:
name: docs-warnings
path: docs_warnings.log