refactor: modularize libneo_coordinates with proper OOP architecture#235
refactor: modularize libneo_coordinates with proper OOP architecture#235krystophny wants to merge 2 commits intomainfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
47a0acd to
4288583
Compare
Replace monolithic merged file with clean module hierarchy: - libneo_coordinates_base.f90: abstract coordinate_system_t type - libneo_coordinates_vmec.f90: VMEC coordinate system implementation - libneo_coordinates_geoflux.f90: Geoflux coordinate system implementation - libneo_coordinates_chartmap.f90: Chartmap coordinate system implementation - libneo_coordinates_validator.f90: Chartmap file validation - libneo_coordinates_file_detection.f90: Reference coordinate file detection - libneo_coordinates.f90: Facade module re-exporting all public API Also: - Fix fpm.toml invalid dependency syntax (system libs via external-modules) - Add bind.toml for fpm-bind Python binding generation - Update CMakeSources.in for new modular structure All 70 tests pass with both CMake and FPM builds.
4288583 to
0995e1f
Compare
Add tests to ensure refactoring doesn't change behavior: - test_vector_conversion: Tests base class cov_to_cart/ctr_to_cart - Unit vector to basis vector mapping - Linearity verification - Norm preservation - cart->ctr->cart and cart->cov->cart roundtrips - test_geoflux_coordinate_system: Tests geoflux OOP wrapper - evaluate_cyl matches underlying module - evaluate_cart consistency with cyl_to_cart - Coordinate roundtrip u->cyl->u->cyl - Covariant basis finite difference verification - Metric tensor properties (symmetry, g*ginv=I, positive sqrtg) - Enhanced test_vmec_coordinate_system: - evaluate_cart consistency check - Covariant basis finite difference verification - Full metric tensor property checks All 76 tests pass.
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
Summary
Changes
Replace
libneo_coordinates_merged.f90(1164 lines) with proper OOP modules:libneo_coordinates_basecoordinate_system_ttype + constantslibneo_coordinates_vmeclibneo_coordinates_geofluxlibneo_coordinates_chartmaplibneo_coordinates_validatorlibneo_coordinates_file_detectionlibneo_coordinatesTest plan
PR Type
Enhancement
Description
Refactor monolithic libneo_coordinates into modular OOP architecture
Fix FPM build compatibility issues
Update build configuration for new modular structure
Diagram Walkthrough
File Walkthrough
7 files
Convert to facade module re-exporting public APIConvert submodule to standalone moduleConvert submodule to standalone moduleConvert submodule to standalone moduleConvert submodule to standalone moduleConvert submodule to standalone moduleDelete monolithic merged file2 files
New module with abstract types and constantsAdd fpm-bind Python binding configuration1 files
Update build sources for modular structure1 files
Fix FPM dependency syntax and add external modules