Commit 493ca97
authored
Feature/Improve Configuration options and handling (#385)
* Refactor configuration management: remove dataclass-based schema and simplify CONFIG structure.
* Refactor configuration loading: switch from `os` to `pathlib`, streamline YAML loading logic.
* Refactor logging setup: split handler creation into dedicated functions, simplify configuration logic.
* Improve logging configurability and safety
- Add support for `RotatingFileHandler` to prevent large log files.
- Introduce `console` flag for optional console logging.
- Default to `NullHandler` when no handlers are configured for better library behavior.
* Temp
* Temp
* Temp
* Temp
* Temp
* Temp
* Refactor configuration and logging: remove unused `merge_configs` function, streamline logging setup, and encapsulate `_setup_logging` as an internal function.
* Remove unused `change_logging_level` import and export.
* Add tests for config.py
* Expand `config.py` test coverage: add tests for custom config loading, logging setup, dict roundtrip, and attribute modification.
* Expand `test_config.py` coverage: add modeling config persistence test, refine logging reset, and improve partial config load assertions.
* Expand `test_config.py` coverage: add teardown for state cleanup and reset modeling config in setup.
* Add `CONFIG.reset()` method and expand test coverage to verify default restoration
* Refactor `CONFIG` to centralize defaults in `_DEFAULTS` and ensure `reset()` aligns with them; add test to verify consistency.
* Refactor `_DEFAULTS` to use `MappingProxyType` for immutability, restructure config hierarchy, and simplify `reset()` implementation for maintainability; update tests accordingly.
* Mark `TestConfigModule` tests to run in a single worker with `@pytest.mark.xdist_group` to prevent global config interference.
* Add default log file
* Update CHANGELOG.md
* Readd change_logging_level() for backwards compatability
* Add more options to config.py
* Add a docstring to config.y
* Add a docstring to config.y
* rename parameter message_format
* Improve color config
* Improve color config
* Update CHANGELOG.md
* Improve color handling
* Improve color handling
* Remove console Logging explicityl from examples
* Make log to console the default
* Make log to console the default
* Add individual level parameters for console and file
* Add extra Handler section
* Use dedicated levels for both handlers
* Switch back to not use Handlers
* Revert "Switch back to not use Handlers"
This reverts commit 05bbccb.
* Revert "Use dedicated levels for both handlers"
This reverts commit ed0542b.
* Revert "Add extra Handler section"
This reverts commit a133cc8.
* Revert "Add individual level parameters for console and file"
This reverts commit 19f81c9.
* Fix CHANGELOG.md1 parent 5e66d50 commit 493ca97
9 files changed
Lines changed: 995 additions & 223 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
| 60 | + | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
| |||
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments