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

Aberta
#1,728 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
github-actions, python
Domínio
ci-cd, testing

Direção de pesquisa

Comece revisando .github/workflows/ e os pontos de entrada em examples/*.py; em seguida, execute examples/csv-read-options.py para reproduzir sua falha por entrada ausente. Defina o job de CI baseado em wheel e sua matriz de skip para os exemplos de táxi da AWS e de NYC; considera-se concluído quando o exemplo CSV autocontido é executado, os scripts silenciosos nomeados imprimem saída mantendo os asserts e os exemplos elegíveis são executados no CI.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
605
Forks
176
Merge médio
1d 23h
PRs com merge (30d)
8

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/datafusion-python

Todas as issues de apache/datafusion-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.