You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Include Unchanged Values in DeepDiff Report
I'm looking for a way to retrieve all attributes, including those that haven't changed. I might be missing a method to achieve this, and I'm feeling a bit stuck... so i have this feature request.
Overview
I would like to propose a new feature for the deepdiff library that would enhance its reporting capabilities by including unchanged values in the comparison report. Currently, deepdiff provides detailed reports on changed items, but it does not explicitly list the values that remain unchanged between data structures.
Benefits
Comprehensive Reporting: Users will be able to see not only what has changed but also what remains the same, providing a fuller picture of the differences.
Enhanced Transparency: By including unchanged values, users can better understand the complete context of the comparison.
Proposed Feature code adjustments
Add optional add_unchanged Parameter
Introduce an optional parameter, add_unchanged, to the DeepDiff class. This parameter should control whether unchanged values are included in the comparison report.
Parameter Name:add_unchanged
Type:bool
Default Value:False
Description: When set to True, unchanged values will be included in the report.
Modify the _diff method to include unchanged values in the report if the add_unchanged parameter is set to True. The method should handle the inclusion of these values and ensure they are properly reported.
Update the REPORT_KEYS dictionary to add an entry for values_unchanged, so the new report type is recognized and handled appropriately.
REPORT_KEYS= {
...
"values_unchanged"
}
Enhance Result Classes
Extend the TextResult handling classe (DeltaResult should not have unchanged values and TreeResult should work whitout changes) to include support for the values_unchanged key. This will involve:
Adding a values_unchanged key to the initialization of the result dictionaries.
Implementing logic to populate and handle unchanged values in the results.
Feature Request: Include Unchanged Values in DeepDiff Report
I'm looking for a way to retrieve all attributes, including those that haven't changed. I might be missing a method to achieve this, and I'm feeling a bit stuck... so i have this feature request.
Overview
I would like to propose a new feature for the
deepdiff
library that would enhance its reporting capabilities by including unchanged values in the comparison report. Currently,deepdiff
provides detailed reports on changed items, but it does not explicitly list the values that remain unchanged between data structures.Benefits
Proposed Feature code adjustments
Add optional
add_unchanged
ParameterIntroduce an optional parameter,
add_unchanged
, to theDeepDiff
class. This parameter should control whether unchanged values are included in the comparison report.add_unchanged
bool
False
True
, unchanged values will be included in the report.Update
_diff
MethodModify the
_diff
method to include unchanged values in the report if theadd_unchanged
parameter is set toTrue
. The method should handle the inclusion of these values and ensure they are properly reported.Modify
REPORT_KEYS
Update the
REPORT_KEYS
dictionary to add an entry forvalues_unchanged
, so the new report type is recognized and handled appropriately.Enhance Result Classes
Extend the
TextResult
handling classe (DeltaResult
should not have unchanged values andTreeResult
should work whitout changes) to include support for thevalues_unchanged
key. This will involve:values_unchanged
key to the initialization of the result dictionaries.TextResult adjustments
The text was updated successfully, but these errors were encountered: