MAJOR IMPROVEMENT: Single source of truth for all system paths
Now to change NX version or Python environment, edit ONE file (config.py):
NX_VERSION = "2412" # Change this for NX updates
PYTHON_ENV_NAME = "atomizer" # Change this for env updates
All code automatically uses new paths - no manual file hunting!
New Central Configuration (config.py):
- NX_VERSION: Automatically updates all NX paths
- NX_INSTALLATION_DIR: Derived from version
- NX_RUN_JOURNAL: Path to run_journal.exe
- NX_MATERIAL_LIBRARY: Path to physicalmateriallibrary.xml
- NX_PYTHON_STUBS: Path to Python stubs for intellisense
- PYTHON_ENV_NAME: Python environment name
- PROJECT_ROOT: Auto-detected project root
- Helper functions: get_nx_journal_command(), validate_config(), print_config()
Updated Files to Use Config:
- optimization_engine/nx_updater.py: Uses NX_RUN_JOURNAL from config
- dashboard/api/app.py: Uses NX_RUN_JOURNAL from config
- Both have fallbacks if config unavailable
Benefits:
1. Change NX version in 1 place, not 10+ files
2. Automatic validation of paths on import
3. Helper functions for common operations
4. Clear error messages if paths missing
5. Easy to add new Simcenter versions
Future NX Update Process:
1. Edit config.py: NX_VERSION = "2506"
2. Run: python config.py (verify paths)
3. Done! All code uses NX 2506
Migration Scripts Included:
- migrate_to_config.py: Full migration with documentation
- apply_config_migration.py: Applied to update dashboard
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>