FileSource is usable without a backend

Abierto
#131 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
8/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
0
Forks
1
Merge medio
15 h 25 min
PR fusionados (30 d)
60

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de scipp/essapps

Todos los issues de scipp/essapps

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.