GFQL: unify engine-specific empty-frame / row-slice idioms behind engine-agnostic helpers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Start in graphistry/compute/dataframe_utils.py, where the proposed empty_rows and row_slice helpers would live, then grep graphistry/compute for iloc[0:0], head(0) and slice(0, 0) to list the call sites. Replace the sites that can receive Polars, cuDF or polars-gpu frames so the engine branch lives only in the helpers. Done means the helpers have unit tests across pandas, Polars eager and lazy, cuDF and polars-gpu, and no remaining iloc call on those paths. Check with the maintainers which sites the fix-forward PR for #2253, #2263 and #2268 already covers before editing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
graphistry/compute builds empty frames and row slices with engine-specific branches, and the patterns are inconsistent. On master 4d627b23 there are 34 uses of iloc[0:0], 10 of .head(0), and 3 explicit head(0) if <polars> else iloc[0:0] branches. iloc doesn't exist on Polars frames, so any iloc[0:0] on a path that can carry Polars data is a latent crash. The master 'DataFrame' object has no attribute 'iloc' crash in #2267 was one of these.
.head(0) behaves the same on pandas (columns, dtypes, index dtype and name, frame type), on Polars eager (schema), on Polars lazy (schema; stays a LazyFrame), and on Series. It also exists on cuDF.
Ask
- Add engine-agnostic helpers in
graphistry/compute/dataframe_utils.py, e.g.empty_rows(df)(df.head(0)) androw_slice(df, start, n)(Polarsslice, otherwiseiloc+reset_index(drop=True)). Keep the engine branch in exactly one place. - Replace the scattered
iloc[0:0]/head(0) if …/slice(0, 0)sites on paths that can carry Polars, cuDF, or polars-gpu frames. Pure-pandas paths can stay as they are, with a short note. - Unit-test the helpers on pandas, Polars eager/lazy, cuDF, and polars-gpu.
The sites touched by the recent GFQL fixes (#2253, #2263, #2268) are handled in their fix-forward PR. This issue tracks the rest of the repo.
- Lingua principale
- Python
- Stelle
- 2.6k
- Fork
- 229
- Merge medio
- 1g 5h
- PR unite (30g)
- 99
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di graphistry/pygraphistry
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
graphistry/pygraphistry#2171 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
graphistry/pygraphistry#1965 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
graphistry/pygraphistry#1208 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
graphistry/pygraphistry#966 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
graphistry/pygraphistry#824 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di graphistry/pygraphistry
Issue simili
-
New InternshipApertanew_internship
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
get_graph warns that the oneway column is missing when no way has a oneway tagForse già presa @HTenkanen l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cython/cython#8110 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
fix: security 🔐 style: article/section 📝 system: data-mgmt 🗃️ system: security 🔐 system: software 💻
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
uabrc/uabrc.github.io#1267 ·
-
Link Checker ReportApertaBot Type: Bug Type: Documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno