Skip to content

fix: #904 - [E2-F3-P1] Module Integration and Exports#910

Merged
Gorkowski merged 2 commits intouncscode:mainfrom
Gorkowski:issue-904-adw-fa1202d7
Jan 21, 2026
Merged

fix: #904 - [E2-F3-P1] Module Integration and Exports#910
Gorkowski merged 2 commits intouncscode:mainfrom
Gorkowski:issue-904-adw-fa1202d7

Conversation

@Gorkowski
Copy link
Collaborator

Target Branch: main

Fixes #904 | Workflow: fa1202d7

Summary

Adds import verification coverage that ensures the activity and equilibria APIs introduced in prior phases remain reachable through the recommended import particula as par pattern and that the legacy equilibria helper continues to warn and delegate. These regression guards catch accidental export regressions without modifying the core package surfaces.

What Changed

New Components

  • particula/tests/import_test.py - Co-located regression tests that assert par.particles exposes the new activity strategy/builder pair, par.equilibria exposes the equilibria strategy/builder/factory/runnable/result classes, and the legacy liquid_vapor_partitioning helper still emits DeprecationWarning while invoking a monkeypatched sentinel implementation.

Modified Components

  • None (tests only).

Tests Added/Updated

  • particula/tests/import_test.py - Covers activity exports, equilibria exports, and the legacy deprecation warning/delegation flow.

How It Works

Each test imports particula as par and performs lightweight hasattr assertions so confirmed exports are accessible from the package-level namespaces. The legacy warning test monkeypatches the private liquid_vapor_partitioning implementation to a sentinel callable, wraps the call in pytest.warns(DeprecationWarning), and verifies the sentinel was executed to prove delegation while still surfacing the warning.

Implementation Notes

  • Why this approach: Regression tests are sufficient because no surface exports changed in this phase; the goal is to prevent accidental regressions in future refactors.
  • Legacy behavior: Monkeypatching the internal helper avoids signature mismatches while still ensuring the warning and delegation contract are honored.

Testing

  • Unit tests: pytest particula/tests/import_test.py
  • Manual verification: None beyond the automated regression test run

Copilot AI review requested due to automatic review settings January 20, 2026 21:48
@Gorkowski Gorkowski added agent Created or managed by ADW automation blocked Blocked - review required before ADW can process labels Jan 20, 2026
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 adds regression tests to ensure that activity and equilibria APIs remain accessible through the standard import particula as par pattern and that legacy deprecation warnings function correctly.

Changes:

  • Added particula/tests/import_test.py with three regression test functions covering activity exports, equilibria exports, and legacy deprecation behavior
  • Tests use hasattr assertions to verify exports are reachable via package namespaces
  • Legacy test uses monkeypatching to verify deprecation warning emission and delegation flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add consolidated import regression tests under particula/tests/import_test.py for activity and equilibria surfaces reachable via `import particula as par`. Validate activity strategy and builder exposure, equilibria strategy/builder/factory/runnable containers, and legacy liquid_vapor_partitioning warning plus delegation through a monkeypatched sentinel.

Closes uncscode#904

ADW-ID: fa1202d7
Successfully fixed:
- Added error handling in parse_input()
- Fixed test_validate_input assertion
- Resolved unused import lint error

ADW-ID: fa1202d7
@Gorkowski Gorkowski force-pushed the issue-904-adw-fa1202d7 branch from 8717489 to 93d7877 Compare January 21, 2026 02:14
@Gorkowski Gorkowski merged commit 5b1856b into uncscode:main Jan 21, 2026
7 checks passed
@Gorkowski Gorkowski deleted the issue-904-adw-fa1202d7 branch January 21, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Created or managed by ADW automation blocked Blocked - review required before ADW can process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[E2-F3-P1] Module Integration and Exports

1 participant