odc-cli instruments list --kind rejects FILE and SERIES
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
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
- Log in with
odc-cli auth login. - 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
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DouglasNeuroInformatics/OpenDataCapture
-
Area: Playground Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DouglasNeuroInformatics/OpenDataCapture#1805 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DouglasNeuroInformatics/OpenDataCapture#1801 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DouglasNeuroInformatics/OpenDataCapture#1800 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
DouglasNeuroInformatics/OpenDataCapture#1799 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Performance Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
DouglasNeuroInformatics/OpenDataCapture#1795 ·
Maintainers usually reply within 1 day
All issues in DouglasNeuroInformatics/OpenDataCapture
Similar issues
-
[bug] diagnostics.dumpBody:Buffer 形态请求(透传 lane)跳过 dumps/ 落盘,仅留 raw/-unknown-Possibly taken @ranxianglei claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ranxianglei/billion-context#2421 · 2 comments ·
Maintainers usually reply within 1 day
-
pending triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nuxt/test-utils#1842 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-code#4146 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
farbenmeer/tapi#531 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day