-
Notifications
You must be signed in to change notification settings - Fork 20
Refactor parameter handling to use 'config' instead of 'parameters'. #100
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
Conversation
- Removed the `parameter_summary` function from `utils_rt.R`. - Updated README to clarify the use of `setup_()` functions for configuration options. - Changed `resampler_parameters` to `resampler_config` in various function documentation and implementations. - Updated function signatures and documentation for clustering, decomposition, and preprocessing functions to use `config` instead of `parameters`. - Adjusted tests to reflect the changes from `parameters` to `config` in setup functions and clustering algorithms. - Updated all relevant documentation files to ensure consistency in naming conventions for configuration objects.
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 pull request performs a comprehensive refactoring to standardize terminology from "parameters" to "config" throughout the codebase. The main purpose is to improve naming consistency by using "config" for configuration objects while reserving "parameters" for actual function arguments.
Key changes include:
- Renaming all
*Parametersclasses to*Configclasses (e.g.,TunerParameters→TunerConfig) - Updating function signatures to use
configinstead ofparametersfor configuration objects - Renaming the
parameter_summaryutility function (removed entirely)
Reviewed Changes
Copilot reviewed 83 out of 83 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test_*.R | Updated test files to use new *Config class names and config parameter names |
| man/*.Rd | Updated documentation files to reflect new class names and parameter terminology |
| R/*.R | Core implementation files updated with new class names, method signatures, and consistent config terminology |
| README.md | Updated to clarify setup functions provide "configuration options" instead of "parameters" |
| DESCRIPTION | Version bump to reflect the refactoring changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| config = do_call( | ||
| get_clust_setup_fn(cluster), | ||
| cluster_params | ||
| cluster_config | ||
| ) |
Copilot
AI
Oct 18, 2025
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.
This will fail when cluster_config is NULL (the default value). Should add a null check or provide a default value like cluster_config %||% list(k = 2).
Summary of ChangesHello @egenn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant refactoring of how configuration options and parameters are handled throughout the package. The primary goal is to enhance code clarity and maintainability by standardizing naming conventions, moving from generic 'parameters' to more descriptive 'config' or 'hyperparams'. This change impacts class definitions, function signatures, and internal logic across multiple modules, ensuring a more intuitive and consistent interface for users and developers alike. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a large-scale refactoring, renaming parameters to config across the codebase for better clarity and consistency. This affects numerous files, including class definitions, methods, function signatures, documentation, and tests. The changes are extensive but appear to be applied consistently for the most part. I've identified one minor naming inconsistency in R/13_S7_SuperConfig.R for your consideration. Overall, this is a great improvement for the codebase's consistency.
R/13_S7_SuperConfig.R
Outdated
| dat_test = class_character, | ||
| algorithm = class_character, | ||
| preprocessor = PreprocessorParameters | NULL, | ||
| preprocessor = PreprocessorConfig | NULL, |
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.
…y across functions and documentation
|
/gemini review |
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.
Code Review
This pull request is a comprehensive refactoring to rename parameters to config across the codebase for better clarity and consistency. The changes are extensive, touching many files including source code, documentation, and tests. The refactoring appears to be very thorough and consistent. I have one minor suggestion regarding the version number update. Overall, this is a great improvement for the codebase's consistency.
DESCRIPTION
Outdated
| @@ -1,7 +1,7 @@ | |||
| Package: rtemis | |||
| Version: 0.99.990 | |||
| Version: 0.99.9100 | |||
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.
parameter_summaryfunction fromutils_rt.R.setup_()functions for configuration options.resampler_parameterstoresampler_configin various function documentation and implementations.configinstead ofparameters.parameterstoconfigin setup functions and clustering algorithms.