Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Jan 26, 2024
1 parent 5e72c63 commit aef7af4
Show file tree
Hide file tree
Showing 119 changed files with 195 additions and 183 deletions.
13 changes: 0 additions & 13 deletions docs/account/account-oauth2.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Billing
Configure different aspects of Databricks billing and usage.

.. toctree::
:maxdepth: 1
:maxdepth: 1

billable_usage
budgets
log_delivery
billable_usage
budgets
log_delivery
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Unity Catalog
Configure data governance with Unity Catalog for metastores, catalogs, schemas, tables, external locations, and storage credentials

.. toctree::
:maxdepth: 1
:maxdepth: 1

metastore_assignments
metastores
storage_credentials
metastore_assignments
metastores
storage_credentials
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions docs/account/account-iam.rst → docs/account/iam/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Identity and Access Management
Manage users, service principals, groups and their permissions in Accounts and Workspaces

.. toctree::
:maxdepth: 1
:maxdepth: 1

access_control
groups
service_principals
users
workspace_assignment
access_control
groups
service_principals
users
workspace_assignment
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions docs/account/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Account APIs
These APIs are available from AccountClient

.. toctree::
:maxdepth: 1

account-iam
account-catalog
account-settings
account-provisioning
account-billing
account-oauth2
:maxdepth: 1

iam/index
catalog/index
settings/index
provisioning/index
billing/index
oauth2/index
File renamed without changes.
13 changes: 13 additions & 0 deletions docs/account/oauth2/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

OAuth
=====

Configure OAuth 2.0 application registrations for Databricks

.. toctree::
:maxdepth: 1

custom_app_integration
o_auth_published_apps
published_app_integration
service_principal_secrets
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Provisioning
Resource management for secure Databricks Workspace deployment, cross-account IAM roles, storage, encryption, networking and private access.

.. toctree::
:maxdepth: 1
:maxdepth: 1

credentials
encryption_keys
networks
private_access
storage
vpc_endpoints
workspaces
credentials
encryption_keys
networks
private_access
storage
vpc_endpoints
workspaces
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Settings
Manage security settings for Accounts and Workspaces

.. toctree::
:maxdepth: 1
:maxdepth: 1

ip_access_lists
network_connectivity
settings
ip_access_lists
network_connectivity
settings
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 21 additions & 9 deletions docs/gen-client-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ def service_docs(self, client_inst) -> list[ServiceDoc]:
def _should_document(obj):
return is_dataclass(obj) or (type(obj) == type and issubclass(obj, Enum))

@staticmethod
def _make_folder_if_not_exists(folder):
if not os.path.exists(folder):
os.makedirs(folder)

def write_dataclass_docs(self):
self._make_folder_if_not_exists(f'{__dir__}/dbdataclasses')
for pkg in self.packages:
module = importlib.import_module(f'databricks.sdk.service.{pkg.name}')
all_members = [name for name, _ in inspect.getmembers(module, predicate=self._should_document)]
Expand Down Expand Up @@ -333,8 +339,10 @@ def load_client(self, client, folder, label, description):
service_docs = self.service_docs(client)
for svc in service_docs:
client_services.append(svc.service_name)
package_to_services[svc.tag.package.name].append(svc.service_name)
with open(f'{__dir__}/{folder}/{svc.service_name}.rst', 'w') as f:
package = svc.tag.package.name
package_to_services[package].append(svc.service_name)
self._make_folder_if_not_exists(f'{__dir__}/{folder}/{package}')
with open(f'{__dir__}/{folder}/{package}/{svc.service_name}.rst', 'w') as f:
f.write(svc.as_rst())
ordered_packages = []
for pkg in self.packages:
Expand All @@ -345,32 +353,36 @@ def load_client(self, client, folder, label, description):
self._write_client_packages(folder, label, description, ordered_packages)

