Skip to content

3.6.0 - 2025-11-15

Previous: 3.5.0 | 📋 All Releases | 🏷️ GitHub Release


Summary: Type system overhaul and migration to loguru for logging. If you are heavily using our logs, this might be breaking!

If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.

✨ Added

  • New type system (flixopt/types.py):
    • Introduced dimension-aware type aliases using suffix notation (_TPS, _PS, _S) to clearly indicate which dimensions data can have
    • Added Numeric_TPS, Numeric_PS, Numeric_S for numeric data with Time/Period/Scenario dimensions
    • Added Bool_TPS, Bool_PS, Bool_S for boolean data with dimension support
    • Added Effect_TPS, Effect_PS, Effect_S for effect dictionaries with dimension support
    • Added Scalar type for scalar-only numeric values
    • Added NumericOrBool utility type for internal use
    • Type system supports scalars, numpy arrays, pandas Series/DataFrames, and xarray DataArrays
  • Lazy logging evaluation - expensive log operations only execute when log level is active
  • CONFIG.Logging.verbose_tracebacks option for detailed debugging with variable values

💥 Breaking Changes

  • Logging framework: Migrated to loguru
    • Removed CONFIG.Logging parameters: rich, Colors, date_format, format, console_width, show_path, show_logger_name
    • For advanced formatting, use loguru's API directly after CONFIG.apply()

♻️ Changed

  • Code structure: Removed commons.py module and moved all imports directly to __init__.py for cleaner code organization (no public API changes)
  • Type handling improvements: Updated internal data handling to work seamlessly with the new type system

🐛 Fixed

  • Fixed ShareAllocationModel inconsistency where None/inf conversion happened in __init__ instead of during modeling, which could cause issues with parameter validation
  • Fixed numerous type hint inconsistencies across the codebase

📦 Dependencies

  • Updated mkdocs-material to v9.6.23
  • Replaced rich >= 13.0.0 with loguru >= 0.7.0 for logging

📝 Docs

  • Enhanced documentation in flixopt/types.py with comprehensive examples and dimension explanation table
  • Clarified Effect type docstrings - Effect types are dicts, but single numeric values work through union types
  • Added clarifying comments in effects.py explaining parameter handling and transformation
  • Improved OnOffParameters attribute documentation
  • Updated getting-started guide with loguru examples
  • Updated config.py docstrings for loguru integration

👷 Development

  • Added test for FlowSystem resampling

Previous: 3.5.0 | 📋 All Releases | 🏷️ GitHub Release