Repo checker: a clean result on two targets says "a wheel for all 2 targets"

Open Beginner friendly
#255 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js
Domain
frontend, web-dev

Research direction

The bad wording comes from the where line in verdictText() in site/check/check-logic.mjs, which gives "all 2 targets" for two targets. Reproduce it by calling verdictText in Node with targets set to 1, 2 and 3. Done when the two-target headline reads "both targets", the one-target and three-plus wording is unchanged, and node --test tests/site/check-logic.test.mjs passes with new cases for 1, 2 and 3 targets, with and without notChecked packages.

Written by the indexing model from the issue text.

Description

bug good first issue

A clean result on two targets gets the headline "All 3 packages have a wheel for all 2 targets". Read from verdictText() in site/check/check-logic.mjs on main and run in Node:

verdictText({packages: 3, gaps: 0, unknown: 0, targets: 2})  ->  "✓ All 3 packages have a wheel for all 2 targets"
verdictText({packages: 3, gaps: 0, unknown: 0, targets: 5})  ->  "✓ All 3 packages have a wheel for all 5 targets"

"all 2" isn't how anyone says it; "both targets" is. Two targets is a common pick (Linux x86_64 and Linux ARM64, say), so this is the headline many visitors see first. The gaps headline for two targets ("at least one of the 2 targets") reads fine and isn't part of this.

Where

verdictText() in site/check/check-logic.mjs: const where = h.targets === 1 ? "this target" : \all ${h.targets} targets`;`

What to do

  • Make where "both targets" for 2, keep "this target" for 1 and "all N targets" for 3 or more.
  • Check whether any other text built from the same count says "all 2" (shareText() says "2 platforms", which is fine) and fix it the same way if so.

Done when

  • Tests in tests/site/check-logic.test.mjs for 1, 2 and 3 targets, with and without packages left unchecked (notChecked). The 2-target ones fail on main.
  • node --test tests/site/check-logic.test.mjs passes. The tests need no network.
Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
1h 37m
Merged PRs (30d)
134

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wheelgap/tracker

All issues in wheelgap/tracker

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.