Skip to content

Conversation

@SoulEvill
Copy link
Contributor

Summary

Consolidates the duplicate factory implementations (factory.py and factory_.py) into a single, well-organized module to eliminate code duplication and improve maintainability.

Changes Made

  • Merged Factory class from factory_.py into factory.py
  • Merged _default_input_converter function from factory_.py into factory.py
  • Updated import statements in factory_wrapper.py and factory_executor_manager.py
  • Removed duplicate factory_.py file
  • Added __all__ exports for clean public interface
  • Fixed circular import issues using TYPE_CHECKING and local imports
  • Preserved all existing functionality - no breaking changes

Test Results

All existing tests pass successfully:

  • ✅ 22 tests passed
  • ⏸️ 2 tests skipped (existing behavior)
  • 🚫 0 tests failed

Acceptance Criteria Verification

  • Single Source File: Only factory.py exists after completion
  • Backward Compatibility: All existing public APIs continue to work without changes
  • Test Compatibility: All existing tests pass with minimal modifications (only import updates)
  • Import Consistency: All internal imports throughout the codebase are updated and functional
  • Functionality Preservation: No existing functionality is lost or altered
  • Clean Exports: Module clearly defines its public interface via __all__
  • Documentation: Module has clear docstrings explaining its purpose and usage

Impact

  • Eliminates developer confusion about which file to modify
  • Reduces maintenance burden by having a single source of truth
  • Maintains complete backward compatibility
  • No changes required for existing test files or user code

🤖 Generated with Claude Code

SoulEvill and others added 2 commits June 28, 2025 12:04
- Consolidate Factory class and _default_input_converter from factory_.py into factory.py
- Update imports in factory_wrapper.py and factory_executor_manager.py
- Remove duplicate factory_.py file
- Add __all__ exports for clean public interface

Addresses issue #60: eliminates code duplication while preserving all existing functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Use TYPE_CHECKING imports in factory_wrapper.py and factory_executor_manager.py
- Add local import in _not_same_session_factory method to resolve runtime NameError
- All tests now pass successfully (22 passed, 2 skipped)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@SoulEvill SoulEvill closed this Jun 28, 2025
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