Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fix(cli): output left over from #89 — doctor tables, the describe() format, multi-line errors

Aperta
#94 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

Read the CLI paths for doctor, doctor --config, _say/_ok/_fail, and _reported, then compare Microscope.describe() with the formatting used by smc stage get. Check how smc profiles handles multi-line errors. Done means the listed output and error cases follow the stated rules; run the relevant CLI tests, though none are named in the issue.

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

Descrizione

area: cli priority: p2 type: bug

What happened

These were left over from the review of #89. Each was measured on the PR's build with the demo devices unless stated otherwise.

  • doctor's tables. doctor keeps its Micro-Manager table and its --config table, and both still go through rich markup and wrap at 80 columns when redirected (FM-36, FM-37). smc doctor | cat splits the install path over two lines. A .cfg label such as Laser [488] loses [488] in doctor --config (read from the code). The --config path also runs outside _reported, so a RuntimeError from getXYPosition() prints a traceback.
  • Position format. Microscope.describe(), as printed by smc doctor, shows XY (-0.0, -0.0) µm: one decimal, and -0 is not normalised. smc stage get prints XY (0.00, 0.00) µm. Design §9 says positions have two decimals.
  • Multi-line errors. A HardwareError whose message has several lines prints several lines after its ✗. Examples: No profile named … with its search paths, or an invalid profile with one line per problem. §9 says every error is one line.

What should have happened

  • Every line doctor prints goes through _say/_ok/_fail, and --config errors go through _reported.
  • describe() uses the CLI's position format (two decimals, no -0), or doctor formats the state itself.
  • For multi-line errors, choose one: join the lines as smc profiles does, or keep the list and indent it under the ✗ line.

Questions for the design session

The 2026-09-30 plan on #11 decided these, so they are not bugs. A later revision of §9 should look at them again:

  • ✗ lines go to stdout, so x=$(smc z get) captures an error text as the value. The exit code is still 1.
  • --debug changes the exit codes: a refusal exits 1 instead of 2, and Ctrl-C prints nothing.
  • The interrupted line says "any move under way was stopped" for snap and doctor too, though neither moves anything.

Also: any optional item from the review of #89 that its fix round leaves undone. The ## Review addressed comment on #89 lists them.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
13h 18m
PR unite (30g)
65

Preparare l'ambiente

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 EPFL-TOP/smart-microscope-control

Tutte le issue di EPFL-TOP/smart-microscope-control

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.