Repository navigation
Add testthat coverage and package contributor guidance - #17
Merged
Merged
Conversation
Co-authored-by: asgr <5617132+asgr@users.noreply.github.com>
Co-authored-by: asgr <5617132+asgr@users.noreply.github.com>
Owner
|
@copilot resolve the merge conflicts in this pull request |
…-tests-and-update-ci # Conflicts: # tests/testthat/test-lowlander-helpers.R Co-authored-by: asgr <5617132+asgr@users.noreply.github.com>
Contributor
Author
Resolved and merged |
There was a problem hiding this comment.
🟡 Changes recommended
The Nsamp tests lack a case for .Machine$integer.max + 1, leaving the new upper-bound guard unverified and its removal undetected.
1 open issue
What changed in this PR
This PR expands Highlander’s unit coverage, strengthens Lowlander() sample-count validation, and adds package-specific contributor guidance.
Changes:
- Add focused tests for sampling, helper ranking and seeding, likelihood conversion, and algorithm settings.
- Reject non-positive, fractional, and out-of-range
Nsampvalues. - Document package structure, test commands, and contribution expectations.
| File | Description |
|---|---|
tests/testthat/test-specs-help.R |
Test algorithm defaults, ensemble initialization, and grid bounds. |
tests/testthat/test-lowlander.R |
Test deterministic search, likelihood direction, and input validation. |
tests/testthat/test-lowlander-helpers.R |
Expand ranking, starting-point, and invalid-input coverage. |
tests/testthat/test-likelihood-converters.R |
Test optimization direction and prior handling. |
tests/testthat/helper-lowlander-fixture.R |
Add a shared deterministic fixture. |
R/Lowlander.R |
Strengthen sample-count validation before integer conversion. |
AGENTS.md |
Document package layout and contributor workflows. |
Review effort: Balanced
Comment on lines
+70
to
+73
| expect_error( | ||
| do.call(Lowlander, utils::modifyList(args, list(Nsamp = 1.5))), | ||
| "Nsamp must be a positive integer" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add focused unit tests for Highlander’s sampling helpers and algorithm-spec generation, and document package structure and contribution guidance. Reject invalid
Lowlander()sample counts; the existing R CMD-check workflow already runs testthat.Nsampvalues.AGENTS.mdwith test and check commands.