Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

simu
Copy link
Member

@simu simu commented Feb 23, 2024

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

  • The PR has a meaningful title. The title will be used to auto generate the changelog
  • PR contains a single logical change (to build a better changelog).
  • Update the documentation.
  • Update tests.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency, internal
    as they show up in the changelog
  • Link this PR to related PRs or issues.

@simu simu added the breaking label Feb 23, 2024

This comment was marked as outdated.

@simu simu requested a review from a team February 23, 2024 17:00
@simu simu force-pushed the feat/reclass-from-config branch 2 times, most recently from a811cd0 to 4d7236b Compare February 26, 2024 10:17
Base automatically changed from feat/reclass-from-config to main February 26, 2024 12:12
…ions

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

If Python callers don't provide the new optional parameter, it defaults
to `false` which disables the diagnostic messages.
@simu simu force-pushed the feat/controllable-config-loading-verbosity branch from 3cdadd5 to 6715520 Compare February 26, 2024 12:27
Copy link

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%

@simu simu merged commit ffb0d96 into main Feb 26, 2024
18 checks passed
@simu simu deleted the feat/controllable-config-loading-verbosity branch February 26, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants