From f2b858c4c6d3e6c425114ce40e4063866539819c Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Wed, 30 Oct 2024 17:33:32 +0100 Subject: [PATCH] [Internal] Add `cleanrooms` package (#806) ## Changes The cleanrooms package is being introduced into the SDK. This ensures that docs will be generated for this package when ready. ## Tests - [ ] `make test` run locally - [ ] `make fmt` applied - [ ] relevant integration tests applied --- docs/gen-client-docs.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/gen-client-docs.py b/docs/gen-client-docs.py index 5c32beff..ac18406b 100644 --- a/docs/gen-client-docs.py +++ b/docs/gen-client-docs.py @@ -248,6 +248,7 @@ class Generator: Package("dashboards", "Dashboards", "Manage Lakeview dashboards"), Package("marketplace", "Marketplace", "Manage AI and analytics assets such as ML models, notebooks, applications in an open marketplace"), Package("apps", "Apps", "Build custom applications on Databricks"), + Package("cleanrooms", "Clean Rooms", "Manage clean rooms and their assets and task runs"), ] def __init__(self): @@ -375,13 +376,19 @@ def _make_folder_if_not_exists(folder): def write_dataclass_docs(self): self._make_folder_if_not_exists(f'{__dir__}/dbdataclasses') + all_packages = [] for pkg in self.packages: - module = importlib.import_module(f'databricks.sdk.service.{pkg.name}') + try: + module = importlib.import_module(f'databricks.sdk.service.{pkg.name}') + except ModuleNotFoundError: + print(f'No module found for {pkg.name}, continuing') + continue + all_packages.append(pkg.name) all_members = [name for name, _ in inspect.getmembers(module, predicate=self._should_document)] doc = DataclassesDoc(package=pkg, dataclasses=sorted(all_members)) with open(f'{__dir__}/dbdataclasses/{pkg.name}.rst', 'w') as f: f.write(doc.as_rst()) - all = "\n ".join(sorted([p.name for p in self.packages])) + all = "\n ".join(sorted(all_packages)) with open(f'{__dir__}/dbdataclasses/index.rst', 'w') as f: f.write(f''' Dataclasses