Repository navigation
Add auto-updating README stats (project count + Lean LOC) - #193
Merged
Merged
Conversation
Adds `lean_pool.stats`, which derives the number of pooled projects (from LeanPool/projects.yml) and total lines of Lean (from the LeanPool/ tree) and rewrites a marked block in README.md. A new `readme-stats.yml` workflow refreshes and commits the block on pushes to main that touch Lean source, the stats module, or the workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Surfaces two headline numbers in the main
README.mdand keeps them current automatically:projectslist inLeanPool/projects.ymlwc -l-equivalent total acrossLeanPool/**/*.lean(build/dependency dirs excluded)They render in a marked block right under the intro:
How
python/lean_pool/stats.py— computes the stats and rewrites the marked block (mirrors the existingrender.pymarker idiom andquality.pyCLI style). Supports--check(fail-if-stale, no write) and--repo..github/workflows/readme-stats.yml— on pushes tomainthat touchLeanPool/**,python/lean_pool/stats.py, or the workflow itself, regenerates the block and commits it back. The refresh commit touches onlyREADME.md, which is not in thepaths:filter, so it can't re-trigger itself (no commit loop). Also runnable manually viaworkflow_dispatch.python/tests/test_stats.py— unit tests for counting, block replacement, idempotence, and--check.Notes
LeanPool/content and no gates.🤖 Generated with Claude Code