parse_reference's blank and None share cells have no end-to-end test
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, pandas, python
- Área
- testing
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- HTML
- Estrellas
- 47
- Forks
- 45
- Merge medio
- 3 h 15 min
- PR fusionados (30 d)
- 92
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de yakew7/Fair-Code
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
Todos los issues de yakew7/Fair-Code
Issues similares
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodifficulty:2 enhancement good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
MakazhanAlpamys/Soup#2178 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Snapshot capture failure (EPERM spawning git) fails the whole step despite the best-effort contractPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anomalyco/opencode#58685 · 1 comentario ·
Los mantenedores suelen responder en 1 día