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

オープン
#242 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
132

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wheelgap/tracker のほかの issue

wheelgap/tracker の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。