You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve module name mismatch causing Integration Test failures on Windows
**Critical Module Name Fixes:**
- Fix Rust PyO3 module name: change #[pymodule] fn demopy_gb_jj to #[pymodule] fn _rust
- Update Python module import: change from demopy_gb_jj._rust to demopy._rust
- Align module structure with maturin configuration: module-name = 'demopy._rust'
- Resolve PyInit symbol mismatch that prevented module import on Windows
**Package Structure Alignment:**
- Package name: demopy_gb_jj (in pyproject.toml)
- Python module path: python/demopy/
- Rust module name: _rust (matches module-name config)
- Import statement: import demopy (works correctly)
- Rust extension import: demopy._rust (internal, automatic)
**Comprehensive Integration Testing:**
- Create scripts/test_integration.py for complete package validation
- Test package import, functionality, wheel installation, and fallback behavior
- Verify both Rust extension and Python fallback implementations work correctly
- Add wheel installation testing in clean virtual environment
**CI Workflow Improvements:**
- Update Integration Test workflow to properly test module import after build
- Fix fallback testing to use correct module name (demopy._rust instead of demopy_gb_jj._rust)
- Add comprehensive verification steps after maturin develop
- Include integration test execution in CI pipeline
**Expected Resolution:**
- Integration Test workflow should complete successfully on all platforms (Ubuntu, Windows, macOS)
- maturin build should create wheels with correct module structure
- import demopy should work without ModuleNotFoundError
- Both Rust extension and Python fallback should function correctly
- All Python versions (3.8-3.13) should be supported
**Root Cause:** Module naming inconsistency between package name (demopy_gb_jj), Rust module name (demopy_gb_jj), expected module structure (demopy._rust), and actual import path (demopy). The PyO3 module name must match the module-name configuration in pyproject.toml.
**Solution:** Align all module names: Rust module _rust, Python import demopy._rust, maturin config demopy._rust, maintaining backward compatibility with import demopy.
0 commit comments