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

Aperta Adatta ai principianti
#255 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
frontend, web-dev

Direzione di ricerca

La formulazione errata deriva dalla riga where in verdictText() in site/check/check-logic.mjs, che per due target mostra « all 2 targets ». Riproducilo chiamando verdictText in Node con targets impostato a 1, 2 e 3. È completato quando il titolo per due target riporta « both targets », la formulazione per un target e per tre o più target resta invariata e node --test tests/site/check-logic.test.mjs passa con nuovi casi per 1, 2 e 3 target, con e senza pacchetti notChecked.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
JavaScript
Stelle
0
Fork
0
Merge medio
1h 37m
PR unite (30g)
134

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wheelgap/tracker

Tutte le issue di wheelgap/tracker

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.