-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Context
In PR #795, we implemented smarter field merging for the nsys configuration by using exclude_unset=True in the model_dump() call. This allows partial overrides of nsys fields in scenario configurations while preserving base values from test definitions.
A similar approach was previously used for reports. However, the current approach for most other fields is "all or nothing" - meaning everything should be set at one level or another.
Proposal
Implement a consistent model merging strategy across the codebase:
- Consider creating a unified
merge_models(tdef, tscenario)function or similar utility - Apply the smarter merge approach consistently for all relevant model fields
- Ensure the merging hierarchy is clear and well-documented
This would provide a friendlier and more intuitive user experience when overriding configuration values.
References
- PR: Fix
nsyssubfield merging behavior #795 - Discussion: Fix
nsyssubfield merging behavior #795 (comment) - Requested by: @amaslenn
- Related discussion with: @podkidyshev, @juntaowww
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels