Repository navigation
feat(check): discover and prioritize additional requirements*.txt files in plan() - #229
Merged
patrickballard merged 5 commits intoNov 22, 2026
Conversation
…es in plan() Closes wheelgap#218
Contributor
|
Thanks, @dev-burnern! Pulling the sort into It looks good overall. #218 is a (Review assisted by Claude.) |
…s name plan() ranked them by how runtime-like a name sounds (default, base, prod first), so celery's check silently landed on requirements/default.txt, and a root requirements-dev.txt outranked a backend/uv.lock the page picked before. wheelgap never picks one of several requirements files by name (wheelgap DIR lists them; #662 there keeps it a hint). Now they're marked other and come after every exactly-named file, so the page's pick is unchanged wherever one exists; a lone one is checked; with several, autoPick() picks none and the page asks which one, with the file picker. They're matched case-sensitively and without README.txt-like names, as wheelgap reads them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p instead of failing With no file picked, runCheck() looked up the plan entry for a null path and threw on lock.offline when a platform or Python chip was clicked in the chooser. It now redraws the setup with the new selection and waits for a file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…offered, not checked autoPick() checked a lone requirements file under another name whatever its name, so requirements-dev.txt or requirements/test.txt was answered as if it held the project's dependencies. wheelgap DIR on main never checks such a file on its own (_is_side, _SIDE_WORDS in src/wheelgap/sources.py; the word list is copied from there). Now the page offers it with the chooser, which shows its picker even for one file, with wording for that case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolved with wheelgap#226 and wheelgap#223 as the second review set out. plan() entries are {path, offline: _reads_offline(p)} with other: True for requirements files under other names. pickRequestedFile()'s own pick (no file named, or one that can't be checked) is now autoPick()'s and passes its choose through; a named or added file has choose null. onLoaded() takes wheelgap#226's picked/lockfiles/fileNotice, shows noLockfile only with neither a lock nor a choice, sets the targets, then asks with chooseFile(), which shows the fallback notice. renderSetup keeps the Choose a file option and clears fileNotice on change. The badge default is autoPick() over the files a link didn't add. wheelgap#223's private-pyproject folder filter runs before autoPick(), so covered other-named files are never offered or checked. Tests: both sides kept, harnesses given pickRequestedFile and privatePyprojectReason, pickRequestedFile results now carry choose, and new cases for these interactions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
patrickballard
added a commit
to dev-burnern/tracker
that referenced
this pull request
Nov 22, 2026
Resolved with wheelgap#226 and wheelgap#229 as the second review set out. The page state and onLoaded() take both fileInTree and projectName, and the worker returns both; onLoaded() keeps wheelgap#226's picked/fileNotice and wheelgap#229's chooser, with the targets set before the no-lockfile answer. noLockfile() puts wheelgap#226's notice first on wheelgap#228's text, without the Run uvx wheelgap sentence; showPackageFallback() shows the notice first in #alerts; onResult()'s error branch keeps wheelgap#226's notice in the status, then the package fallback. The worker reads the project name with metadataFiles() over the files that aren't wheelgap#229's other-named requirements files. chooseFile() also offers the --deps command when the repo names its package. Tests: both sides kept; wheelgap#228's harnesses given pickRequestedFile, privatePyprojectReason, autoPick and chooseFile; its status assertion matches main's capitalised Wheelgap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
patrickballard
added a commit
to dev-burnern/tracker
that referenced
this pull request
Nov 22, 2026
…, then --deps wheelgap#229's test matched the one-line alerts call that the merge's --deps addition split in two, so it failed although the notice still comes first. It now runs chooseFile() on stand-ins: a named-file notice is the first alert, the package's --deps command the second, and neither shows when there's nothing to say. Every other source-matching assertion in check-page.test.mjs was checked against the merged check.mjs, worker.mjs and index.html. Co-Authored-By: Claude Opus 5.5 <[email protected]>
patrickballard
added a commit
that referenced
this pull request
Nov 22, 2026
…toml names a PyPI package (#228) * feat(check): offer wheelgap --deps command when setup.cfg or pyproject.toml names a PyPI package Closes #221 * Package fallback: read setup.cfg beside a build-system-only pyproject.toml, and parse names as configparser and TOML do A lone root pyproject.toml with only [build-system] (the usual setuptools layout) was the only file read for the name, so the setup.cfg's [metadata] name was never offered and the visit ended in "no [project] table", the #221 dead end. metadataFiles() now tries the pyproject.toml, then setup.cfg. The name reader also no longer takes a value continued on an indented line, a [METADATA] section, or a name under a [[tool.uv.index]] or commented header as the project's. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Package fallback: refuse continued names and multi-line strings; use this repo's targets setup.cfg: a deeper-indented line after name = httpie continues the value (configparser reads httpie\nevil), blank or comment lines in between or not; that's no plain name now. pyproject.toml: a multi-line string isn't tracked, so a name = line inside one was read as [project]'s; any triple-quoted string before the name now gives null. And onLoaded() set the Pythons and platforms only after the no-lockfile return, so the --deps command used the previous repo's; they're set first now. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Chooser test: check chooseFile()'s alerts by running it, notice first, then --deps #229's test matched the one-line alerts call that the merge's --deps addition split in two, so it failed although the notice still comes first. It now runs chooseFile() on stand-ins: a named-file notice is the first alert, the package's --deps command the second, and neither shows when there's nothing to say. Every other source-matching assertion in check-page.test.mjs was checked against the merged check.mjs, worker.mjs and index.html. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Patrick Ballard <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
patrickballard
added a commit
to dev-burnern/tracker
that referenced
this pull request
Nov 22, 2026
Resolved as the second review set out. renderVerdict() sets isClean, toggles the card, hides the README badge offer unless the result is clean with no private-index packages, then uses wheelgap#223's verdict ternary (private pyproject, every Python left out, verdictText). renderNext() keeps wheelgap#225's Keep it green condition (r.private empty) with main's badge default from wheelgap#226/wheelgap#229 untouched. The copy-share handler, with the private count that drops the ✓, sits beside main's copy-prompt handler, which passes state.lab (wheelgap#231). Imports are the union, with shareText. Tests: both sides kept; wheelgap#225's renderVerdict/renderNext harness given autoPick and privatePyprojectReason. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Merged, thanks @dev-burnern! We pushed a few fixes to your branch before merging; the commits say what and why. (Posted with help from Claude.) |
This was referenced Nov 23, 2026
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.
Closes #218
What this changes
site/check/driver.py:_is_extra_requirements(pp)soplan()also discovers clearly named requirements files:requirements*.txt,*-requirements.txt,*_requirements.txt, and*.txtdirectly inside arequirements/folder (excludingconstraints*.txtand skipped folders such astests/).plan()'s sort key (_lockfile_sort_key()) to keep each folder's exact-named lockfiles andpyproject.tomlfirst as today, followed by the extra requirements files ordered with runtime stems (default,base,main,prod,production,requirements) before alphabetical names so automatic fallback lands onrequirements/default.txtrather thanrequirements/docs.txt.offline: False, soneeds()andcheck()look them up on PyPI and follow-r/-cincludes just likerequirements.txt.tests/test_check_driver.py,tests/test_check_parity.py, &tests/site/check-logic.test.mjs:plan()on a Celery-like tree (pyproject.toml,requirements/default.txt,requirements/docs.txt,constraints.txt,tests/requirements.txt,requirements-dev.txt,prod-requirements.txt, and rootrequirements.txtfirst).needs()andcheck()onrequirements/base.txtwith a-r common.txtinclude.requirements-dev.txttotest_check_parity.py'sLOOKED_UPsuite to verify CLI parity.check-logic.test.mjsthat an auto-pickedpyproject.tomlwith no[project]table moves on torequirements/default.txt.AI tools used (if any): Antigravity (Gemini)
Checklist
pytest tests/test_check_driver.py tests/test_check_parity.pypasses for all new & parity testsnode --test tests/site/check-logic.test.mjspasses (24/24)