-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
CodeRabbit's automated review detected that docstring coverage is currently 0.00%, which is below the required threshold of 80.00%. This affects code maintainability and developer experience.
Current State
- Most classes, methods, and functions lack documentation comments
- No standardized docstring format is in place
- Difficult for new contributors to understand API contracts and usage
Proposed Solution
Add comprehensive docstrings to the codebase following a consistent format (e.g., Doxygen-style for C++):
Priority Areas
-
High Priority - Public APIs
include/evolab/schedulers/mab.hpp- MAB scheduler classesinclude/evolab/core/concepts.hpp- Core conceptsinclude/evolab/local_search/- Local search operatorsinclude/evolab/operators/- Genetic operators
-
Medium Priority - Implementation Classes
- Scheduler implementations
- Problem-specific implementations
- Helper classes
-
Lower Priority
- Internal utility functions
- Test helpers
Documentation Standards
Each public class/function should include:
- Brief description
- Template parameter documentation
- Parameter descriptions
- Return value documentation
- Usage examples (where helpful)
- Exception specifications
Example Format
```cpp
/// @brief Adaptive operator selector using Multi-Armed Bandit algorithms
///
/// Automatically selects the best-performing crossover operator based on
/// historical performance data using UCB or Thompson Sampling.
///
/// @tparam SchedulerType The MAB scheduler type (UCBScheduler or ThompsonSamplingScheduler)
/// @tparam Problem The optimization problem type
///
/// @example
/// ```cpp
/// UCBOperatorSelector selector(2, 2.0, rng);
/// selector.add_operator(OrderCrossover(), "OX");
/// selector.add_operator(PMXCrossover(), "PMX");
/// ```
template <typename SchedulerType, typename Problem>
class AdaptiveOperatorSelector {
// ...
};
```
Related
- Detected in PR feat(mab): integrate Lin-Kernighan with Multi-Armed Bandit scheduler #28 (feat/lk-mab-integration)
- Part of improving overall code quality and maintainability
Acceptance Criteria
- Docstring coverage reaches at least 80%
- All public APIs have comprehensive documentation
- Consistent documentation format across codebase
- CodeRabbit checks pass without docstring warnings
Notes
This is a large task that should be broken down into smaller PRs, potentially one per module or directory.