parse_reference's blank and None share cells have no end-to-end test
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 72/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, pandas, python
- Ambito
- testing
Direzione di ricerca
Start with parse_reference() in faircode/profiler.py (lines 548-553) and run the repro from the issue to confirm that NaN, None and inf cells are dropped. Then look at the --reference option in faircode/cli.py and the existing tests in tests/test_profiler.py and tests/test_cli.py. Done means a parametrised Python test over nan, None and inf passes, a CLI test with a blank share field shows the baseline without that group and no nan in the output, and the web parseReference has a JSON-null case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Where: faircode/profiler.py parse_reference() (the float(value) guard and the finite check, lines 548-553), faircode/cli.py (--reference), tests/test_profiler.py, tests/test_cli.py.
Current gap: #1002 made both engines skip unreadable shares. The numeric cases were tested with strings (n/a, nan, inf) but the most common real one is a blank cell in a reference CSV, which pandas reads as a float NaN (or None in JSON). Coverage shows the TypeError path and the non-finite guard still never run from a numeric cell, and nothing checks that faircode profile --reference ref.csv with a blank share ignores that row instead of using nan.
Repro:
>>> import pandas as pd; from faircode.profiler import parse_reference
>>> parse_reference(pd.DataFrame({"column": ["c"] * 4, "group": list("abcd"), "share": [0.5, float("nan"), None, float("inf")]}))
{'c': {'a': 0.5}} # correct, but no test pins it
Suggested approach: parametrise a Python test over nan, None and inf cells, add a CLI test with a reference CSV that has an empty share field (expecting the baseline without that group and no nan in the output), and the same JSON-null case for the web parseReference.
- Lingua principale
- HTML
- Stelle
- 47
- Fork
- 45
- Merge medio
- 3h 12m
- PR unite (30g)
- 77
Preparare l'ambiente
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 yakew7/Fair-Code
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Numeric column headers keep their type in Python (the integer 2020) and are text in the web engineForse già presa @snehal1931 l’ha presa 2 giorni fa. Apertabug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
yakew7/Fair-Code#1045 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
JSON string cells "NA" and "" are missing in the web engine and ordinary values in PythonForse già presa @snehal1931 l’ha presa 2 giorni fa. Apertabug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yakew7/Fair-Code#1036 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
documentation help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
documentation help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di yakew7/Fair-Code
Issue simili
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yunaremaia/acc-mcp#63 ·
-
bug effort:medium model:light tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
external
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
langchain-ai/langgraph#9386 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-ready area: core priority: p3 type: fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
schlessera/brain-kit#2503 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
StellarCanary/ProtocolCanary-Fixtures#419 ·
I maintainer di solito rispondono entro 1 giorno