apache / apache/datafusion-python
Nothing in CI runs examples/*.py, and one of them is broken
- Ngôn ngữ chính
- Python
- Star
- 604
- Fork
- 174
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start by reviewing .github/workflows/ and the entry points under examples/*.py, then run examples/csv-read-options.py to reproduce its missing-input failure. Define the wheel-based CI job and its skip matrix for the AWS and NYC taxi examples; done means the self-contained CSV example runs, the named silent scripts print output while retaining asserts, and eligible examples execute in CI.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github-actions, python
- Lĩnh vực
- ci-cd, testing
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100