(
resource,
path,
root_discovery,
discovery,
doc_destination_dir,
artifact_destination_dir=DISCOVERY_DOC_DIR,
)
| 358 | |
| 359 | |
| 360 | def document_collection_recursive( |
| 361 | resource, |
| 362 | path, |
| 363 | root_discovery, |
| 364 | discovery, |
| 365 | doc_destination_dir, |
| 366 | artifact_destination_dir=DISCOVERY_DOC_DIR, |
| 367 | ): |
| 368 | html = document_collection(resource, path, root_discovery, discovery) |
| 369 | |
| 370 | f = open(pathlib.Path(doc_destination_dir).joinpath(path + "html"), "w") |
| 371 | |
| 372 | f.write(html) |
| 373 | f.close() |
| 374 | |
| 375 | for name in dir(resource): |
| 376 | if ( |
| 377 | not name.startswith("_") |
| 378 | and callable(getattr(resource, name)) |
| 379 | and hasattr(getattr(resource, name), "__is_resource__") |
| 380 | and discovery != {} |
| 381 | ): |
| 382 | dname = name.rsplit("_")[0] |
| 383 | collection = getattr(resource, name)() |
| 384 | document_collection_recursive( |
| 385 | collection, |
| 386 | path + name + ".", |
| 387 | root_discovery, |
| 388 | discovery["resources"].get(dname, {}), |
| 389 | doc_destination_dir, |
| 390 | artifact_destination_dir, |
| 391 | ) |
| 392 | |
| 393 | |
| 394 | def document_api( |
no test coverage detected
searching dependent graphs…