Try improve test coverage#15
Merged
weslleyspereira merged 6 commits intoNatLabRockies:mainfrom Jan 5, 2026
Merged
Conversation
added 4 commits
December 19, 2025 09:21
…e termination condition assertions
Contributor
There was a problem hiding this comment.
Pull request overview
This PR significantly improves test coverage by reorganizing the test suite into a more modular structure and adding comprehensive test coverage for utility functions, termination conditions, optimization results, integration wrappers, and acquisition functions.
Key Changes
- Reorganized acquisition function tests from a single monolithic file into separate test modules under
tests/acquisition/ - Added comprehensive test coverage for previously untested modules (utils, termination, optimize_result, integrations)
- Introduced pytest markers (
slow,integration,unit,docs,examples,convergence) to enable selective test execution - Updated CI workflow to run fast tests on all platforms and slow tests only on Ubuntu with Python 3.11
- Refactored
minimize_surrogate.pyto use helper functions and eliminate nested function definitions
Reviewed changes
Copilot reviewed 20 out of 23 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_utils.py |
New comprehensive tests for find_pareto_front and gp_expected_improvement utility functions |
tests/test_termination.py |
New tests for termination conditions including UnsuccessfulImprovement, RobustCondition, and IterateNTimes |
tests/test_optimize_result.py |
New tests for OptimizeResult class initialization, init(), and init_best_values() methods |
tests/test_integrations.py |
New tests for pymoo and NOMAD integration wrappers |
tests/model/test_surrogate.py |
New tests verifying surrogate model interface and implementations |
tests/model/test_rbf.py |
New tests for RBF model basis functions and configuration |
tests/model/test_gp.py |
New tests for Gaussian Process model and expected improvement calculation |
tests/acquisition/utils.py |
Extracted mock surrogate classes from test file for reusability |
tests/acquisition/test_*.py |
Split monolithic acquisition tests into focused modules per acquisition function |
tests/test_optimize_convergence.py |
Added pytest markers and reordered imports |
tests/test_optimize.py |
Added pytest markers for slow integration tests |
tests/test_examples.py |
Added pytest markers for slow integration tests |
tests/test_docs.py |
Added pytest markers and reordered imports |
soogo/acquisition/minimize_surrogate.py |
Refactored to use top-level helper functions instead of nested closures |
pyproject.toml |
Added pytest configuration with markers, timeout settings, and updated source includes |
.github/workflows/python-package.yml |
Split test execution into fast and slow tests with different timeout configurations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Avoid creating a full copy of x on every call of _eval_with_replacement Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.