FileSource is usable without a backend

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
8/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

This is design work, not a first task: the issue leaves open which package holds the FileSource protocol, Selector and file(), and how to build a file model from a resolved identity and local path. Start by reading the FileSource protocol in ess.apps.files and FileRef in ess.spec, then the testing.FakeFiles implementation. Done means an agreed design and an ADR 0007 decision, not a patch.

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

説明

FileSource (ess.apps.files) is in ess.apps because the backend is its only user today, not because it needs the backend. Its protocol (resolve, path, metadata, list, watch) depends only on FileRef from ess.spec, Selector, and pathlib.

A notebook or script that uses specs and bindings without a backend should be able to use a file source directly: run numbers in a local folder, files downloaded with Scitacean, SciCat with /ess/data, or watch for new runs. The same object is then what it passes to local(files=...):

files = ...                                   # a file source: a folder, Scitacean, SciCat
ref = files.resolve(file(run=60339))
params = IofQParams(sample=Sample.local(files.path(ref)), ...)
outputs = iofq.compute(params)

client = local(proposal='p1', files=files, bind=[iofq])

What the backend adds on top stays in the backend: resolving files at submission, so the record holds their identity; the access check against metadata['proposal']; and each client's view, client.files.

Open:

  • Which package holds the protocol, Selector, and file(): ess.spec or another one (ADR 0007). Implementations (folder, Scitacean, SciCat) need dependencies only some users install.
  • Sample.local(path) names the file path:<path>, so in the example above the params lose that the file is run 60339. Use without a backend needs a way to make a file model from a resolved identity and its local path.
  • The only implementation today is testing.FakeFiles.
主要言語
Python
スター
0
フォーク
1
平均マージ
9時間 40分
マージ済み PR(30日)
60

環境構築

はじめの一歩

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

scipp/essapps のほかの issue

scipp/essapps の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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