Nothing in CI runs examples/*.py, and one of them is broken

Abierto
#1,728 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, python
Área
ci-cd, testing

Línea de trabajo

Comienza revisando .github/workflows/ y los puntos de entrada bajo examples/*.py; después ejecuta examples/csv-read-options.py para reproducir su fallo por falta de entrada. Define el trabajo de CI basado en wheel y su matriz de omisión para los ejemplos de taxis de AWS y NYC; se considera terminado cuando el ejemplo CSV autónomo se ejecuta, los scripts silenciosos indicados imprimen salida conservando los asserts y los ejemplos elegibles se ejecutan en CI.

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

Descripción

bug good first issue

Verified: the only examples paths in .github/workflows/ are the five FFI crate directories and examples/tpch. No top-level examples/*.py script is executed anywhere in CI. Two consequences are already in the tree:

examples/csv-read-options.py crashes. It reads data.csv at lines 28, 39, 52, 72 and 78, and data.csv.gz at line 67. Neither file exists anywhere in the repository. This is not a script that runs quietly — it raises on line 28. Fix: have it write its own small CSV and gzip copy into a temporary directory at the top, which also makes it self-contained.

Nine scripts print nothing at all. export.py, import.py, python-udaf.py, python-udf.py, query-pyarrow-data.py, sql-to-pandas.py, sql-using-python-udaf.py, sql-using-python-udf.py and substrait.py contain zero print or .show() calls; they end in assert. They are tests wearing an example's filename. A script that prints nothing is indistinguishable to a reader from a script that does nothing. Fix is roughly two lines each: a terminal df.show() or print(...), keeping the asserts.

The root cause is the missing CI job, and it is the part worth designing rather than just doing. A job running examples/*.py against the already-built wheel would have caught both, but it needs a skip matrix: sql-parquet-s3.py needs network and AWS credentials, and sql-parquet.py, dataframe-parquet.py and sql-to-pandas.py need an NYC taxi Parquet file the README tells you to download by hand. Worth agreeing the shape of that before writing it.

Lenguaje dominante
Python
Estrellas
605
Forks
176
Merge medio
1 d 23 h
PR fusionados (30 d)
8

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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 apache/datafusion-python

Todos los issues de apache/datafusion-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.