Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

parse_reference's blank and None share cells have no end-to-end test

Cerrado
#1,028 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

enhancement good first issue

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de yakew7/Fair-Code

Todos los issues de yakew7/Fair-Code

Issues similares

Más issues de Testing & QA

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.