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

odc-cli instruments list --kind rejects FILE and SERIES

Aperta Adatta ai principianti
#1,783 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à
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, typescript
Ambito
cli

Direzione di ricerca

Leggi cli/odc-cli intorno alla riga 601 e confronta le opzioni di --kind con l’unione InstrumentKind in packages/runtime-core/src/types/instrument.base.ts. Aggiorna le opzioni della CLI e rimuovi o sostituisci l’esempio di deriva in cli/AGENTS.md. Verifica sia FILE che SERIES con un’istanza demo che inizializza questi tipi di strumento.

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

Descrizione

Area: Infrastructure Bug Difficulty: Low Good First Issue Priority: Low

odc-cli instruments list --kind rejects FILE and SERIES, so an administrator cannot list file or series instruments by kind. The argparse option hard-codes choices=('FORM', 'INTERACTIVE'), but InstrumentKind has four members, and GET /v1/instruments/list?kind= accepts any of them. argparse exits before a request is sent. cli/AGENTS.md already notes the drift as an example of how this hand-written client goes stale. This issue tracks fixing it.

Where

cli/odc-cli:601:

get_parser.add_argument('--kind', choices=('FORM', 'INTERACTIVE'), help='filter instruments by kind')

packages/runtime-core/src/types/instrument.base.ts:13:

type InstrumentKind = 'FILE' | 'FORM' | 'INTERACTIVE' | 'SERIES';

Reproduce

  1. Log in with odc-cli auth login.
  2. Run odc-cli instruments list --kind SERIES.

Actual: error: argument --kind: invalid choice: 'SERIES' (choose from 'FORM', 'INTERACTIVE'), with exit status 2 and no request sent. The same happens for FILE.
Expected: the CLI calls GET /v1/instruments/list?kind=SERIES and prints the series instruments.

Tests

cli/ has no test harness (cli/AGENTS.md). Verify the fix by running instruments list --kind FILE and --kind SERIES against a demo instance, which seeds both kinds.

Suggested fix

Change the choices to ('FILE', 'FORM', 'INTERACTIVE', 'SERIES') in the order of the InstrumentKind union. Then remove the drift example from cli/AGENTS.md, or replace it, in the same commit.

Lingua principale
TypeScript
Stelle
119
Fork
19
Merge medio
1g 2h
PR unite (30g)
56

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 DouglasNeuroInformatics/OpenDataCapture

Tutte le issue di DouglasNeuroInformatics/OpenDataCapture

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.