Tests: order-dependent snapshots, unseeded data, silent skips and assertions that cannot fail
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start with test-impute-missing-scores.R, test-metrics-binary.R, test-class-forecast-ordinal.R, and the print snapshot tests, then inspect shared fixtures in setup.R. Run the review's filtered test commands to reproduce the order dependent snapshots and a full test run to check random failures, skips, assertions, prints, warnings, and labels. Done when these test issues are addressed and the relevant tests pass without unintended skips or warnings.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CLAUDE: - [ ] Six plot snapshots depend on test order. test-impute-missing-scores.R does scores <- scores_quantile and later data.table::setkeyv(scores, names(scores)), which sorts the shared fixture from setup.R by reference. The vdiffr snapshots of plot_heatmap(), plot_wis() and plot_pairwise_comparisons() were recorded against the sorted fixture:
devtools::test(filter = "plot_heatmap|plot_wis") # 4 failures
devtools::test(filter = "impute-missing-scores|plot_heatmap|plot_wis") # 0 failures
Fix: data.table::copy() in that test and re-record the snapshots.
-
test-metrics-binary.Rdrawsobservedwithrbinom()and no seed at file level; when all ten draws are equal (about 1 in 400) six tests fail. - Eleven
skip_if_not()guards intest-impute-missing-scores.R(e.g. onexists("build_missing_grid", ...)) would silently skip tests of exported functions if an internal helper were renamed. - Assertions that cannot fail:
expect_s3_class(x, c("forecast_quantile", "data.table", "data.frame"))passes for any data.frame (noexact = TRUE); seven bareexpect_error()/expect_warning()calls without a message;get_metrics()tests only checkexpect_type(, "list"); the permutation test only usesexpect_no_condition();get_pit_histogram()tests never check a density. - Print tests: nominal, ordinal and multivariate are not in the print snapshot test, and the same
print()is snapshotted four times per data set. - Unused fixtures in
setup.R(scores_sample_discrete,scores_nominal,metrics_no_cov_no_ae); a clean run has four warnings that nothing fails on. - Mislabelled tests in
test-class-forecast-ordinal.R("get_metrics.forecast_nominal()", "is_forecast_nominal() works").
Related: #685, #686, #986.
Found during a full review of the package (version 2.3.0.9000, main at 779d7d68).
- Lingua principale
- R
- Stelle
- 65
- Fork
- 24
- Merge medio
- 1h 24m
- PR unite (30g)
- 2
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 epiforecasts/scoringutils
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
epiforecasts/scoringutils#1264 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
epiforecasts/scoringutils#1265 ·
I maintainer di solito rispondono entro 1 giorno
-
Non-randomised PIT for integer forecasts drops forecasts whose observation exceeds all samplesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
epiforecasts/scoringutils#1260 ·
I maintainer di solito rispondono entro 1 giorno
-
Incorrect guidance in `NEWS.md` re `add_relative_skill()`?Forse già presa @nikosbosse l’ha presa 3 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
epiforecasts/scoringutils#1226 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
get_pit_histogram(): unsorted breaks produce negative densities; num_bins = 1 returns an empty tableForse già presa @nikosbosse l’ha presa 3 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
epiforecasts/scoringutils#1219 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di epiforecasts/scoringutils
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
waldronlab/bugphyzz#301 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
r-lib/tree-sitter-r#209 ·
-
Suggest rmoriebricklayerAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
-
Suggest rmoriebricklayerAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 79/100
cran-task-views/CausalInference#52 · 1 commento ·