Skip to content

Extend configurable params for std-container types#15525

Merged
sawenzel merged 6 commits into
AliceO2Group:devfrom
f3sch:cfg/dynamic
Jun 26, 2026
Merged

Extend configurable params for std-container types#15525
sawenzel merged 6 commits into
AliceO2Group:devfrom
f3sch:cfg/dynamic

Conversation

@f3sch

@f3sch f3sch commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Add support for std container types (not nested, see ConfigurableParamTest.h) and on failure to parse offers suggestions for closest matching setting via Damerau-Levenshtein metric:

[FATAL] Inexistent ConfigurableParam key: ITSCATrackerParam.addTimeEror[1]. Did you mean 'ITSCATrackerParam.addTimeError[1]'?

f3sch and others added 3 commits June 14, 2026 16:04
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
Please consider the following formatting changes to AliceO2Group#15525
@f3sch f3sch marked this pull request as ready for review June 15, 2026 07:16
@f3sch f3sch requested a review from sawenzel as a code owner June 15, 2026 07:16
…parseSet

Follow-up hardening on top of the std-container ConfigurableParam support.

1. split() no longer silently drops empty fields. A stray delimiter such as
   "[1,,3]" previously parsed to a 2-element vector with no error, and "key:"
   collapsed an empty map value away. Both now produce an empty token that is
   rejected by parseScalar / the map-syntax check, so malformed configuration
   surfaces as an error instead of corrupting element counts. The empty
   container case ("[]" / "{}") is still short-circuited by the callers before
   split() runs, so well-formed input is unaffected.

2. Removed the redundant parseSet() branch (and the now-unused HasPushBack
   concept). Every non-map Container already satisfies SequenceContainer, so the
   parseSet dispatch was reached for all sequence and set types and re-parsed the
   string into a throwaway std::vector before copying element-by-element.
   parseSequence inserts at end(), which std::set / std::unordered_set accept
   just as well, so all non-map containers now share a single, single-pass path.

3. Re-enabled cleanup of test_config.root in ConfigurableParam_Container_FileIO_ROOT
   (the std::remove was left commented out), restoring test isolation.

Adds regression tests: set/unordered_set/list/deque parsing through the unified
parseSequence path (incl. set de-duplication), and rejection of empty tokens in
both sequence and map parsing.

Note: container parse failures remain non-fatal (logged), matching the existing
scalar setValue behaviour; this commit does not change that contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sawenzel

Copy link
Copy Markdown
Collaborator

Very nice development. Maybe you could take quick look at suggested improvements from Claude code via PR to your branch. But we can also discard it if you think the findings are not relevant. Just let me know.

ConfigurableParam: reject malformed container fields, drop redundant parseSet
@f3sch

f3sch commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

Ha indeed thanks, claude trimmed the parsing logic nicely!
The rest I also agree with, I will pull it and lets see if the CI parses :)

@sawenzel sawenzel merged commit 4d3c046 into AliceO2Group:dev Jun 26, 2026
11 checks passed
@f3sch f3sch deleted the cfg/dynamic branch June 26, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants