Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#1,783 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, typescript
領域
cli

調査の方向性

cli/odc-cliの601行目付近を読み、--kindの選択肢をpackages/runtime-core/src/types/instrument.base.tsのInstrumentKindユニオンと比較してください。CLIの選択肢を更新し、cli/AGENTS.mdの乖離の例を削除するか置き換えてください。これらのinstrument kindをシードするデモインスタンスで、FILEとSERIESの両方を検証してください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
119
フォーク
19
平均マージ
1日 2時間
マージ済み PR(30日)
56

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DouglasNeuroInformatics/OpenDataCapture のほかの issue

DouglasNeuroInformatics/OpenDataCapture の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。