def _write_client_packages(self, folder: str, label: str, description: str, packages: list[str]):
"""Writes out the top-level index for the APIs supported by a client."""
self._make_folder_if_not_exists(f'{__dir__}/{folder}')
with open(f'{__dir__}/{folder}/index.rst', 'w') as f:
all = "\n ".join([f'{folder}-{name}' for name in packages])
all = "\n ".join([f'{name}/index' for name in packages])
f.write(f'''
{label}
{'=' * len(label)}
{description}
.. toctree::
:maxdepth: 1
:maxdepth: 1
{all}''')
{all}''')

def _write_client_package_doc(self, folder: str, pkg: Package, services: list[str]):
with open(f'{__dir__}/{folder}/{folder}-{pkg.name}.rst', 'w') as f:
all = "\n ".join(services)
"""Writes out the index for a single package supported by a client."""
self._make_folder_if_not_exists(f'{__dir__}/{folder}/{pkg.name}')
with open(f'{__dir__}/{folder}/{pkg.name}/index.rst', 'w') as f:
all = "\n ".join(services)
f.write(f'''
{pkg.label}
{'=' * len(pkg.label)}
{pkg.description}
.. toctree::
:maxdepth: 1
:maxdepth: 1
{all}''')
{all}''')


if __name__ == '__main__':
Expand Down
Empty file removed docs/images/styles.css
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions docs/workspace/catalog/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Unity Catalog
=============

Configure data governance with Unity Catalog for metastores, catalogs, schemas, tables, external locations, and storage credentials

.. toctree::
:maxdepth: 1

artifact_allowlists
catalogs
connections
external_locations
functions
grants
metastores
model_versions
registered_models
schemas
storage_credentials
system_schemas
table_constraints
tables
volumes
workspace_bindings
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions docs/workspace/compute/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Compute
=======

Use and configure compute for Databricks

.. toctree::
:maxdepth: 1

cluster_policies
clusters
command_execution
global_init_scripts
instance_pools
instance_profiles
libraries
policy_families
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Dashboards
Manage Lakeview dashboards

.. toctree::
:maxdepth: 1
:maxdepth: 1

lakeview
lakeview
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ File Management
Manage files on Databricks in a filesystem-like interface

.. toctree::
:maxdepth: 1
:maxdepth: 1

dbfs
dbfs
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Identity and Access Management
Manage users, service principals, groups and their permissions in Accounts and Workspaces

.. toctree::
:maxdepth: 1

account_access_control_proxy
current_user
groups
permissions
service_principals
users
:maxdepth: 1

account_access_control_proxy
current_user
groups
permissions
service_principals
users
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 15 additions & 15 deletions docs/workspace/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ Workspace APIs
These APIs are available from WorkspaceClient

.. toctree::
:maxdepth: 1
:maxdepth: 1

workspace-workspace
workspace-compute
workspace-jobs
workspace-pipelines
workspace-files
workspace-ml
workspace-serving
workspace-iam
workspace-sql
workspace-catalog
workspace-sharing
workspace-settings
workspace-vectorsearch
workspace-dashboards
workspace/index
compute/index
jobs/index
pipelines/index
files/index
ml/index
serving/index
iam/index
sql/index
catalog/index
sharing/index
settings/index
vectorsearch/index
dashboards/index
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Jobs
Schedule automated jobs on Databricks Workspaces

.. toctree::
:maxdepth: 1
:maxdepth: 1

jobs
jobs
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Machine Learning
Create and manage experiments, features, and other machine learning artifacts

.. toctree::
:maxdepth: 1
:maxdepth: 1

experiments
model_registry
experiments
model_registry
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Delta Live Tables
Manage pipelines, runs, and other Delta Live Table resources

.. toctree::
:maxdepth: 1
:maxdepth: 1

pipelines
pipelines
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Real-time Serving
Use real-time inference for machine learning

.. toctree::
:maxdepth: 1
:maxdepth: 1

apps
serving_endpoints
apps
serving_endpoints
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit aef7af4

Please sign in to comment.