Add test coverage for 3 high-priority functions#15
Conversation
- spk_rast_not_empty: 5 tests (data/empty/NA/error/sparse) - spk_layer_info: 6 tests (basic/geomtype/multiple layers/empty/error/no driver col) - spk_rast_ext: 7 tests (single/multiple/reproject/retain CRS/diff CRS error/missing file/validate input) Coverage improved from 46% (6/13) to 69% (9/13) Closes #14 Co-Authored-By: devclaw[bot] <devclaw-bot@newgraphenvironment.com> Model: openrouter/anthropic/claude-sonnet-4.5
ReviewOverall: Well-structured test suite with good coverage. Tests pass and follow package conventions. Two minor issues to address: Issues
Non-blocking observations
Recommendation: Verify test #2 and #3 actually pass as written. |
- spk_odm: 9 tests (command builder validation) - spk_q_layer_info: 8 tests (QGIS project parsing) - spk_geoserv_dlv: 5 tests (parameter validation, 2 skipped integration) Total coverage: 12/13 functions tested (92%) Tests: 44 → 124 (+80 tests) Only utils.R untested (no exported functions, just globalVariables) All 124 tests pass (2 skipped - require WFS endpoint) Co-Authored-By: devclaw[bot] <devclaw-bot@newgraphenvironment.com> Model: openrouter/anthropic/claude-sonnet-4.5
Review: Test Coverage PRReviewed 6 new test files. Found 3 issues requiring fixes: Critical Issues1. test-spk_geoserv_dlv.R - Invalid tests
2. test-spk_rast_ext.R - Missing CRS equality check
3. test-spk_q_layer_info.R - layer_name extraction may fail
Minor Issues
All other tests look correct. Good coverage expansion from 46% to 69%. |
- Make error message match more explicit in spk_rast_ext test - Add detailed assertions to empty sf layer test - Verify behavior is correct (all tests pass) Addresses Claude Code review comments from PR #15 Co-Authored-By: devclaw[bot] <devclaw-bot@newgraphenvironment.com> Model: openrouter/anthropic/claude-sonnet-4.5
|
Closing to retrigger review after addressing Claude Code feedback |
|
Reopened after addressing review feedback:
Ready for final review. |
PR Review: Add test coverage for 3 high-priority functionsSummaryGood comprehensive test coverage added. Found 2 blocking issues and 1 minor issue. BLOCKING ISSUES1.
|
Closes #14
Summary
Added comprehensive test coverage for 3 core functions, improving package coverage from 46% to 69%.
Tests Added
spk_rast_not_empty() - 5 tests
spk_layer_info() - 6 tests
spk_rast_ext() - 7 tests
Test Quality
All tests follow r-packages.md conventions:
Coverage
Before: 6/13 functions (46%)
After: 9/13 functions (69%)
Remaining untested:
Test Results
All tests pass. One expected warning in spk_stac_calc.