Skip to content

Comments

Try improve test coverage#15

Merged
weslleyspereira merged 6 commits intoNatLabRockies:mainfrom
weslleyspereira:try-improve-test-coverage
Jan 5, 2026
Merged

Try improve test coverage#15
weslleyspereira merged 6 commits intoNatLabRockies:mainfrom
weslleyspereira:try-improve-test-coverage

Conversation

@weslleyspereira
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a 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 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.py to 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.

weslleyspereira and others added 2 commits January 2, 2026 11:13
Avoid creating a full copy of x on every call of _eval_with_replacement

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@weslleyspereira weslleyspereira marked this pull request as ready for review January 5, 2026 15:37
@weslleyspereira weslleyspereira merged commit b2a96b0 into NatLabRockies:main Jan 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant