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

未关闭
#1,728 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, python
领域
ci-cd, testing

调研方向

先检查 .github/workflows/ 和 examples/*.py 下的入口点,然后运行 examples/csv-read-options.py 以复现其缺少输入的失败。为 AWS 和 NYC 出租车示例定义基于 wheel 的 CI job 及其 skip 矩阵;完成的标准是自包含的 CSV 示例能够运行,指定的静默脚本在保留 asserts 的同时打印输出,并且符合条件的示例在 CI 中执行。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
605
派生
176
平均合并
1 天 23 小时
30 天内合并 PR
8

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/datafusion-python 的其他 Issue

查看 apache/datafusion-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。