seperman / deepdiff

DeepDiff: Deep Difference and search of any Python object/data. DeepHash: Hash of any object based on its contents. Delta: Use deltas to reconstruct objects by adding deltas together.
http://zepworks.com
Other
2.03k stars 224 forks source link

Add print() option #492

Closed AaronDMarasco closed 1 month ago

AaronDMarasco commented 1 month ago

Allows a user-defined string (or callback function) to prefix every output when using the pretty() call.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.55%. Comparing base (111a2eb) to head (5f22bd2). Report is 2 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #492 +/- ## ======================================= Coverage 96.55% 96.55% ======================================= Files 14 14 Lines 3946 3950 +4 ======================================= + Hits 3810 3814 +4 Misses 136 136 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

AaronDMarasco commented 1 month ago

I'd say just take as-is then.

Our use case is that we ship a config file and then let the user write one that overrides. Then we dump the diff of the config data structure to the logs, so when they have issues we can see in the logs what may have been a dangerous change.

seperman commented 1 month ago

@AaronDMarasco For that purpose, we have Delta Serialize To Flat Rows.

AaronDMarasco commented 1 month ago

@AaronDMarasco For that purpose, we have Delta Serialize To Flat Rows.

Thanks; I'll read into that more later this week.