Skip to content

fix: expose AZP variants in region API#514

Open
samay2504 wants to merge 1 commit into
pysal:mainfrom
samay2504:fix/expose-azp-variants
Open

fix: expose AZP variants in region API#514
samay2504 wants to merge 1 commit into
pysal:mainfrom
samay2504:fix/expose-azp-variants

Conversation

@samay2504

Copy link
Copy Markdown

This PR exposes the existing AZP variant solvers in the public region API so users can import AZPSimulatedAnnealing, AZPBasicTabu, and AZPReactiveTabu directly from spopt.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.

Copilot AI review requested due to automatic review settings April 11, 2026 16:49
@codecov

codecov Bot commented Apr 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.9%. Comparing base (9b36063) to head (4744d69).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #514   +/-   ##
=====================================
  Coverage   76.9%   76.9%           
=====================================
  Files         29      29           
  Lines       3700    3700           
=====================================
  Hits        2846    2846           
  Misses       854     854           
Files with missing lines Coverage Δ
spopt/region/__init__.py 100.0% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

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 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, and AZPSimulatedAnnealing from spopt.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.

Comment thread spopt/region/__init__.py
@@ -1,4 +1,4 @@
from .azp import AZP
from .azp import AZP, AZPBasicTabu, AZPReactiveTabu, AZPSimulatedAnnealing
Comment thread spopt/region/__init__.py
@@ -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


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.

2 participants