-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: check for missing parameters #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new allow_subset parameter to the ParamSet validation methods (check, test, assert, check_dt, test_dt, assert_dt) that enables checking whether all parameters are present in a configuration. When allow_subset = FALSE, all parameters must be present except for dependent parameters whose dependencies are not satisfied. This provides stricter validation for complete parameter configurations.
Key Changes:
- Added
allow_subsetparameter (defaultTRUEfor backward compatibility) to all validation methods - Implemented logic to verify all parameters are present when
allow_subset = FALSE, with proper handling of dependencies - Added comprehensive test coverage for single and multi-parent dependency scenarios
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| R/ParamSet.R | Implements allow_subset parameter logic in check(), test(), assert(), check_dt(), test_dt(), and assert_dt() methods with dependency satisfaction checking |
| tests/testthat/test_ParamSet.R | Adds comprehensive test cases covering missing parameters, parent parameters, and dependent parameters with satisfied/unsatisfied dependencies |
| man/ParamSet.Rd | Updates documentation for all modified methods to describe the new allow_subset parameter |
| NEWS.md | Documents the new feature in the changelog |
| DESCRIPTION | Updates RoxygenNote version and removes trailing whitespace |
| .lintr | Updates linter configuration (unrelated housekeeping) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Checks for missing parameters. Parameters are only allowed to be missing if their dependencies are unsatisfied.