Skip to content

Implement consistent model merging across the codebase #806

@coderabbitai

Description

@coderabbitai

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:

  1. Consider creating a unified merge_models(tdef, tscenario) function or similar utility
  2. Apply the smarter merge approach consistently for all relevant model fields
  3. Ensure the merging hierarchy is clear and well-documented

This would provide a friendlier and more intuitive user experience when overriding configuration values.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions