Repository navigation
wheelgap DIR: name the requirements files beside the pyproject.toml it checks - #662
Merged
Merged
Conversation
… pyproject.toml's ranges #656 made wheelgap DIR read the root pyproject.toml before any requirements file under another name. In HKUDS/Vibe-Trading (requirements-lock.txt, uv pip compile with hashes) and apache/superset (requirements/base.txt, uv pip compile) that checked the ranges at their newest releases instead of what gets installed, and the note said there was no lockfile or requirements.txt. Now the one compiled (header, # via or --hash) and fully pinned (every package == or ===) file under another name is read instead, with a note saying why; several are listed with pyproject.toml (exit 2). Other files leave pyproject.toml first, and the note names them. requirements*.lock at the root counts as a requirements file under another name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…662) The entry for the PR, now that it has a number. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review found that preferring a compiled, pinned requirements file over pyproject.toml reads the wrong file on real projects (flask's and werkzeug's requirements/build.txt, lone requirements-cuda.txt or requirements/documentation.txt), so directory mode goes back to main's choice. The note that names the other files follows in the next commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t checks
When directory mode checks the root pyproject.toml, the note now says its direct dependencies were checked and names the root's requirements files under other names as commands (the first 3, then a count), those that look like pip-compile / uv pip compile / uv export output with every package pinned first ('requirements-lock.txt looks compiled and pinned: wheelgap ... checks what it pins'). Before, Vibe-Trading's note said 'no lockfile or requirements.txt' beside a requirements-lock.txt. The look is a hint only: which file is read is main's. --json's directory_inputs gets other_requirements with a compiled flag, in the schema and docs/output.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s-pinned-requirements # Conflicts: # CHANGELOG.md
…dencies a pyproject.toml lacks Review found that the compiled-file hint opened every requirements file beside pyproject.toml and followed its -r/-c, so a -r /dev/zero ran out of memory and a FIFO include hung, all for a hint; and that the note said direct dependencies were checked when the pyproject.toml listed none. The hint now skips files over 2 MB and any file with -r/-c, and the note says pyproject.toml was checked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
When
wheelgap DIRhas no root lockfile orrequirements.txt, it checks the rootpyproject.toml(#656). It went on doing that beside a compiled requirements file without saying a word about it. HKUDS/Vibe-Trading's note saidno lockfile or requirements.txt in <repo>while arequirements-lock.txt(uv pip compile --generate-hashes) sat right there, and apache/superset hasrequirements/base.txt.Which file is read doesn't change. An earlier version of this PR read a compiled, pinned file in place of
pyproject.toml. Review showed that picks the wrong file on real projects: flask's and werkzeug'srequirements/build.txtpin only the build tools, and a lonerequirements-cuda.txt,requirements-py38.txtorrequirements/documentation.txtis not what the project installs. So this PR now only says what else is there.What changes
no lockfile and no file named requirements.txt in DIR, so DIR/pyproject.toml's direct dependencies were checked.requirements*.lock, which is named but never read. It shows the first 3 and then a count. Those that look compiled and pinned come first, one line each:pip-compileoruvheader,# viacomments, or--hash) and every index package it lists is pinned with==or===. It is a hint only and is never used to choose.--json: eachdirectory_inputsentry getsother_requirements, a list of{"file", "compiled"}, filled for the reasonpyprojectand[]otherwise. The schema anddocs/output.mdare updated.Corpus
I ran
sources.load_directoryon all 382 corpus folders (300 fetched plus 82 rebuilt trees infulltree_after/), with main and with this branch. 0 folders change which file is read. 5pyproject.tomlpicks now name other files:Verification
Ran: the full suite, ruff, ruff format and mypy.
New tests in
tests/test_directory.py:requirements/build.txt(pip-compile-multi):pyproject.tomlis still read andbuild.txtis named;xpu.txt, marked but unpinned, unreadable, and a junk JSONrequirements-foo.lock;requirements*.lockis never read and never competes with other inputs.I ran the new tests against main's source: every one fails there except the guard.
Read: the pip-compile and uv headers as they appear in the corpus files.
🤖 Generated with Claude Code