A run can fill more than one file role
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Read files.py for Selector.matches, checks.py for submit validation, and docs/requirements/sans.md plus docs/requirements/data.md for the requirements and open design question. Compare the two role options against filtering in client.files.list, form listings, and rule selectors; confirm the approach with the NICOS and SciCat constraints before implementation. Done means a run with two roles is accepted for each role at submit and in all the listed selectors.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A file has one role in its metadata, and Selector.matches compares it with the marker's value by equality (files.py). The backend refuses a file that does not match at submit (checks.py), and rules and form pickers filter the same way. So a run can fill only fields of one role.
Real data do not fit this. In the esssans LoKI tutorial, run 60392 is both the can transmission run and the empty-beam run (ess.loki.data.loki_tutorial_run_60392):
class IofQParams(BaseModel):
can_transmission: TransmissionRunFile # File(role='transmission')
empty_beam: EmptyBeamRunFile # File(role='empty_beam')
client.submit(IOFQ, params={'can_transmission': file(run=60392), # fits if the table says role='transmission'
'empty_beam': file(run=60392), ...}) # then this is refused
docs/requirements/sans.md records that one run can fill several roles. #143 deferred list-valued roles.
Workaround
The LoKI specs of #24 type empty_beam as RunFile, which accepts a raw file of any role. The request then goes through, but a form offers every run for that field, and a file source's role plays no part in choosing the empty beam.
Options
- Roles as a set on the file's side. The metadata hold
role=['transmission', 'empty_beam'], and a selector matches if the marker's role is in the set. TheFilemarker keeps one role. Small change, butSelector.matches, the form listing, and rules need to agree on it, and every consumer ofmetadata['role']sees a list. - Metadata describe the measurement, and a role is a use. A file says what was measured: is there a sample, a can, is the transmission monitor in the beam. A field's marker selects on those facts. A 60392-like run then fits both fields without saying so. This fits the Open question in
docs/requirements/data.md(how files or the catalogue say what role a run plays), but the vocabulary depends on what ESS files will hold.
Option 1 is enough for a table a person fills (#24, #131). Automatic reduction (#151) needs the answer from the NICOS and SciCat teams, which may favour option 2.
Tests
A run with two roles fits fields of each role, at submit, in client.files.list, in a form's listing, and in a rule's selector.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 15 h 40 min
- PR fusionados (30 d)
- 59
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de scipp/essapps
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
A number that is not finite is stored as None at a field that accepts NonePosiblemente ocupada @jeevanabhi-r la tomó hace 2 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
scipp/essapps#140 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 40/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de scipp/essapps
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SpikeInterface/spikeinterface#4924 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
aws-samples/sample-per-model-bedrock#782 ·
Los mantenedores suelen responder en 1 día
-
bug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
No-op PreToolUse:Bash hook (bash_hook.py) still registered synchronously; adds latency and can time out at 10 sPosiblemente ocupada @alexgr-agent la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
alexgreensh/token-optimizer#313 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100