Skip to content

Generate llms output in one Sphinx build - #136

Merged
timkpaine merged 1 commit into
mainfrom
agent/generate-llms-in-one-build
Aug 6, 2026
Merged

Generate llms output in one Sphinx build#136
timkpaine merged 1 commit into
mainfrom
agent/generate-llms-in-one-build

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Generate llms.txt output from Yardang's Sphinx extension during the existing HTML build instead of launching a second Sphinx process. The extension renders reachable resolved doctrees as Markdown, rewrites internal links to .html.md, and writes llms.txt plus optional llms-full.txt after a successful build.

Promote sphinx-markdown-builder to a core dependency and remove the now-obsolete llms extra. Its only additional runtime dependency beyond Sphinx and Docutils is tabulate. Keep the explicit yardang-llms builder available for direct Sphinx use.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (if applicable)

Focused llms tests pass, 81 unaffected tests pass, package metadata validation passes, and an isolated project docs build produces HTML and all llms outputs. Local root make test could not complete because an unrelated untracked base/ symlink was discovered as 9,220 Sphinx sources; CI runs from a clean checkout.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine marked this pull request as ready for review August 6, 2026 15:49
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Test Results

83 tests  ±0   83 ✅ ±0   24s ⏱️ -13s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 84c7c24. ± Comparison against base commit 290e83d.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
yardang.tests.test_llms ‑ test_build_generates_llms_outputs
yardang.tests.test_llms ‑ test_build_generates_llms_outputs_in_one_sphinx_process

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.90141% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.65%. Comparing base (290e83d) to head (84c7c24).

Files with missing lines Patch % Lines
yardang/sphinx/llms.py 0.00% 117 Missing ⚠️
yardang/cli.py 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
- Coverage   83.48%   80.65%   -2.84%     
==========================================
  Files          15       15              
  Lines        1823     1892      +69     
  Branches      197      203       +6     
==========================================
+ Hits         1522     1526       +4     
- Misses        250      315      +65     
  Partials       51       51              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timkpaine
timkpaine merged commit d3ee38f into main Aug 6, 2026
2 of 9 checks passed
@timkpaine
timkpaine deleted the agent/generate-llms-in-one-build branch August 6, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant