List files with their metadata in one call

オープン
#57 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
pandas, python
領域
data

調査の方向性

Start by reading the client.datasets.list and watch implementations and the DatasetSource.list and watch methods; the issue does not name their file locations or tests. Check how dataset refs and metadata are returned, then see how the existing SANS example notebook uses them. Done means listings can include the requested metadata fields in each flat result while metadata(ref) remains available.

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

説明

client.files.list(selector) returns only file refs. Any listing that shows metadata, such as a form that lists sample runs with their titles, then reads each file's metadata with one call per file:

refs = client.files.list(Selector(role='sample'))
runs = [client.files.metadata(r)['run'] for r in refs]   # one call per file, full metadata each time

In-process this costs nothing. On the service each call is a round trip, and each returns the full metadata when the caller needs one field. Found while walking through a SANS example notebook.

Proposal. list and watch return, for each file, a flat dict of its ref and the metadata fields the caller names:

client.files.list(Selector(role='sample'), fields=('run', 'title'))
# [{'ref': FileRef(...), 'run': 60339, 'title': '...'}, ...]
  • Without fields, each entry holds the full metadata.
  • A flat dict goes straight into pd.DataFrame(...) or a GUI table, and the ref column feeds rows of a request.
  • metadata(ref) stays, for reading one file.
  • FileSource.list and watch change the same way, so a source backed by a catalogue such as SciCat can answer from its search result without further queries.

🤖 Generated with Claude Code

主要言語
Python
スター
0
フォーク
1
平均マージ
9時間 23分
マージ済み PR(30日)
65

環境構築

はじめの一歩

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

scipp/essapps のほかの issue

scipp/essapps の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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