Should the serialized params schema name the kinds of reference?

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python

調査の方向性

Read SerializedWorkflowSpec.params_schema, the pydantic models that generate the form, and the backend field_types.fits logic. The form-generator spike is a prerequisite; this issue leaves two schema designs and output matching behavior undecided. Done means those questions have a decision and the schema and service behavior reflect it.

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

説明

In SerializedWorkflowSpec.params_schema, each place that takes a reference to an output lists the kinds of reference by name:

"beam_centre": {"anyOf": [{"$ref": "#/$defs/BeamCentre", "not": {"required": ["@ref"]}},
                          {"anyOf": [{"$ref": "#/$defs/OutputRef"}, {"$ref": "#/$defs/AccumulatorRef"}],
                           "dataType": "BeamCentre"}]}

So every spec's schema contains framework concepts (records, accumulators). A UI generated from the schema offers an accumulator picker even if the app has no accumulators. Adding a kind of reference would change the schema of every spec.

Alternative. The spec says only "data of type X, by reference": one generic reference form with dataType. The framework decides which kinds of reference can supply that data. Counterpoint: the schema also validates request JSON, which holds concrete @ref objects. A generic {"@ref": <kind>, ...} form could still do that job, but it would validate less strictly.

Related: matching outputs to places by name. dataType is the bare class name (field_types.type_name). The backend uses field_types.fits, which accepts a subclass of the class at the place. Matching on the dataType string cannot see subclass fits, and two packages that each define a Sample get the same name. A UI without the workflow package could ask the backend which records have outputs that fit a place, instead of comparing names. The service has the packages installed, so it can run fits itself.

To be decided after the form-generator spike. The spike generates the form from the pydantic models, so it does not run into either question.

主要言語
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 を短くまとめたダイジェスト。