Completed
Push — master ( c99d7b...cb7596 )
by Jasper
9s
created

niprov.compare()   A

Complexity

Conditions 1

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 21
rs 9.3142
1
from niprov.diff import Diff
2
3
4
def compare(file1, file2, dependencies=None):
5
    """Compare the provenance of two files.
6
7
    This creates a niprov :class:`.Diff` object that can be further 
8
    interrogated or displayed for differences between the two files.
9
10
    Example:
11
        Chain calls with methods of Diff or print the Diff object::
12
13
            compare(file1, file2).assertEqual(ignore='path')
14
            print(compare(file1, file2))
15
16
    Args:
17
        file1 (:class:`.BaseFile`): One of two niprov BaseFile objects to compare.
18
        file2 (:class:`.BaseFile`): As file1
19
20
    Returns:
21
        niprov.diff.Diff: A niprov :class:`.Diff` object which reflects
22
            differences between the two files.
23
    """
24
    return Diff(file1, file2)
25