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

Offen
#1,728 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, python
Bereich
ci-cd, testing

Rechercherichtung

Beginne mit der Durchsicht von .github/workflows/ und der Einstiegspunkte unter examples/*.py und führe dann examples/csv-read-options.py aus, um den Fehler bei fehlender Eingabe zu reproduzieren. Definiere den CI-Job auf Wheel-Basis und seine Skip-Matrix für die AWS- und NYC-Taxi-Beispiele; als abgeschlossen gilt die Aufgabe, wenn das eigenständige CSV-Beispiel ausgeführt wird, die genannten stillen Skripte unter Beibehaltung der asserts eine Ausgabe erzeugen und geeignete Beispiele in CI ausgeführt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
605
Forks
176
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
8

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus apache/datafusion-python

Alle Issues in apache/datafusion-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.