projectsyn / reclass-rs

Reimplementation of https://github.com/kapicorp/reclass in Rust with Python bindings through PyO3.
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Allow disabling reclass-rs diagnostic messages for unknown config options #106

Closed simu closed 6 months ago

simu commented 6 months ago

We introduce a new optional boolean parameter verbose which controls whether diagnostic messages for unknown config options are printed for the Python classmethods Config.from_dict() and Reclass.from_config_file().

This parameter is passed to Config::load_from_file() and Config::set_option(). Since the new parameter isn't optional for either of these methods, this change is breaking for Rust clients that use Config::load_from_file().

If Python callers don't provide the new optional parameter, it defaults to false which disables the diagnostic messages.

Checklist

github-actions[bot] commented 6 months ago

Benchmark for c5ba145

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1647.9±128.00µs | 1632.5±108.61µs | -0.93% | | Reclass::inventory() single-threaded | **3.6±0.04ms** | 3.7±0.11ms | **+2.78%** |
github-actions[bot] commented 6 months ago

Benchmark for 3992520

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1611.5±52.11µs | 1652.8±126.59µs | +2.56% | | Reclass::inventory() single-threaded | 3.6±0.04ms | 3.6±0.13ms | 0.00% |