协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
run-puzzle-tests【开发与工程】Run the jigsawR test suite via WSL R execution. Supports full suite, filtered by pattern, or single file. Interprets pass/fail/skip counts and identifies failing tests. Never uses --vanilla flag (renv needs .Rprofile for activation). Use after modifying any R source code, after adding a new puzzle type or feature, before committing changes to verify …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
行 jigsawR 之試套,並解其果。
full、filtered、或 single)"snic"、"rectangular")| 範 | 用時 | 時 |
|---|---|---|
| Full | 提交之前、大變之後 | 約 2-5 分 |
| Filtered | 治一拼圖之類 | 約 30 秒 |
| Single | 察一試文件 | 約 10 秒 |
得:依當前所為擇範——提交之前用全套,治一類用濾,察一試用單。
敗則:不知擇何範,默用全套。雖久而能捕跨類之回退。
全套:
立本文件(如 /tmp/run_tests.R):
devtools::test()
R_EXE="/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe"
cd /mnt/d/dev/p/jigsawR && "$R_EXE" -e "devtools::test()"
依模濾之:
"$R_EXE" -e "devtools::test(filter = 'snic')"
單文件:
"$R_EXE" -e "testthat::test_file('tests/testthat/test-snic-puzzles.R')"
得:試出附過/敗/略之數。
敗則:
--vanilla 旗;renv 需 .Rprofile 以啟renv::restore()察其總線:
[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
snic)得:總線解之,識 PASS、FAIL、SKIP、WARN 之數。淨行則 FAIL = 0。
敗則:總線不見,試或於畢前崩。察其上之 R 級誤。出截斷者,重定於文件:"$R_EXE" -e "devtools::test()" > test_results.txt 2>&1。
試敗:
# Run just the failing test with verbose output
"$R_EXE" -e "testthat::test_file('tests/testthat/test-failing.R', reporter = 'summary')"
得:每敗試之根因已識。敗者,或實之回退(碼宜修),或試境之患(缺依、徑訛)。
敗則:敗辭不明,加 browser() 或 print() 於試,以 testthat::test_file() 重行為交互之察。
略之試,乃選依不存時之常:
snic 包試以 skip_if_not_installed("snic") 略skip_on_os() 略skip_on_cran()驗略之由皆正當,非掩實敗。
得:諸略皆有正當之由(選依未裝、平台特略、CRAN 唯略)。無略掩實之試敗。
敗則:略可疑,暫除其 skip_if_*() 而行其試,察其過或現藏敗。
--vanilla:破 renv 之啟。jigsawR 永勿用之-e 串:殼轉義之患致退碼 5。用本文件devtools::load_all() 或 devtools::document()DESCRIPTION 之 Suggeststestthat::test_file() 序行generate-puzzle — 生拼圖以驗其行合試add-puzzle-type — 新類需備全試套write-testthat-tests — 寫 R 試之常模validate-piles-notation — 獨驗 PILES 之解