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

Đang mở
#242 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, python
Lĩnh vực
cli, frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
JavaScript
Star
0
Fork
0
Merge trung bình
1 giờ 38 phút
Pull request đã merge (30 ngày)
132

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wheelgap/tracker

Tất cả issue của wheelgap/tracker

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.