janus.metrics.file_pairing#
Attributes#
Functions#
|
Registers a pairing method for pairing strings between files |
|
Pairs the entire contents of a file together |
|
Pairs the contents of a file together by line |
|
Pairs the comments of a file together by line |
Module Contents#
- janus.metrics.file_pairing.FILE_PAIRING_METHODS: dict[str, Callable[[str, str], list[tuple[str, str]]]]#
- janus.metrics.file_pairing.register_pairing_method(name=None)#
Registers a pairing method for pairing strings between files
- Parameters:
name (None | str) – The name of the pairing method. If None, the function name is used.
help – The help text for the pairing method.
- Returns:
The decorator function.
- Return type:
Callable[[Callable], Callable]
- janus.metrics.file_pairing.pair_by_file(target, reference, **kwargs)#
Pairs the entire contents of a file together
- janus.metrics.file_pairing.pair_by_line(target, reference, **kwargs)#
Pairs the contents of a file together by line
- janus.metrics.file_pairing.pair_by_line_comment(target, reference, **kwargs)#
Pairs the comments of a file together by line
WARNING: Do not use, as this method is extremely brittle.