Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#1,783 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, typescript
Domain
cli

Research direction

Read cli/odc-cli around line 601 and compare its --kind choices with the InstrumentKind union in packages/runtime-core/src/types/instrument.base.ts. Update the CLI choices and remove or replace the drift example in cli/AGENTS.md. Verify both FILE and SERIES against a demo instance, which seeds those instrument kinds.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
119
Forks
19
Avg merge
1d 2h
Merged PRs (30d)
56

Getting set up

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

All issues in DouglasNeuroInformatics/OpenDataCapture

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.