Skip to content

Commit ccbe777

Browse files
committed
Merge branch 'dev' of github.com:seperman/deepdiff into dev
2 parents 91e9f24 + 801cb48 commit ccbe777

File tree

10 files changed

+36
-32
lines changed

10 files changed

+36
-32
lines changed

MANIFEST.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ include pytest.ini
99
include *.py
1010
recursive-include docs/ *.rst
1111
recursive-include docs/ *.png
12-
recursive-include tests *.py
12+
recursive-include tests *.csv
1313
recursive-include tests *.json
14+
recursive-include tests *.pickle
15+
recursive-include tests *.py
16+
recursive-include tests *.toml
17+
recursive-include tests *.yaml
1418
global-exclude __pycache__
1519
global-exclude *.py[co]

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DeepDiff v 6.2.1
1+
# DeepDiff v 6.2.2
22

33
![Downloads](https://img.shields.io/pypi/dm/deepdiff.svg?style=flat)
44
![Python Versions](https://img.shields.io/pypi/pyversions/deepdiff.svg?style=flat)
@@ -14,7 +14,7 @@
1414

1515
Tested on Python 3.7+ and PyPy3.
1616

17-
- **[Documentation](https://zepworks.com/deepdiff/6.2.1/)**
17+
- **[Documentation](https://zepworks.com/deepdiff/6.2.2/)**
1818

1919
## What is new?
2020

@@ -69,13 +69,13 @@ Note: if you want to use DeepDiff via commandline, make sure to run `pip install
6969

7070
DeepDiff gets the difference of 2 objects.
7171

72-
> - Please take a look at the [DeepDiff docs](https://zepworks.com/deepdiff/6.2.1/diff.html)
73-
> - The full documentation of all modules can be found on <https://zepworks.com/deepdiff/6.2.1/>
72+
> - Please take a look at the [DeepDiff docs](https://zepworks.com/deepdiff/6.2.2/diff.html)
73+
> - The full documentation of all modules can be found on <https://zepworks.com/deepdiff/6.2.2/>
7474
> - Tutorials and posts about DeepDiff can be found on <https://zepworks.com/tags/deepdiff/>
7575
7676
## A few Examples
7777

78-
> Note: This is just a brief overview of what DeepDiff can do. Please visit <https://zepworks.com/deepdiff/6.2.1/> for full documentation.
78+
> Note: This is just a brief overview of what DeepDiff can do. Please visit <https://zepworks.com/deepdiff/6.2.2/> for full documentation.
7979
8080
### List difference ignoring order or duplicates
8181

@@ -279,8 +279,8 @@ Example:
279279
```
280280

281281

282-
> - Please take a look at the [DeepDiff docs](https://zepworks.com/deepdiff/6.2.1/diff.html)
283-
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.1/>
282+
> - Please take a look at the [DeepDiff docs](https://zepworks.com/deepdiff/6.2.2/diff.html)
283+
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.2/>
284284
285285

286286
# Deep Search
@@ -312,17 +312,17 @@ And you can pass all the same kwargs as DeepSearch to grep too:
312312
{'matched_paths': {"root['somewhere']": 'around'}, 'matched_values': {"root['long']": 'somewhere'}}
313313
```
314314

315-
> - Please take a look at the [DeepSearch docs](https://zepworks.com/deepdiff/6.2.1/dsearch.html)
316-
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.1/>
315+
> - Please take a look at the [DeepSearch docs](https://zepworks.com/deepdiff/6.2.2/dsearch.html)
316+
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.2/>
317317
318318
# Deep Hash
319319
(New in v4-0-0)
320320

321321
DeepHash is designed to give you hash of ANY python object based on its contents even if the object is not considered hashable!
322322
DeepHash is supposed to be deterministic in order to make sure 2 objects that contain the same data, produce the same hash.
323323

324-
> - Please take a look at the [DeepHash docs](https://zepworks.com/deepdiff/6.2.1/deephash.html)
325-
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.1/>
324+
> - Please take a look at the [DeepHash docs](https://zepworks.com/deepdiff/6.2.2/deephash.html)
325+
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.2/>
326326
327327
Let's say you have a dictionary object.
328328

@@ -370,8 +370,8 @@ Which you can write as:
370370
At first it might seem weird why DeepHash(obj)[obj] but remember that DeepHash(obj) is a dictionary of hashes of all other objects that obj contains too.
371371

372372

373-
> - Please take a look at the [DeepHash docs](https://zepworks.com/deepdiff/6.2.1/deephash.html)
374-
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.1/>
373+
> - Please take a look at the [DeepHash docs](https://zepworks.com/deepdiff/6.2.2/deephash.html)
374+
> - The full documentation can be found on <https://zepworks.com/deepdiff/6.2.2/>
375375
376376

377377
# Using DeepDiff in unit tests
@@ -451,11 +451,11 @@ Thank you!
451451

452452
How to cite this library (APA style):
453453

454-
Dehpour, S. (2022). DeepDiff (Version 6.2.1) [Software]. Available from https://github.com/seperman/deepdiff.
454+
Dehpour, S. (2022). DeepDiff (Version 6.2.2) [Software]. Available from https://github.com/seperman/deepdiff.
455455

456456
How to cite this library (Chicago style):
457457

458-
Dehpour, Sep. 2022. DeepDiff (version 6.2.1).
458+
Dehpour, Sep. 2022. DeepDiff (version 6.2.2).
459459

460460
# Authors
461461

deepdiff/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""This module offers the DeepDiff, DeepSearch, grep, Delta and DeepHash classes."""
22
# flake8: noqa
3-
__version__ = '6.2.1'
3+
__version__ = '6.2.2'
44
import logging
55

66
if __name__ == '__main__':

deepdiff/diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ def _diff_numpy_array(self, level, parents_ids=frozenset(), local_tree=None):
13661366
if not self.ignore_order_func(level):
13671367
# fast checks
13681368
if self.significant_digits is None:
1369-
if np.array_equal(level.t1, level.t2):
1369+
if np.array_equal(level.t1, level.t2, equal_nan=self.ignore_nan_inequality):
13701370
return # all good
13711371
else:
13721372
try:

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
# built documents.
6161
#
6262
# The short X.Y version.
63-
version = '6.2.1'
63+
version = '6.2.2'
6464
# The full version, including alpha/beta/rc tags.
65-
release = '6.2.1'
65+
release = '6.2.2'
6666

6767
load_dotenv(override=True)
6868
DOC_VERSION = os.environ.get('DOC_VERSION', version)

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
contain the root `toctree` directive.
55
66
7-
DeepDiff 6.2.1 documentation!
7+
DeepDiff 6.2.2 documentation!
88
=============================
99

1010
*****************

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 6.2.1
2+
current_version = 6.2.2
33
commit = True
44
tag = True
55
tag_name = {new_version}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if os.environ.get('USER', '') == 'vagrant':
1111
del os.link
1212

13-
version = '6.2.1'
13+
version = '6.2.2'
1414

1515

1616
def get_reqs(filename):

tests/test_command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def test_cli_cant_find_file(self):
4444
('t1.pickle', 't2.pickle', {}, 0),
4545
('t1.yaml', 't2.yaml', {}, 0),
4646
])
47-
def test_deeppatch_command(self, t1, t2, args, expected_exit_code):
48-
t1_copy_path = f'/tmp/{t1}'
47+
def test_deeppatch_command(self, t1, t2, args, expected_exit_code, tmp_path):
48+
t1_copy_path = os.path.join(tmp_path, t1)
4949
t1 = os.path.join(FIXTURES_DIR, t1)
5050
t2 = os.path.join(FIXTURES_DIR, t2)
5151
copyfile(t1, t1_copy_path)
@@ -54,7 +54,7 @@ def test_deeppatch_command(self, t1, t2, args, expected_exit_code):
5454
assert delta_pickled.exit_code == expected_exit_code
5555

5656
if expected_exit_code == 0:
57-
delta_path = '/tmp/delta.pickle'
57+
delta_path = os.path.join(tmp_path, 'delta.pickle')
5858
with open(delta_path, 'wb') as the_file:
5959
the_file.write(delta_pickled.stdout_bytes)
6060

tests/test_delta.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,35 +84,35 @@ def test_multiple_delta(self):
8484

8585
assert t1 + delta1 + delta2 == t3
8686

87-
def test_delta_dump_and_read1(self):
87+
def test_delta_dump_and_read1(self, tmp_path):
8888
t1 = [1, 2]
8989
t2 = [1, 2, 3, 5]
9090
diff = DeepDiff(t1, t2)
91-
path = '/tmp/delta_test.delta'
91+
path = os.path.join(tmp_path, 'delta_test.delta')
9292
with open(path, 'wb') as the_file:
9393
Delta(diff).dump(the_file)
9494
delta = Delta(delta_path=path)
9595
os.remove(path)
9696
assert delta + t1 == t2
9797

98-
def test_delta_dump_and_read2(self):
98+
def test_delta_dump_and_read2(self, tmp_path):
9999
t1 = [1, 2]
100100
t2 = [1, 2, 3, 5]
101101
diff = DeepDiff(t1, t2)
102102
delta_content = Delta(diff).dumps()
103-
path = '/tmp/delta_test2.delta'
103+
path = os.path.join('tmp_path, delta_test2.delta')
104104
with open(path, 'wb') as the_file:
105105
the_file.write(delta_content)
106106
delta = Delta(delta_path=path)
107107
os.remove(path)
108108
assert delta + t1 == t2
109109

110-
def test_delta_dump_and_read3(self):
110+
def test_delta_dump_and_read3(self, tmp_path):
111111
t1 = [1, 2]
112112
t2 = [1, 2, 3, 5]
113113
diff = DeepDiff(t1, t2)
114114
delta_content = Delta(diff).dumps()
115-
path = '/tmp/delta_test2.delta'
115+
path = os.path.join('tmp_path, delta_test2.delta')
116116
with open(path, 'wb') as the_file:
117117
the_file.write(delta_content)
118118
with pytest.raises(ValueError) as excinfo:

0 commit comments

Comments
 (0)