Repo checker: a settings-only subfolder pyproject.toml makes the page ask where wheelgap DIR picks the other input

未关闭
#242 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, python
领域
cli, frontend

调研方向

Start with autoPick() in site/check/check-logic.mjs and load() in site/check/worker.mjs, then compare them with _folder_input() and load_directory() in wheelgap's sources.py. The driver must mark settings-only subfolder pyproject.toml files as having nothing to check, and autoPick() must drop those from its candidates. Done when tests/site/check-logic.test.mjs, tests/site/check-page.test.mjs and tests/test_check_driver.py pass for the listed cases.

由索引模型根据 Issue 内容生成。

描述

bug

Since #241, a repo with no input at its root is checked using wheelgap DIR's rules (load_directory() and _nested_inputs() in wheelgap's sources.py on main). One case still differs.

_folder_input() counts a subfolder's pyproject.toml only when it lists [project] dependencies. The page can't tell that without fetching the file, so autoPick() in site/check/check-logic.mjs counts every subfolder pyproject.toml as an input.

Example:

repo layout wheelgap DIR the page
scripts/pyproject.toml (only [tool.ruff]) + backend/uv.lock, nothing at the root checks backend/uv.lock asks between backend/uv.lock and scripts/pyproject.toml

The page asks instead of guessing, so the answer isn't wrong, but it's an extra step that wheelgap DIR doesn't need. With a single candidate, the page already tries the pyproject.toml and moves on when it has nothing to check. With two or more, it asks first.

Suggested fix

  • In load() in site/check/worker.mjs, fetch the subfolder pyproject.toml files that are candidates (up to 3 folders down, a few at a time, with a cap). This only applies when the root has no input.
  • Have the driver say which of them wheelgap FOLDER would read: [project] dependencies that aren't only dependency groups, and something to check. This is like _folder_input().
  • Leave the others out of autoPick()'s candidates.
  • Fetches go to raw.githubusercontent.com only. No package names are sent anywhere.

Done when:

  • tests/site/check-logic.test.mjs: autoPick() picks backend/uv.lock beside a scripts/pyproject.toml the driver marked as having nothing to check. It still asks beside one that lists dependencies, or one whose fetch failed.
  • tests/test_check_driver.py: the driver's answer for a settings-only file, a groups-only file, a [project] with no dependencies, dynamic dependencies, and a file that isn't valid TOML, compared against _folder_input() on wheelgap main.
  • tests/site/check-page.test.mjs: the worker fetches subfolder pyproject.toml files only when the root has no input, and the number of fetches is capped.
  • No extra GitHub API calls: the files are read from raw.githubusercontent.com.
主要语言
JavaScript
星标
0
派生
0
平均合并
1 小时 38 分钟
30 天内合并 PR
132

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wheelgap/tracker 的其他 Issue

查看 wheelgap/tracker 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。