fix: expose AZP variants in region API#514
Open
samay2504 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
=====================================
Coverage 76.9% 76.9%
=====================================
Files 29 29
Lines 3700 3700
=====================================
Hits 2846 2846
Misses 854 854
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR aims to make existing AZP “variant” implementations importable from the public spopt.region API (e.g., from spopt.region import AZPBasicTabu) and adds a small regression test to lock in that import behavior.
Changes:
- Re-export
AZPBasicTabu,AZPReactiveTabu, andAZPSimulatedAnnealingfromspopt.region.__init__. - Update AZP tests to import the new public symbols.
- Add a regression test asserting the symbols are exposed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
spopt/region/__init__.py |
Re-exports AZP variant symbols from the package-level public API. |
spopt/tests/test_region/test_azp.py |
Adds/updates tests to validate (at least nominally) that the new imports work. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| from .azp import AZP | |||
| from .azp import AZP, AZPBasicTabu, AZPReactiveTabu, AZPSimulatedAnnealing | |||
| @@ -1,4 +1,4 @@ | |||
| from .azp import AZP | |||
| from .azp import AZP, AZPBasicTabu, AZPReactiveTabu, AZPSimulatedAnnealing | |||
Comment on lines
+21
to
+25
| assert AZPBasicTabu is not None | ||
| assert AZPReactiveTabu is not None | ||
| assert AZPSimulatedAnnealing is not None | ||
|
|
||
|
|
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.
This PR exposes the existing AZP variant solvers in the public region API so users can import
AZPSimulatedAnnealing,AZPBasicTabu, andAZPReactiveTabudirectly fromspopt.region, and it adds a focused regression test to lock that import behaviour in place; the change is intentionally minimal and only surfaces already implemented classes without altering solver logic.