Add Phase 4: code quality, CI/CD, and formatting

- testthat infrastructure with 15 tests covering env-var guards,
  return types for all format/save functions, and spelling
- inst/WORDLIST with 52 domain terms (LightGBM, MinIO, Parquet, etc.)
- Spelling test wired into devtools::test() via test-spelling.R
- styler::style_file() added as step 0 in deploy.R (auto-fixes before ship)
- .gitea/workflows/test.yaml: runs testthat suite on push
- .gitea/workflows/lint.yaml: lychee link check + styler dry-run on push
- Removed internal IP address from comment in train_production_model()
- Language: en-US added to DESCRIPTION

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 04:41:37 -05:00
parent 705b2a13d0
commit 7a1a8e0053
10 changed files with 521 additions and 254 deletions

View File

@@ -0,0 +1,12 @@
test_that("no spelling errors in package docs, README, or slides", {
skip_on_cran()
skip_if_not_installed("spelling")
pkg_root <- getwd()
for (i in seq_len(5)) {
if (file.exists(file.path(pkg_root, "DESCRIPTION"))) break
pkg_root <- dirname(pkg_root)
}
skip_if(!file.exists(file.path(pkg_root, "DESCRIPTION")))
errors <- spelling::spell_check_package(pkg_root)
expect_equal(nrow(errors), 0L, info = paste(errors$word, collapse = ", "))
})