Title: Add check-list-referenced hook to keep README tool commands in sync by Copilot · Pull Request #1722 · usethis-python/usethis-python · GitHub
Open Graph Title: Add check-list-referenced hook to keep README tool commands in sync by Copilot · Pull Request #1722 · usethis-python/usethis-python
X Title: Add check-list-referenced hook to keep README tool commands in sync by Copilot · Pull Request #1722 · usethis-python/usethis-python
Description: After #1639 where an agent failed to update docs when adding a new command, this adds a pre-commit hook that verifies all entries in ALL_TOOL_COMMANDS are referenced in the README. If a developer adds a tool to the registry but forgets to document it, CI catches it. New hook: hooks/check-list-referenced.py Generic, reusable hook that: Imports a Python list constant via a dotted module path using importlib (e.g. pkg.mod.VAR_NAME) Checks each string item appears in a target file Contains no project-specific words (passes check-banned-words) New derived constant: ALL_TOOL_COMMAND_STRS Added in src/usethis/_ui/interface/tool.py, this constant derives the full prefixed command strings (e.g. "usethis tool ruff") from ALL_TOOL_COMMANDS, so the hook can check them directly without needing a pattern argument. Registration in .pre-commit-config.yaml - id: check-list-referenced entry: uv run --frozen --offline hooks/check-list-referenced.py args: - "--variable=usethis._ui.interface.tool.ALL_TOOL_COMMAND_STRS" - "--target-file=README.md" Failure output when a tool is missing from the README: ERROR: The following items from 'usethis._ui.interface.tool.ALL_TOOL_COMMAND_STRS' are not referenced in README.md: - 'usethis tool new-tool'
Open Graph Description: After #1639 where an agent failed to update docs when adding a new command, this adds a pre-commit hook that verifies all entries in ALL_TOOL_COMMANDS are referenced in the README. If a developer a...
X Description: After #1639 where an agent failed to update docs when adding a new command, this adds a pre-commit hook that verifies all entries in ALL_TOOL_COMMANDS are referenced in the README. If a developer a...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1722
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a05d04fc-f300-ffc6-cb82-ccb648d3ff87 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8548:34DA5A:4ECDA80:6FF26FE:6A4FEBEF |
| html-safe-nonce | ba2f15a6623b5187bce3157feb95ae8ad83817e77ddb4424552d8469ab533d8e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTQ4OjM0REE1QTo0RUNEQTgwOjZGRjI2RkU6NkE0RkVCRUYiLCJ2aXNpdG9yX2lkIjoiNTA1MjQwNjUwNDM3NzgwNTgwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 089789c5b64d44963be7e3171da1068ce2358f8a7684cde1b6dfbc030313c63a |
| hovercard-subject-tag | pull_request:3476734573 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1722/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | After #1639 where an agent failed to update docs when adding a new command, this adds a pre-commit hook that verifies all entries in ALL_TOOL_COMMANDS are referenced in the README. If a developer a... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f7e270be010aa4de2871991025fbb97f3afe2bcb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width