Repository navigation
get devtools::test() running w/o error #8
Copy link
Copy link
Closed
Description
2026 restart
Run devtools::test() to run all tests locally. In re-entering this issue in 2026, my approach will be to focus on getting things running by reducing/commenting out tests at first, then adding more tests only as quickly as I can get them to run automatically. Thus this issue does still include these two bullets from the 2015 plan:
- Avoid user/developer interaction (this will require changes from some development-phase tests)
- Avoid producing plots or text output other than testthat output (this will require changes from some development-phase tests)
I'll count this issue as completed when I've achieved:
- a short set of tests that run automatically
- package-wide updates for changes to tidyverse since 2015
Archived: 2015 plan
Tests should:
- Test whether the function behavior matches the documentation
- Cover all probable use cases for a function or file
- Avoid user/developer interaction (this will require changes from some development-phase tests)
- Avoid producing plots or text output other than testthat output (this will require changes from some development-phase tests)
- Contain internal comments where necessary to explain/justify tests
- Be organized into readable test_that blocks
- Run reasonably quickly
- Use only data available within the package and/or reproducibly generated (e.g., through fixed text definitions of the data, or using set.seed() before random data generation)
- Run cleanly on package tests (Ctrl-Shift-T) and eventually also check (Ctrl-Shift-E)
To do:
- 01-match.arg.loadflex (examples & tests: match.arg.loadflex #26)
- 02-text (examples & tests: text #27)
- 03-unit.conversions (examples & tests: unit.conversions #28)
- 04-uncertainty (examples & tests: uncertainty #29)
- 05-diagnostics (examples & tests: diagnostics #30)
- 06-covariance (examples & tests: covariance #31)
- 11-metadata (examples & tests: metadata #32)
- 21-loadModel (examples & tests: loadModel #33)
- 22-loadLm (examples & tests: loadLm #34)
- 23-1-interpolations (examples & tests: interpolations #35)
- 23-2-loadInterp (examples & tests: loadInterp #36)
- 24-1-loadReg (examples & tests: loadReg #37)
- 24-2-loadReg2 (examples & tests: loadReg2 #38)
- 25-loadComp (examples & tests: loadComp #39)
- 31-loadModelInterface (examples & tests: loadModelInterface #40)
- 32-getResiduals (examples & tests: getResiduals #41)
- 33-aggregateSolute (examples & tests: aggregateSolute #42)
- 41-predictors (examples & tests: predictors #43)
- 42-outliers (examples & tests: outliers #44)
- 43-leverage (examples & tests: leverage #45)
- 44-plots (examples & tests: plots #46)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
doc & tests: uncertainty
steps toward clean check
suspend autobuild test_check() until DOI-USGS#8 is closer
aappling-usgs commentedon Oct 3, 2026
testthat::test_check()is now an alias fortestthat::test_package().The help at
?test_pacakge()describes these options:• ‘test_local()’ tests a local source package.
• ‘test_package()’ tests an installed package.
• ‘test_check()’ checks a package during R CMD check.
So probably during development I'd mostly want
testthat::test_local()now.aappling-usgs commentedon Oct 3, 2026
Initial test run on 10/3/26 - I've created an unversioned
tempfolder (it's already gitignored), worked with Kiro to create test.txt (an R file, but suffixed .txt so I can attach it to gitlab comments like this one), and ransource('temp/test.txt') to generatetest-output-yymmdd-hhmm.txt`. These are attached here.The script: test.txt
This morning's output: test-output-261003-1050.txt
[-]get test_check running w/o error[/-][+]get testthat::test_local running w/o error[/+][-]get testthat::test_local running w/o error[/-][+]get devtools::test() running w/o error[/+]aappling-usgs commentedon Oct 3, 2026
Results after implementing Phase 1 of the kiro task list (see #254 for the kiro requirements/design/task files).
Phase 1 description from design.md:
Test results:
test-output-261003-1138.txt
aappling-usgs commentedon Oct 14, 2026
Calling this complete with a bow on it as of #267 . I've got tidyverse fixes in place (#255) and testthat running smoothly with the helper script in dev/run-tests.R. Its output includes failures and errors, but they're documented now and can be chipped away at over multiple future PRs.