Skip to content

Repo checker: with no input at the root, follow wheelgap DIR into the subfolders instead of picking a file - #241

Merged
patrickballard merged 2 commits into
mainfrom
fix-238-subfolder-pick
Nov 23, 2026
Merged

patrickballard merged 2 commits into
mainfrom
fix-238-subfolder-pick

Conversation

@patrickballard

@patrickballard patrickballard commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #238

When a repo has nothing to check at its root, the page used to check the shallowest file it found in a subfolder by itself, and said nothing about the other files. wheelgap DIR lists the files and asks instead. Now the page follows wheelgap DIR's rules (load_directory() and _nested_inputs() in wheelgap's sources.py on main). They're mirrored in autoPick(), as isSideFile() already is, because the page pins 0.13.0.

Before and after (checked in the browser on today's trees)

repo before (live site) after (this branch, served locally)
huggingface/transformers Root pyproject.toml has no [project], so the page moved on to utils/checkers-requirements.txt and showed "No packages were checked" for it as if it were the project. (Today plan() skips the benchmark and example folders, so the file it fell back to is no longer benchmark_v2/requirements.txt.) Pick the file to check. "huggingface/transformers has no input that wheelgap reads by itself at its root or in a folder up to 3 down, only utils/checkers-requirements.txt. To check one anyway, pick it under "Lockfile" below." "What was read" also says why pyproject.toml wasn't read.
langchain-ai/langchain Checked libs/core/uv.lock by itself: "10 of 154 packages have no wheel for at least one of the 4 targets". Pick the file to check. "…has no lockfile, requirements.txt or pyproject.toml dependencies at its root, but inputs in its subfolders (and maybe more: the page sees only part of this repo's files): libs/core/uv.lock, libs/langchain/uv.lock, … and 13 more."
666ghj/MiroFish (only backend/uv.lock) checked backend/uv.lock Still checks backend/uv.lock. The verdict detail now says so: "No input at the root: checked backend/uv.lock, the only one in a subfolder."

Screenshots aren't attached: they can't be uploaded from the CLI. The texts above are copied from the page.

Rules now

  1. A file in the root, or in the folder a link names: same as before. A link to a file, or a file picked under "Lockfile", is also checked as before.

  2. Requirements files under other names in the root are counted the way _other_requirements() counts them: requirements*.txt and requirements/*.txt. prod-requirements.txt and similar names are not counted. The only one is checked unless it's side-named. With several, the page asks. These now come before the subfolders, as in wheelgap DIR. Before, an exactly-named file anywhere won.

  3. Otherwise, one input per subfolder up to 3 folders down: the folder's first lockfile name, else its pyproject.toml. The folders plan() skips are left out. That one input is checked only when all of these hold:

    • it is the only one;
    • no folder on its path is side-named;
    • the whole file list is known: no truncated tree, plan() didn't cut it at 30, and there's no input that isn't side-named in a folder plan() skips but wheelgap DIR searches (build/, dist/, target/; the new unlisted_inputs);
    • the root isn't a project of its own: no setup.py or setup.cfg, and any root pyproject.toml the page tried was tool settings only;
    • no other requirements file could also be the project's.

    In every other case the page lists the files with chooseFile(), using wheelgap DIR's reason: "but inputs in its subfolders", "Its own dependencies are in setup.py, which wheelgap can't read, so the one input in its subfolders isn't taken for the project's", "more than one file that could hold the project's dependencies", or "the only inputs it has are, by their names, for development, tests, docs or examples".

  4. The step after an unreadable root pyproject.toml follows the same rules. check() in the driver now returns project for a pyproject.toml it couldn't read. This mirrors _unread_project(): [project], [build-system], flit metadata, PDM-legacy dependencies, Poetry dependencies, or not valid TOML. With no such answer, the root is taken for a project.

plan() adds root_project_files, more_lockfiles and unlisted_inputs. When the page asks, chooseFile() now drops the lock= of a file it moved on from. Before this, the URL after the transformers fallback kept lock=pyproject.toml, so a reload showed the read error instead of the chooser.

Design choices (where the issue left room)

  • A root requirements-dev.txt beside one subfolder input now gets the chooser. load_directory() counts it as a rival. This changes one existing autoPick() assertion, for the shape backend/uv.lock + root requirements-dev.txt. Before, the page checked backend/uv.lock. The issue's "existing tests pass unchanged" covers it, so please confirm. Reverting is one line in autoPick() plus that assertion.
  • A root pyproject.toml whose dependencies are all private (Repo checker: fall back from an all-private pyproject.toml #223) is now the project's. Like wheelgap DIR, the page doesn't take a subfolder's lockfile for it. It asks instead of moving on to backend/uv.lock. Two page tests from Repo checker: fall back from an all-private pyproject.toml #223 changed to match.
  • A subfolder pyproject.toml counts as an input whether or not it lists dependencies. The page can't tell before fetching it. This can only make the page ask or try more, never pick where wheelgap DIR asks. For cpython, the page tries Tools/peg_generator/pyproject.toml (tool settings only), moves on, and then asks between the Doc/ files.
  • A subfolder requirements file under another name, or anything deeper than 3 folders, is never checked by itself. wheelgap DIR doesn't read these. The page lists them ("elsewhere") rather than showing "No lockfile found".
  • With no file in the folder a link names, the subfolder rules run from the repo root. They don't run from that folder.
  • Known limit, Repo checker: a settings-only subfolder pyproject.toml makes the page ask where wheelgap DIR picks the other input #242: a settings-only subfolder pyproject.toml beside one other input makes the page ask, where wheelgap DIR picks the other input.

Tests

  • tests/site/check-logic.test.mjs: autoPick() on the shapes from the issue: MiroFish (picked), transformers (choose), langchain (choose), cpython Doc/pylock.toml (choose), and root setup.py + tools/requirements.txt (choose). Also root pyproject.toml states, a cut file list, side folders, rivals beside a subfolder requirements.txt, and deeper files.
  • tests/site/check-page.test.mjs: after the root pyproject.toml fallback, a transformers-shaped repo (both the issue's shape and today's tree) shows the chooser and posts no second check. MiroFish's verdict names the subfolder pick, and langchain asks.
  • tests/test_check_driver.py: the new plan() fields and check()'s project.
  • The new tests fail on main. The whole CI set passes locally.

No CHANGELOG in this repo.

🤖 Generated with Claude Code

patrickballard and others added 2 commits November 23, 2026 20:21
… subfolders instead of picking a file

With nothing to check at the root, the page checked the shallowest lockfile or requirements file it found in a subfolder, on its own (transformers: a utils/ requirements file; langchain: libs/core/uv.lock). wheelgap DIR checks a subfolder's input only when it is the only one, isn't named for development, tests, docs or benchmarks, and the root isn't a project of its own; otherwise it lists them and asks. autoPick() now mirrors those rules (load_directory() and _nested_inputs() on wheelgap main), plan() says whether the root has a setup.py or setup.cfg and whether it cut its list, check() says whether a pyproject.toml it couldn't read describes a project, and the chooser gives the reason in wheelgap DIR's words. Closes #238.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…kipped folders and the chooser's URL

From the second review of #241. The root's requirements files under other names now count as wheelgap's _other_requirements() reads them (requirements*.txt and requirements/*.txt), so prod-requirements.txt or dev-requirements.txt beside backend/uv.lock no longer decides the pick, and backend/docker-requirements.txt is no rival to backend/requirements.txt. plan() names the inputs wheelgap DIR finds in folders it skips (build/, dist/, target/), and autoPick() never takes the one input it lists for the only one beside a non-side one of those. chooseFile() drops the lock= of a file the page moved on from, so a reload or shared link asks again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant