Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
10452f9
Refactor configuration management: remove dataclass-based schema and …
FBumann Sep 30, 2025
22cd3a8
Refactor configuration loading: switch from `os` to `pathlib`, stream…
FBumann Sep 30, 2025
20c1c68
Refactor logging setup: split handler creation into dedicated functio…
FBumann Oct 1, 2025
bb15360
Improve logging configurability and safety
FBumann Oct 1, 2025
db9a8ec
Temp
FBumann Oct 1, 2025
469f46e
Temp
FBumann Oct 1, 2025
7620d5e
Temp
FBumann Oct 1, 2025
0ee41bc
Temp
FBumann Oct 1, 2025
f9358a0
Temp
FBumann Oct 1, 2025
845ff86
Temp
FBumann Oct 1, 2025
153c64d
Refactor configuration and logging: remove unused `merge_configs` fun…
FBumann Oct 1, 2025
ea99bc0
Remove unused `change_logging_level` import and export.
FBumann Oct 1, 2025
6b76aab
Add tests for config.py
FBumann Oct 1, 2025
314b1e4
Expand `config.py` test coverage: add tests for custom config loading…
FBumann Oct 1, 2025
0a7a945
Expand `test_config.py` coverage: add modeling config persistence tes…
FBumann Oct 1, 2025
fb2ad91
Expand `test_config.py` coverage: add teardown for state cleanup and …
FBumann Oct 1, 2025
f105620
Add `CONFIG.reset()` method and expand test coverage to verify defaul…
FBumann Oct 1, 2025
76fe507
Refactor `CONFIG` to centralize defaults in `_DEFAULTS` and ensure `r…
FBumann Oct 1, 2025
485ea91
Refactor `_DEFAULTS` to use `MappingProxyType` for immutability, rest…
FBumann Oct 1, 2025
0ea4716
Mark `TestConfigModule` tests to run in a single worker with `@pytest…
FBumann Oct 1, 2025
4fc9480
Add default log file
FBumann Oct 1, 2025
c034f2f
Update CHANGELOG.md
FBumann Oct 4, 2025
b05dc79
Readd change_logging_level() for backwards compatability
FBumann Oct 4, 2025
20c2f09
Merge branch 'main' into feature/config
FBumann Oct 9, 2025
a0828b3
Add more options to config.py
FBumann Oct 9, 2025
243a602
Add a docstring to config.y
FBumann Oct 9, 2025
763d7e4
Add a docstring to config.y
FBumann Oct 9, 2025
98005c3
rename parameter message_format
FBumann Oct 9, 2025
36ac7d3
Improve color config
FBumann Oct 9, 2025
f1b321d
Improve color config
FBumann Oct 9, 2025
c22315f
Update CHANGELOG.md
FBumann Oct 9, 2025
41fe859
Improve color handling
FBumann Oct 9, 2025
804774e
Improve color handling
FBumann Oct 9, 2025
5295e81
Remove console Logging explicityl from examples
FBumann Oct 9, 2025
50d7d00
Make log to console the default
FBumann Oct 9, 2025
882d27a
Make log to console the default
FBumann Oct 9, 2025
19f81c9
Add individual level parameters for console and file
FBumann Oct 9, 2025
a133cc8
Add extra Handler section
FBumann Oct 9, 2025
ed0542b
Use dedicated levels for both handlers
FBumann Oct 9, 2025
05bbccb
Switch back to not use Handlers
FBumann Oct 9, 2025
c09d208
Revert "Switch back to not use Handlers"
FBumann Oct 9, 2025
78ce6ba
Revert "Use dedicated levels for both handlers"
FBumann Oct 9, 2025
00e93d7
Revert "Add extra Handler section"
FBumann Oct 9, 2025
516da6d
Revert "Add individual level parameters for console and file"
FBumann Oct 9, 2025
931971e
Fix CHANGELOG.md
FBumann Oct 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,23 @@ Please keep the format of the changelog consistent with the other releases, so t
## [Unreleased] - ????-??-??

### ✨ Added
- Added `CONFIG.reset()` method to restore configuration to default values
- Added configurable log file rotation settings: `CONFIG.Logging.max_file_size` and `CONFIG.Logging.backup_count`
- Added configurable log format settings: `CONFIG.Logging.date_format` and `CONFIG.Logging.format`
- Added configurable console settings: `CONFIG.Logging.console_width` and `CONFIG.Logging.show_path`
- Added `CONFIG.Logging.Colors` nested class for customizable log level colors using ANSI escape codes (works with both standard and Rich handlers)

### 💥 Breaking Changes

### ♻️ Changed
- Using `h5netcdf` instead of `netCDF4` for dataset I/O operations. This follows the update in `xarray==2025.09.01`
- Logging and Configuration management changed

### 🗑️ Deprecated
- `change_logging_level()` function is now deprecated in favor of `CONFIG.Logging.level` and `CONFIG.apply()`. Will be removed in version 3.0.0.

### 🔥 Removed
- Removed unused `config.merge_configs` function from configuration module


### 🐛 Fixed

Expand All @@ -61,6 +69,8 @@ Please keep the format of the changelog consistent with the other releases, so t
### 📝 Docs

### 👷 Development
- Greatly expanded test coverage for `config.py` module
- Added `@pytest.mark.xdist_group` to `TestConfigModule` tests to prevent global config interference

### 🚧 Known Issues

Expand All @@ -78,6 +88,7 @@ Until here -->

### 📦 Dependencies
- Updated `renovate.config` to treat CalVer packages (xarray and dask) with more care
- Updated packaging configuration

---

Expand Down
2 changes: 0 additions & 2 deletions flixopt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@
results,
solvers,
)

CONFIG.load_config()
4 changes: 2 additions & 2 deletions flixopt/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def main_results(self) -> dict[str, Scalar | dict]:
model.label_of_element: float(model.size.solution)
for component in self.flow_system.components.values()
for model in component.model.all_sub_models
if isinstance(model, InvestmentModel) and float(model.size.solution) >= CONFIG.modeling.EPSILON
if isinstance(model, InvestmentModel) and float(model.size.solution) >= CONFIG.Modeling.epsilon
},
'Not invested': {
model.label_of_element: float(model.size.solution)
for component in self.flow_system.components.values()
for model in component.model.all_sub_models
if isinstance(model, InvestmentModel) and float(model.size.solution) < CONFIG.modeling.EPSILON
if isinstance(model, InvestmentModel) and float(model.size.solution) < CONFIG.Modeling.epsilon
},
},
'Buses with excess': [
Expand Down
Loading