Repository navigation
Description
The checker lists a repo's files by exact name: uv.lock, pylock.toml, poetry.lock, pdm.lock, Pipfile.lock, requirements.txt, requirements.lock, pixi.lock, and pyproject.toml. Many projects keep their requirements under other names, and for those the page has nothing to offer. Paste celery/celery:
wheelgap couldn't read pyproject.toml: pyproject.toml: no [project] table, so there are no dependencies to read
Celery's pyproject.toml holds only tool settings. Its dependencies are in requirements/default.txt (billiard>=4.3.2, kombu>=5.7.0, ...), with more files beside it. The page never sees them: plan() returns pyproject.toml alone for this repo. The same goes for requirements-dev.txt in psf/requests and for requirements/base.txt, local.txt and production.txt in cookiecutter-django's template: none of them is offered in the file picker.
wheelgap itself reads any *.txt as a requirements file, and the checker already looks requirements files up on PyPI and fetches their -r includes. Only the file list is missing them.
Where
plan()insite/check/driver.py:if pp.name in LOCKFILES or pp.name == "pyproject.toml".OFFLINE,LOOKUPSandneeds()in the same file decide by file name which files need lookups.pickLockfile(),withoutUnreadable()andunreadableReason()insite/check/check-logic.mjschoose the file and move on from an unreadablepyproject.toml.
What to do
- In
plan(), also list a file that is clearly a requirements file by its name:requirements*.txt,*-requirements.txtand*_requirements.txt, and a.txtfile directly inside a folder namedrequirements. Notconstraints*.txt, and nothing in the folders_skipped_folder()already leaves out. - Order: a folder's exactly-named files first, as today. Then the new ones, runtime names before the rest:
default,base,main,prod,production,requirements, then alphabetical. So an automatic pick lands on what the project installs, not ondocs.txt. - These files need lookups: make sure
needs()andcheck()treat them as they treatrequirements.txt(today they test the name againstOFFLINE; check every place that usesLOOKUPS). - The automatic pick is unchanged when the repo has an exactly-named file that can be read. When the pick is a
pyproject.tomlthat can't be (celery),withoutUnreadable()moves on to the next file, which is now there. - All listed files show in the "Lockfile" picker, within
MAX_LOCKFILES.
Done when:
-
tests/test_check_driver.py:plan()on a path list like celery's returnspyproject.tomland thenrequirements/default.txtbeforerequirements/docs.txt;constraints.txtand files undertests/are not listed; a repo with a rootrequirements.txtstill gets it first. -
tests/test_check_driver.py:needs()andcheck()readrequirements/base.txtwith a-rinclude, as they readrequirements.txt. -
tests/test_check_parity.pyhas a case for one of the new names, so the page's answer still matchesuvx wheelgap. -
tests/site/check-logic.test.mjs: an auto-pickedpyproject.tomlwith no[project]table moves on torequirements/default.txt. - In the PR:
celery/celerybefore and after, as screenshots.
Activity
Repo checker: list requirements files under other names and ask which…