long tracebacks

Abierto
#157 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Start by reviewing the Stream usage shown in the issue and the proposed to_graph() and run(graph, input) entry points. The issue does not identify files, tests, an existing execution path, or acceptance criteria, so the desired traceback behavior and definition of done need to be established first.

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

Descripción

I'm wondering if we can avoid long tracebacks:

In [1]: from streamz import Stream

In [2]: s = Stream()

In [3]: snext = s
   ...: for i in range(10):                                                                     
   ...:     snext = snext.map(lambda x : x)
   ...:     

In [4]: def foo(x):
   ...:     raise ValueError("Foo")                                                                               
   ...: 

In [5]: snext.sink(foo)
Out[5]: <sink: foo>

In [6]: s.emit(1)
.... Long error message
<ipython-input-4-9636b5287c3d> in foo(x)
      1 def foo(x):
----> 2     raise ValueError("Foo")

ValueError: Foo

A way around this could be that the stream returns a graph which is executed one by one by an external function, like:

graph = s.to_graph()
run(graph, input)

where the run function would walk through each node in the graph in a top-down fashion and resolve the results.

Any other thoughts? Just an idea I figured I'd document somewhere. thanks!

Lenguaje dominante
Python
Estrellas
1.3k
Forks
149
Merge medio
17 h 39 min
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

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 python-streamz/streamz

Todos los issues de python-streamz/streamz

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.