|
23 | 23 | #
|
24 | 24 | # TODO: add docstrings for all private functions
|
25 | 25 |
|
| 26 | + |
26 | 27 | def _async_fetch_files(dirpath, urls):
|
27 | 28 | loop = asyncio.get_event_loop()
|
28 | 29 | tasks = loop.run_until_complete(
|
@@ -175,6 +176,7 @@ def u_diff(
|
175 | 176 | context_lines: (int) number of context lines to include in the diff (default=3)
|
176 | 177 | include_tables: (list of str) Python list of OpenType tables to include in the diff
|
177 | 178 | exclude_tables: (list of str) Python list of OpentType tables to exclude from the diff
|
| 179 | + use_multiprocess: (bool) use multi-processor optimizations (default=True) |
178 | 180 |
|
179 | 181 | include_tables and exclude_tables are mutually exclusive arguments. Only one should
|
180 | 182 | be defined
|
@@ -224,7 +226,24 @@ def external_diff(
|
224 | 226 | exclude_tables=None,
|
225 | 227 | use_multiprocess=True,
|
226 | 228 | ):
|
227 |
| - # TODO: Add docstring documentation |
| 229 | + """Performs a unified diff on a TTX serialized data format dump of font binary data using |
| 230 | + an external diff executable that is requested by the caller via `command` |
| 231 | +
|
| 232 | + command: (string) command line executable string and arguments to define execution |
| 233 | + filepath_a: (string) pre-file local file path or URL path |
| 234 | + filepath_b: (string) post-file local file path or URL path |
| 235 | + include_tables: (list of str) Python list of OpenType tables to include in the diff |
| 236 | + exclude_tables: (list of str) Python list of OpentType tables to exclude from the diff |
| 237 | + use_multiprocess: (bool) use multi-processor optimizations (default=True) |
| 238 | +
|
| 239 | + include_tables and exclude_tables are mutually exclusive arguments. Only one should |
| 240 | + be defined |
| 241 | +
|
| 242 | + :returns: Generator of ordered diff line strings that include newline line endings |
| 243 | + :raises: KeyError if include_tables or exclude_tables includes a mis-specified table |
| 244 | + that is not included in filepath_a OR filepath_b |
| 245 | + :raises: IOError if exception raised during execution of `command` on TTX files |
| 246 | + :raises: fdiff.exceptions.AIOError if GET request to URL returned non-200 response status code""" |
228 | 247 | with tempfile.TemporaryDirectory() as tmpdirpath:
|
229 | 248 | # define the file paths with either local file requests
|
230 | 249 | # or HTTP GET requests of remote files based on the command line request
|
|
0 commit comments