Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
seperman committed Dec 16, 2024
1 parent c464e04 commit 737bb5a
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 5 deletions.
11 changes: 9 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,12 @@ Authors in order of the timeline of their contributions:
- [sf-tcalhoun](https://github.com/sf-tcalhoun) for fixing "Instantiating a Delta with a flat_dict_list unexpectedly mutates the flat_dict_list"
- [dtorres-sf](https://github.com/dtorres-sf) for fixing iterable moved items when iterable_compare_func is used.
- [Florian Finkernagel](https://github.com/TyberiusPrime) for pandas and polars support.
- Mathis Chenuet [artemisart](https://github.com/artemisart) for fixing slots classes comparison.
- [Aaron D. Marasco](https://github.com/AaronDMarasco) added `prefix` option to `pretty()`
- Mathis Chenuet [artemisart](https://github.com/artemisart) for fixing slots classes comparison and PR review.
- Sherjeel Shabih [sherjeelshabih](https://github.com/sherjeelshabih) for fixing the issue where the key deep_distance is not returned when both compared items are equal #510
- [Aaron D. Marasco](https://github.com/AaronDMarasco) for adding `prefix` option to `pretty()`
- [Juergen Skrotzky](https://github.com/Jorgen-VikingGod) for adding empty `py.typed`
- [Mate Valko](https://github.com/vmatt) for fixing the issue so we lower only if clean_key is instance of str via #504
- [jlaba](https://github.com/jlaba) for fixing #493 include_paths, when only certain keys are included via #499
- [Doron Behar](https://github.com/doronbehar) for fixing DeepHash for numpy booleans via #496
- [Aaron D. Marasco](https://github.com/AaronDMarasco) for adding print() options which allows a user-defined string (or callback function) to prefix every output when using the pretty() call.
- [David Hotham](https://github.com/dimbleby) for relaxing orderly-set dependency via #486
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@


- v8-1-0
- Fixed slots-classes comparison.
- Removing deprecated lines from setup.py
- Added `prefix` option to `pretty()`
- Relax `orderly-set` dependency.
- Fixes hashing of numpy boolean values.
- Fixes __slots__ comparison when the attribute doesn't exist.
- Relaxing orderly-set reqs
- Added Python 3.13 support
- Only lower if clean_key is instance of str
- Only lower if clean_key is instance of str #504
- Fixes issue where the key deep_distance is not returned when both compared items are equal
- Fixes issue where the key deep_distance is not returned when both compared items are equal #510
- Fixes exclude_paths fails to work in certain cases
- exclude_paths fails to work #509
- Fixes to_json() method chokes on standard json.dumps() kwargs such as sort_keys
- to_dict() method chokes on standard json.dumps() kwargs #490
- Fixes accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty
- In version 8.0.1, accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty #508


- v8-0-1
- Bugfix. Numpy should be optional.
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@ Tested on Python 3.8+ and PyPy3.

Please check the [ChangeLog](CHANGELOG.md) file for the detailed information.

DeepDiff 8-1-0

- Removing deprecated lines from setup.py
- Added `prefix` option to `pretty()`
- Fixes hashing of numpy boolean values.
- Fixes __slots__ comparison when the attribute doesn't exist.
- Relaxing orderly-set reqs
- Added Python 3.13 support
- Only lower if clean_key is instance of str
- Only lower if clean_key is instance of str #504
- Fixes issue where the key deep_distance is not returned when both compared items are equal
- Fixes issue where the key deep_distance is not returned when both compared items are equal #510
- Fixes exclude_paths fails to work in certain cases
- exclude_paths fails to work #509
- Fixes to_json() method chokes on standard json.dumps() kwargs such as sort_keys
- to_dict() method chokes on standard json.dumps() kwargs #490
- Fixes accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty
- In version 8.0.1, accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty #508

DeepDiff 8-0-1

- Bugfix. Numpy should be optional.
Expand Down
5 changes: 4 additions & 1 deletion deepdiff/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from copy import deepcopy, copy
from functools import partial
from collections.abc import Mapping
from typing import Callable
from deepdiff.helper import (
strings,
get_type,
Expand Down Expand Up @@ -306,11 +307,13 @@ def _to_delta_dict(self, directed=True, report_repetition_required=True, always_

return deepcopy(dict(result))

def pretty(self, prefix=None):
def pretty(self, prefix: str | Callable=None):
"""
The pretty human readable string output for the diff object
regardless of what view was used to generate the diff.
prefix can be a callable or a string or None.
Example:
>>> t1={1,2,4}
>>> t2={2,3}
Expand Down
18 changes: 18 additions & 0 deletions docs/authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ Authors in order of the timeline of their contributions:
moved items when iterable_compare_func is used.
- `Florian Finkernagel <https://github.com/TyberiusPrime>`__ for pandas
and polars support.
- Mathis Chenuet `artemisart <https://github.com/artemisart>`__ for
fixing slots classes comparison and PR review.
- Sherjeel Shabih `sherjeelshabih <https://github.com/sherjeelshabih>`__
for fixing the issue where the key deep_distance is not returned when
both compared items are equal #510
- `Juergen Skrotzky <https://github.com/Jorgen-VikingGod>`__ for adding
empty ``py.typed``
- `Mate Valko <https://github.com/vmatt>`__ for fixing the issue so we
lower only if clean_key is instance of str via #504
- `jlaba <https://github.com/jlaba>`__ for fixing #493 include_paths,
when only certain keys are included via #499
- `Doron Behar <https://github.com/doronbehar>`__ for fixing DeepHash
for numpy booleans via #496
- `Aaron D. Marasco <https://github.com/AaronDMarasco>`__ for adding
print() options which allows a user-defined string (or callback
function) to prefix every output when using the pretty() call.
- `David Hotham <https://github.com/dimbleby>`__ for relaxing
orderly-set dependency via #486

.. _Sep Dehpour (Seperman): http://www.zepworks.com
.. _Victor Hahn Castell: http://hahncastell.de
Expand Down
26 changes: 26 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ The DeepDiff library includes the following modules:
What Is New
***********

DeepDiff v8-1-0

- Removing deprecated lines from setup.py
- Added ``prefix`` option to ``pretty()``
- Fixes hashing of numpy boolean values.
- Fixes **slots** comparison when the attribute doesn’t exist.
- Relaxing orderly-set reqs
- Added Python 3.13 support
- Only lower if clean_key is instance of str
- Only lower if clean_key is instance of str #504
- Fixes issue where the key deep_distance is not returned when both
compared items are equal
- Fixes issue where the key deep_distance is not returned when both
compared items are equal #510
- Fixes exclude_paths fails to work in certain cases
- exclude_paths fails to work #509
- Fixes to_json() method chokes on standard json.dumps() kwargs such
as sort_keys
- to_dict() method chokes on standard json.dumps() kwargs #490
- Fixes accessing the affected_root_keys property on the diff object
returned by DeepDiff fails when one of the dicts is empty
- In version 8.0.1, accessing the affected_root_keys property on the
diff object returned by DeepDiff fails when one of the dicts is
empty #508


DeepDiff 8-0-1

- Bugfix. Numpy should be optional.
Expand Down

0 comments on commit 737bb5a

Please sign in to comment.