`table_biomass_abundance_catch` fails tests due to change in `example_data`
Los mantenedores suelen responder en 2 días
@Schiano-NOAA ya está trabajando en esto.
Desde el 30/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
A change in the format of example_data introduced in https://github.com/nmfs-ost/stockplotr/commit/e74daf8cb3e7d3ab050f746209e1fb11f00335f7 results in table_biomass_abundance_catch failing. The new example_data results in sex specific values for abundance, which are not being aggregated by the the table function.
I believe the solution is:
if (x == "catch$|landings_observed") {
extra_grouping <- check_grouping(filtered_data)[-grep("year|fleet", check_grouping(filtered_data))]
filtered_data <- filtered_data |>
dplyr::summarise(
estimate = sum(as.numeric(estimate), na.rm = TRUE),
estimate_upper = mean(as.numeric(estimate_upper), na.rm = TRUE),
estimate_lower = mean(as.numeric(estimate_lower), na.rm = TRUE),
uncertainty_label = unique(uncertainty_label),
uncertainty = mean(uncertainty, na.rm = TRUE),
.by = c(year, model, label)
) # |>
# dplyr::ungroup()
} else if (x == "^abundance") {
extra_grouping <- check_grouping(filtered_data)[-grep("year|sex", check_grouping(filtered_data))]
filtered_data <- filtered_data |>
dplyr::summarise(
estimate = sum(as.numeric(estimate), na.rm = TRUE),
estimate_upper = mean(as.numeric(estimate_upper), na.rm = TRUE),
estimate_lower = mean(as.numeric(estimate_lower), na.rm = TRUE),
uncertainty_label = unique(uncertainty_label),
uncertainty = mean(uncertainty, na.rm = TRUE),
.by = c(year, model, label)
) # |>
# dplyr::ungroup()
} else {
extra_grouping <- check_grouping(filtered_data)[-grep("year", check_grouping(filtered_data))]
}
specifically, the introduction of the else if (x=="^abundance") conditional.
If this fix is not desired, reverting the above commit leads to this function working as previously and all associated tests passing.
- Lenguaje dominante
- R
- Estrellas
- 20
- Forks
- 10
- Merge medio
- 3 d 19 h
- PR fusionados (30 d)
- 23
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 nmfs-ost/stockplotr
-
check `dat` argument (and others) at the start of save_all_plots()Posiblemente ocupada @Schiano-NOAA la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nmfs-ost/stockplotr#445 · 7 comentarios · 2 reacciones · 2 asignados ·
Los mantenedores suelen responder en 2 días
-
[bug] plot_spawning_potential_ratio() example throwing errorPosiblemente ocupada @JZahner1 la tomó hace 3 días. Abierto
nmfs-ost/stockplotr#444 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Release Checklist - Monthly UpdatePosiblemente ocupada @Schiano-NOAA la tomó hace 3 días. Abierto
nmfs-ost/stockplotr#442 · 2 asignados ·
Los mantenedores suelen responder en 2 días
-
Brainstorm ways to automatically update `save_all_plots()`Posiblemente ocupada @sbreitbart-NOAA la tomó hace 11 días. Abierto
nmfs-ost/stockplotr#432 · 4 comentarios · 2 asignados ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
nmfs-ost/stockplotr#422 ·
Los mantenedores suelen responder en 2 días
Todos los issues de nmfs-ost/stockplotr
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
`latest` pre-release missing: Package run deleted it, then `gh release create` failed with HTTP 403Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
nf-core/differentialabundance#770 ·
Los mantenedores suelen responder en 1 día
-
Changelog for upcoming versionAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día