Should the serialized params schema name the kinds of reference?

Aperta
#88 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
0
Fork
1
Merge medio
9h 23m
PR unite (30g)
65

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scipp/essapps

Tutte le issue di scipp/essapps

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.