dtoolcore.compare

Module with helper functions for comparing datasets.

dtoolcore.compare.diff_content(a, reference, progressbar=None)[source]

Return list of tuples where content differ.

Tuple structure: (identifier, hash in a, hash in reference)

Assumes list of identifiers in a and b are identical.

Storage broker of reference used to generate hash for files in a.

Parameters:
Returns:

list of tuples for all items with different content

dtoolcore.compare.diff_identifiers(a, b)[source]

Return list of tuples where identifiers in datasets differ.

Tuple structure: (identifier, present in a, present in b)

Parameters:
Returns:

list of tuples where identifiers in datasets differ

dtoolcore.compare.diff_sizes(a, b, progressbar=None)[source]

Return list of tuples where sizes differ.

Tuple structure: (identifier, size in a, size in b)

Assumes list of identifiers in a and b are identical.

Parameters:
Returns:

list of tuples for all items with different sizes