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

Auxiliary variables are marked `aux` in one place and `auxiliary` in another

Abierto
#714 0 comentarios 1 reacción 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
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
data

Línea de trabajo

Start with _validate_dataset in src/modelskill/timeseries/_timeseries.py:134, then compare its kind handling with _include_attributes in _point.py:178, _aux_vars at _timeseries.py:279, and Comparer.aux_names in _comparison.py:693-700. Reproduce the hand-built dataset example and verify that one spelling is used consistently, with auxiliary variables appearing in _aux_vars, repr, and comparison names without changing to_dataframe() behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

An auxiliary variable is marked "aux" in one place and "auxiliary" in another, and the two readers disagree about which counts.

Writers:

  • _include_attributes writes "aux" for every selected aux item — src/modelskill/timeseries/_point.py:178
  • _validate_dataset defaults any variable with no kind to "auxiliary" — src/modelskill/timeseries/_timeseries.py:134

Readers:

  • TimeSeries._aux_vars matches "aux" only — _timeseries.py:279, via filter_by_attrs(kind="aux")
  • Comparer.aux_names matches anything that is not observation or model — src/modelskill/comparison/_comparison.py:693-700, with the comment # we don't require the kind attribute to be "auxiliary"
  • to_dataframe() keeps every data variable regardless of kind

A variable marked "auxiliary" is therefore invisible to _aux_vars and to __repr__, while still appearing as a column:

ts = TimeSeries(ds)               # ds carries an extra variable with no kind

ts.data["extra"].attrs["kind"]    # 'auxiliary'
ts._aux_vars                      # []          <- not seen
list(ts.to_dataframe().columns)   # ['WL', 'extra']   <- but present
"Auxiliary" in repr(ts)           # False       <- and unreported

Scope

Everything built through the normal parse path gets "aux", because _parse_point_input selects values and aux items and marks the aux ones itself. The "auxiliary" default only fires for a dataset that reaches _validate_dataset carrying a variable nothing claimed — a hand-built dataset, or one assembled outside the parse functions. That is why no test has caught it.

Suggested fix

Pick one spelling and use it in both writers and all three readers. "aux" is the one the parse path produces and the one _aux_vars already expects, so _validate_dataset:134 is the smaller change. Whichever is chosen, Comparer.aux_names can then match it directly instead of matching by exclusion, and the comment at _comparison.py:695 can go.

Lenguaje dominante
Python
Estrellas
58
Forks
10
Merge medio
28 min
PR fusionados (30 d)
1

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 DHI/modelskill

Todos los issues de DHI/modelskill

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.