From 3f3f58c73f005ca7718b64c4475144aecec102a4 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 10:03:01 +0000 Subject: [PATCH 01/14] remove LOADED_NAMESPACES and instead run a coverage in jsonschema.py --- python/codegen/codegen/jsonschema.py | 43 +++++++++++++++++++++++++--- python/codegen/codegen/packages.py | 21 -------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/python/codegen/codegen/jsonschema.py b/python/codegen/codegen/jsonschema.py index e0e57eb60d4..c780d1dc522 100644 --- a/python/codegen/codegen/jsonschema.py +++ b/python/codegen/codegen/jsonschema.py @@ -155,13 +155,15 @@ def get_schemas(): ["$defs", "github.com", "databricks", "cli", "bundle", "config"], ) - # we don't need all spec, only get supported types flat_spec = {**sdk_types_spec, **resource_types_spec} - flat_spec = { - key: value for key, value in flat_spec.items() if packages.should_load_ref(key) - } + + # Load only types reachable from the root resources, following $refs. + reachable = _collect_reachable_refs(packages.RESOURCE_TYPES, flat_spec) for name, schema in flat_spec.items(): + if name not in reachable: + continue + try: output[name] = _parse_schema(schema) except Exception as e: @@ -170,6 +172,39 @@ def get_schemas(): return output +def _refs_in_raw_schema(schema: dict) -> list[str]: + schema = _unwrap_variable(schema) or schema + + return [ + prop["$ref"].split("/")[-1] + for prop in schema.get("properties", {}).values() + if prop.get("$ref") + ] + + +def _collect_reachable_refs(roots: list[str], flat_spec: dict) -> set[str]: + reachable: set[str] = set() + stack = list(roots) + + while stack: + current = stack.pop() + if current in reachable: + continue + + reachable.add(current) + + schema = flat_spec.get(current) + if schema is None: + # primitives and types outside the loaded subtrees are terminal + continue + + for ref in _refs_in_raw_schema(schema): + if ref not in reachable: + stack.append(ref) + + return reachable + + def _get_spec_path(spec: dict, path: list[str]) -> dict: for key in path: spec = spec[key] diff --git a/python/codegen/codegen/packages.py b/python/codegen/codegen/packages.py index 9774911feb9..aadd79c7b9a 100644 --- a/python/codegen/codegen/packages.py +++ b/python/codegen/codegen/packages.py @@ -12,17 +12,6 @@ RESOURCE_TYPES = list(RESOURCE_NAMESPACE.keys()) -# Namespaces to load from OpenAPI spec. -# -# We can't load all types because of errors while loading some of them. -LOADED_NAMESPACES = [ - "compute", - "jobs", - "pipelines", - "resources", - "catalog", -] - RENAMES = { "string": "str", "boolean": "bool", @@ -55,16 +44,6 @@ def is_resource(ref: str) -> bool: return ref in RESOURCE_TYPES -def should_load_ref(ref: str) -> bool: - name = ref.split("/")[-1] - - for namespace in LOADED_NAMESPACES: - if name.startswith(f"{namespace}."): - return True - - return name in PRIMITIVES - - def get_root_package(namespace: str) -> str: return f"databricks.bundles.{namespace}" From 52594c828c588ac8302250373d1fc59677db5c10 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 11:00:41 +0000 Subject: [PATCH 02/14] Mark PyDABs generated files as auto-generated The PyDABs codegen writes databricks/bundles//_models/*.py and each namespace __init__.py, but those files carried no generated-file marker. - Prepend a "# Code generated by pydabs-codegen. DO NOT EDIT." header in both writer paths (_write_code, _write_exports) and regenerate. - Add a nested python/databricks/bundles/.gitattributes marking the generated _models trees and namespace __init__.py files as linguist-generated (core/ and resources/ stay hand-written). Addresses review comments on #6335. Co-authored-by: Isaac --- python/codegen/codegen/main.py | 6 ++++-- python/databricks/bundles/.gitattributes | 14 +++++++++----- python/databricks/bundles/alerts/__init__.py | 2 ++ .../bundles/alerts/_models/aggregation.py | 2 ++ python/databricks/bundles/alerts/_models/alert.py | 2 ++ .../alerts/_models/alert_evaluation_state.py | 2 ++ .../alerts/_models/alert_statement_parameter.py | 2 ++ .../bundles/alerts/_models/alert_v2_evaluation.py | 2 ++ .../alerts/_models/alert_v2_notification.py | 2 ++ .../bundles/alerts/_models/alert_v2_operand.py | 2 ++ .../alerts/_models/alert_v2_operand_column.py | 2 ++ .../alerts/_models/alert_v2_operand_value.py | 2 ++ .../bundles/alerts/_models/alert_v2_run_as.py | 2 ++ .../alerts/_models/alert_v2_subscription.py | 2 ++ .../bundles/alerts/_models/comparison_operator.py | 2 ++ .../bundles/alerts/_models/cron_schedule.py | 2 ++ .../databricks/bundles/alerts/_models/lifecycle.py | 2 ++ .../bundles/alerts/_models/permission.py | 2 ++ .../bundles/alerts/_models/permission_level.py | 2 ++ .../alerts/_models/schedule_pause_status.py | 2 ++ python/databricks/bundles/catalogs/__init__.py | 2 ++ .../catalogs/_models/azure_encryption_settings.py | 2 ++ .../databricks/bundles/catalogs/_models/catalog.py | 2 ++ .../catalogs/_models/encryption_settings.py | 2 ++ .../bundles/catalogs/_models/lifecycle.py | 2 ++ .../bundles/catalogs/_models/privilege.py | 2 ++ .../catalogs/_models/privilege_assignment.py | 2 ++ python/databricks/bundles/jobs/__init__.py | 2 ++ .../bundles/jobs/_models/adlsgen2_info.py | 2 ++ .../bundles/jobs/_models/ai_runtime_task.py | 2 ++ .../databricks/bundles/jobs/_models/alert_task.py | 2 ++ .../bundles/jobs/_models/alert_task_subscriber.py | 2 ++ .../bundles/jobs/_models/authentication_method.py | 2 ++ .../databricks/bundles/jobs/_models/auto_scale.py | 2 ++ .../bundles/jobs/_models/aws_attributes.py | 2 ++ .../bundles/jobs/_models/aws_availability.py | 2 ++ .../bundles/jobs/_models/azure_attributes.py | 2 ++ .../bundles/jobs/_models/azure_availability.py | 2 ++ .../jobs/_models/clean_rooms_notebook_task.py | 2 ++ .../bundles/jobs/_models/clients_types.py | 2 ++ .../bundles/jobs/_models/cluster_log_conf.py | 2 ++ .../bundles/jobs/_models/cluster_spec.py | 2 ++ python/databricks/bundles/jobs/_models/compute.py | 2 ++ .../bundles/jobs/_models/compute_config.py | 2 ++ .../bundles/jobs/_models/compute_spec.py | 2 ++ .../jobs/_models/compute_spec_accelerator_type.py | 2 ++ .../databricks/bundles/jobs/_models/condition.py | 2 ++ .../bundles/jobs/_models/condition_task.py | 2 ++ .../bundles/jobs/_models/condition_task_op.py | 2 ++ .../jobs/_models/confidential_compute_type.py | 2 ++ .../databricks/bundles/jobs/_models/continuous.py | 2 ++ .../_models/continuous_trigger_configuration.py | 2 ++ .../bundles/jobs/_models/cron_schedule.py | 2 ++ .../jobs/_models/cron_trigger_configuration.py | 2 ++ .../bundles/jobs/_models/dashboard_task.py | 2 ++ .../bundles/jobs/_models/data_security_mode.py | 2 ++ .../bundles/jobs/_models/dbfs_storage_info.py | 2 ++ .../bundles/jobs/_models/dbt_platform_task.py | 2 ++ python/databricks/bundles/jobs/_models/dbt_task.py | 2 ++ .../bundles/jobs/_models/dependency_mode.py | 2 ++ .../bundles/jobs/_models/deployment_spec.py | 2 ++ .../bundles/jobs/_models/docker_basic_auth.py | 2 ++ .../bundles/jobs/_models/docker_image.py | 2 ++ .../bundles/jobs/_models/ebs_volume_type.py | 2 ++ .../databricks/bundles/jobs/_models/environment.py | 2 ++ .../_models/file_arrival_trigger_configuration.py | 2 ++ .../bundles/jobs/_models/for_each_task.py | 2 ++ .../bundles/jobs/_models/gcp_attributes.py | 2 ++ .../bundles/jobs/_models/gcp_availability.py | 2 ++ .../bundles/jobs/_models/gcs_storage_info.py | 2 ++ .../bundles/jobs/_models/gen_ai_compute_task.py | 2 ++ .../bundles/jobs/_models/git_provider.py | 2 ++ .../databricks/bundles/jobs/_models/git_source.py | 2 ++ .../jobs/_models/hardware_accelerator_type.py | 2 ++ .../bundles/jobs/_models/init_script_info.py | 2 ++ python/databricks/bundles/jobs/_models/job.py | 2 ++ .../databricks/bundles/jobs/_models/job_cluster.py | 2 ++ .../jobs/_models/job_email_notifications.py | 2 ++ .../bundles/jobs/_models/job_environment.py | 2 ++ .../jobs/_models/job_notification_settings.py | 2 ++ .../jobs/_models/job_parameter_definition.py | 2 ++ .../bundles/jobs/_models/job_permission.py | 2 ++ .../bundles/jobs/_models/job_permission_level.py | 2 ++ .../databricks/bundles/jobs/_models/job_run_as.py | 2 ++ .../bundles/jobs/_models/jobs_health_metric.py | 2 ++ .../bundles/jobs/_models/jobs_health_operator.py | 2 ++ .../bundles/jobs/_models/jobs_health_rule.py | 2 ++ .../bundles/jobs/_models/jobs_health_rules.py | 2 ++ python/databricks/bundles/jobs/_models/kind.py | 2 ++ python/databricks/bundles/jobs/_models/library.py | 2 ++ .../databricks/bundles/jobs/_models/lifecycle.py | 2 ++ .../bundles/jobs/_models/local_file_info.py | 2 ++ .../bundles/jobs/_models/log_analytics_info.py | 2 ++ .../bundles/jobs/_models/maven_library.py | 2 ++ .../jobs/_models/model_trigger_configuration.py | 2 ++ .../model_trigger_configuration_condition.py | 2 ++ .../bundles/jobs/_models/node_type_flexibility.py | 2 ++ .../bundles/jobs/_models/notebook_task.py | 2 ++ .../bundles/jobs/_models/pause_status.py | 2 ++ .../bundles/jobs/_models/performance_target.py | 2 ++ .../jobs/_models/periodic_trigger_configuration.py | 2 ++ .../periodic_trigger_configuration_time_unit.py | 2 ++ .../bundles/jobs/_models/pipeline_params.py | 2 ++ .../bundles/jobs/_models/pipeline_task.py | 2 ++ .../bundles/jobs/_models/power_bi_model.py | 2 ++ .../bundles/jobs/_models/power_bi_table.py | 2 ++ .../bundles/jobs/_models/power_bi_task.py | 2 ++ .../bundles/jobs/_models/python_operator_task.py | 2 ++ .../jobs/_models/python_operator_task_parameter.py | 2 ++ .../bundles/jobs/_models/python_py_pi_library.py | 2 ++ .../bundles/jobs/_models/python_wheel_task.py | 2 ++ .../bundles/jobs/_models/queue_settings.py | 2 ++ .../bundles/jobs/_models/r_cran_library.py | 2 ++ python/databricks/bundles/jobs/_models/run_if.py | 2 ++ .../bundles/jobs/_models/run_job_task.py | 2 ++ .../bundles/jobs/_models/runtime_engine.py | 2 ++ .../bundles/jobs/_models/s3_storage_info.py | 2 ++ python/databricks/bundles/jobs/_models/source.py | 2 ++ .../bundles/jobs/_models/spark_jar_task.py | 2 ++ .../bundles/jobs/_models/spark_python_task.py | 2 ++ .../bundles/jobs/_models/spark_submit_task.py | 2 ++ .../bundles/jobs/_models/sparse_checkout.py | 2 ++ .../jobs/_models/sql_condition_configuration.py | 2 ++ .../jobs/_models/sql_condition_trigger_mode.py | 2 ++ python/databricks/bundles/jobs/_models/sql_task.py | 2 ++ .../bundles/jobs/_models/sql_task_alert.py | 2 ++ .../bundles/jobs/_models/sql_task_dashboard.py | 2 ++ .../bundles/jobs/_models/sql_task_file.py | 2 ++ .../bundles/jobs/_models/sql_task_query.py | 2 ++ .../bundles/jobs/_models/sql_task_subscription.py | 2 ++ .../bundles/jobs/_models/storage_mode.py | 2 ++ .../bundles/jobs/_models/subscription.py | 2 ++ .../jobs/_models/subscription_subscriber.py | 2 ++ .../_models/table_update_trigger_configuration.py | 2 ++ python/databricks/bundles/jobs/_models/task.py | 2 ++ .../bundles/jobs/_models/task_dependency.py | 2 ++ .../jobs/_models/task_email_notifications.py | 2 ++ .../jobs/_models/task_notification_settings.py | 2 ++ .../bundles/jobs/_models/task_retry_mode.py | 2 ++ .../bundles/jobs/_models/trigger_configuration.py | 2 ++ .../bundles/jobs/_models/trigger_settings.py | 2 ++ .../bundles/jobs/_models/volumes_storage_info.py | 2 ++ python/databricks/bundles/jobs/_models/webhook.py | 2 ++ .../bundles/jobs/_models/webhook_notifications.py | 2 ++ .../bundles/jobs/_models/workload_type.py | 2 ++ .../bundles/jobs/_models/workspace_storage_info.py | 2 ++ python/databricks/bundles/pipelines/__init__.py | 2 ++ .../bundles/pipelines/_models/adlsgen2_info.py | 2 ++ .../_models/api_source_connector_config.py | 2 ++ .../_models/api_source_connector_options.py | 2 ++ .../pipelines/_models/auto_full_refresh_policy.py | 2 ++ .../bundles/pipelines/_models/aws_attributes.py | 2 ++ .../bundles/pipelines/_models/aws_availability.py | 2 ++ .../bundles/pipelines/_models/azure_attributes.py | 2 ++ .../pipelines/_models/azure_availability.py | 2 ++ .../bundles/pipelines/_models/cluster_log_conf.py | 2 ++ .../pipelines/_models/confidential_compute_type.py | 2 ++ .../_models/confluence_connector_options.py | 2 ++ .../pipelines/_models/connection_parameters.py | 2 ++ .../bundles/pipelines/_models/connector_options.py | 2 ++ .../bundles/pipelines/_models/connector_type.py | 2 ++ .../pipelines/_models/data_staging_options.py | 2 ++ .../bundles/pipelines/_models/day_of_week.py | 2 ++ .../bundles/pipelines/_models/dbfs_storage_info.py | 2 ++ .../bundles/pipelines/_models/ebs_volume_type.py | 2 ++ .../bundles/pipelines/_models/event_log_spec.py | 2 ++ .../bundles/pipelines/_models/file_filter.py | 2 ++ .../pipelines/_models/file_ingestion_options.py | 2 ++ .../_models/file_ingestion_options_file_format.py | 2 ++ ...file_ingestion_options_schema_evolution_mode.py | 2 ++ .../bundles/pipelines/_models/file_library.py | 2 ++ .../bundles/pipelines/_models/filters.py | 2 ++ .../bundles/pipelines/_models/gcp_attributes.py | 2 ++ .../bundles/pipelines/_models/gcp_availability.py | 2 ++ .../bundles/pipelines/_models/gcs_storage_info.py | 2 ++ .../bundles/pipelines/_models/google_ads_config.py | 2 ++ .../_models/google_ads_custom_report_options.py | 2 ++ .../pipelines/_models/google_ads_options.py | 2 ++ .../pipelines/_models/google_drive_options.py | 2 ++ ...oogle_drive_options_google_drive_entity_type.py | 2 ++ .../bundles/pipelines/_models/ingestion_config.py | 2 ++ .../ingestion_gateway_pipeline_definition.py | 2 ++ .../_models/ingestion_pipeline_definition.py | 2 ++ ...ingestion_pipeline_definition_fanout_options.py | 2 ++ ...specific_config_query_based_connector_config.py | 2 ++ ...ipeline_definition_workday_report_parameters.py | 2 ++ .../bundles/pipelines/_models/init_script_info.py | 2 ++ .../pipelines/_models/jira_connector_options.py | 2 ++ .../pipelines/_models/json_transformer_options.py | 2 ++ .../bundles/pipelines/_models/kafka_options.py | 2 ++ .../bundles/pipelines/_models/lifecycle.py | 2 ++ .../pipelines/_models/linked_in_ads_options.py | 2 ++ ..._options_linked_in_ads_custom_report_options.py | 2 ++ ...ort_options_linked_in_ads_entity_granularity.py | 2 ++ ...s_custom_report_options_linked_in_ads_finder.py | 2 ++ ...eport_options_linked_in_ads_time_granularity.py | 2 ++ .../bundles/pipelines/_models/local_file_info.py | 2 ++ .../pipelines/_models/log_analytics_info.py | 2 ++ .../bundles/pipelines/_models/marketo_options.py | 2 ++ .../bundles/pipelines/_models/maven_library.py | 2 ++ .../pipelines/_models/meta_marketing_options.py | 2 ++ ...options_meta_marketing_custom_report_options.py | 2 ++ .../bundles/pipelines/_models/notebook_library.py | 2 ++ .../bundles/pipelines/_models/notifications.py | 2 ++ .../pipelines/_models/operation_time_window.py | 2 ++ .../pipelines/_models/outlook_attachment_mode.py | 2 ++ .../pipelines/_models/outlook_body_format.py | 2 ++ .../bundles/pipelines/_models/outlook_options.py | 2 ++ .../bundles/pipelines/_models/path_pattern.py | 2 ++ .../bundles/pipelines/_models/pipeline.py | 2 ++ .../bundles/pipelines/_models/pipeline_cluster.py | 2 ++ .../_models/pipeline_cluster_autoscale.py | 2 ++ .../_models/pipeline_cluster_autoscale_mode.py | 2 ++ .../bundles/pipelines/_models/pipeline_library.py | 2 ++ .../pipelines/_models/pipeline_permission.py | 2 ++ .../pipelines/_models/pipeline_permission_level.py | 2 ++ .../pipelines/_models/pipelines_environment.py | 2 ++ .../pipelines/_models/postgres_catalog_config.py | 2 ++ .../pipelines/_models/postgres_slot_config.py | 2 ++ .../pipelines/_models/reddit_ads_options.py | 2 ++ ...ads_options_reddit_ads_custom_report_options.py | 2 ++ .../bundles/pipelines/_models/report_spec.py | 2 ++ .../bundles/pipelines/_models/restart_window.py | 2 ++ .../databricks/bundles/pipelines/_models/run_as.py | 2 ++ .../bundles/pipelines/_models/s3_storage_info.py | 2 ++ .../bundles/pipelines/_models/schema_spec.py | 2 ++ .../pipelines/_models/sharepoint_options.py | 2 ++ .../sharepoint_options_sharepoint_entity_type.py | 2 ++ .../pipelines/_models/smartsheet_options.py | 2 ++ .../pipelines/_models/source_catalog_config.py | 2 ++ .../bundles/pipelines/_models/source_config.py | 2 ++ .../bundles/pipelines/_models/table_spec.py | 2 ++ .../pipelines/_models/table_specific_config.py | 2 ++ .../_models/table_specific_config_scd_type.py | 2 ++ .../pipelines/_models/tik_tok_ads_options.py | 2 ++ ...ds_options_tik_tok_ads_custom_report_options.py | 2 ++ .../tik_tok_ads_options_tik_tok_data_level.py | 2 ++ .../tik_tok_ads_options_tik_tok_report_type.py | 2 ++ .../bundles/pipelines/_models/transformer.py | 2 ++ .../pipelines/_models/transformer_format.py | 2 ++ .../pipelines/_models/volumes_storage_info.py | 2 ++ .../pipelines/_models/workspace_storage_info.py | 2 ++ .../pipelines/_models/zendesk_support_options.py | 2 ++ python/databricks/bundles/schemas/__init__.py | 2 ++ .../bundles/schemas/_models/lifecycle.py | 2 ++ .../bundles/schemas/_models/privilege.py | 2 ++ .../schemas/_models/privilege_assignment.py | 2 ++ .../databricks/bundles/schemas/_models/schema.py | 2 ++ python/databricks/bundles/volumes/__init__.py | 2 ++ .../bundles/volumes/_models/lifecycle.py | 2 ++ .../bundles/volumes/_models/privilege.py | 2 ++ .../volumes/_models/privilege_assignment.py | 2 ++ .../databricks/bundles/volumes/_models/volume.py | 2 ++ .../bundles/volumes/_models/volume_type.py | 2 ++ 254 files changed, 517 insertions(+), 7 deletions(-) diff --git a/python/codegen/codegen/main.py b/python/codegen/codegen/main.py index fb002c308c2..2cd3fcd91a5 100644 --- a/python/codegen/codegen/main.py +++ b/python/codegen/codegen/main.py @@ -15,6 +15,8 @@ from codegen.generated_dataclass import GeneratedDataclass, GeneratedType from codegen.generated_enum import GeneratedEnum +HEADER = "# Code generated by pydabs-codegen. DO NOT EDIT.\n\n" + def main(output: str): schemas = openapi.get_schemas() @@ -176,7 +178,7 @@ def _write_exports( source_path = Path(output) / package_path / "__init__.py" source_path.parent.mkdir(exist_ok=True, parents=True) - source_path.write_text(b.build()) + source_path.write_text(HEADER + b.build()) print(f"Writing exports into {source_path}") @@ -327,7 +329,7 @@ def _write_code( source_path = Path(output) / (package_path + ".py") source_path.parent.mkdir(exist_ok=True, parents=True) - source_path.write_text(code) + source_path.write_text(HEADER + code) if __name__ == "__main__": diff --git a/python/databricks/bundles/.gitattributes b/python/databricks/bundles/.gitattributes index d5a9d986ef3..db137e8d08e 100644 --- a/python/databricks/bundles/.gitattributes +++ b/python/databricks/bundles/.gitattributes @@ -1,5 +1,9 @@ -catalogs/** linguist-generated=true -jobs/** linguist-generated=true -pipelines/** linguist-generated=true -schemas/** linguist-generated=true -volumes/** linguist-generated=true +# Generated by pydabs-codegen (see python/codegen). core/ and resources/ are +# hand-written and intentionally excluded. +*/_models/** linguist-generated=true +alerts/__init__.py linguist-generated=true +catalogs/__init__.py linguist-generated=true +jobs/__init__.py linguist-generated=true +pipelines/__init__.py linguist-generated=true +schemas/__init__.py linguist-generated=true +volumes/__init__.py linguist-generated=true diff --git a/python/databricks/bundles/alerts/__init__.py b/python/databricks/bundles/alerts/__init__.py index b948119b07b..ecf5c420b9a 100644 --- a/python/databricks/bundles/alerts/__init__.py +++ b/python/databricks/bundles/alerts/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "Aggregation", "AggregationParam", diff --git a/python/databricks/bundles/alerts/_models/aggregation.py b/python/databricks/bundles/alerts/_models/aggregation.py index 461a439f1bc..ff9efddf6e9 100644 --- a/python/databricks/bundles/alerts/_models/aggregation.py +++ b/python/databricks/bundles/alerts/_models/aggregation.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/alerts/_models/alert.py b/python/databricks/bundles/alerts/_models/alert.py index 44c3894f5b1..d99784a4e17 100644 --- a/python/databricks/bundles/alerts/_models/alert.py +++ b/python/databricks/bundles/alerts/_models/alert.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_evaluation_state.py b/python/databricks/bundles/alerts/_models/alert_evaluation_state.py index 1ca5018bdcc..abee35a5a4a 100644 --- a/python/databricks/bundles/alerts/_models/alert_evaluation_state.py +++ b/python/databricks/bundles/alerts/_models/alert_evaluation_state.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/alerts/_models/alert_statement_parameter.py b/python/databricks/bundles/alerts/_models/alert_statement_parameter.py index 22676634dfd..22d4571f08f 100644 --- a/python/databricks/bundles/alerts/_models/alert_statement_parameter.py +++ b/python/databricks/bundles/alerts/_models/alert_statement_parameter.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py b/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py index 90cc3037b3c..4d599872ccb 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_notification.py b/python/databricks/bundles/alerts/_models/alert_v2_notification.py index 5687a6c5cc7..81c892f1d90 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_notification.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_notification.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_operand.py b/python/databricks/bundles/alerts/_models/alert_v2_operand.py index 8e0268d5895..5e39c938860 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_operand.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_operand.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py b/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py index db9feecb796..da2f90107e8 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py b/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py index 4ffdd9cfb1d..5abc7f386ee 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_run_as.py b/python/databricks/bundles/alerts/_models/alert_v2_run_as.py index 4f01f1e5434..164318184ab 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_run_as.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_run_as.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/alert_v2_subscription.py b/python/databricks/bundles/alerts/_models/alert_v2_subscription.py index dcd2269cd02..8d379a1ced7 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_subscription.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_subscription.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/comparison_operator.py b/python/databricks/bundles/alerts/_models/comparison_operator.py index 49e1736e433..95dc77260a0 100644 --- a/python/databricks/bundles/alerts/_models/comparison_operator.py +++ b/python/databricks/bundles/alerts/_models/comparison_operator.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/alerts/_models/cron_schedule.py b/python/databricks/bundles/alerts/_models/cron_schedule.py index 3c05f727876..987a9a1056b 100644 --- a/python/databricks/bundles/alerts/_models/cron_schedule.py +++ b/python/databricks/bundles/alerts/_models/cron_schedule.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/lifecycle.py b/python/databricks/bundles/alerts/_models/lifecycle.py index c934967f37e..697776a198e 100644 --- a/python/databricks/bundles/alerts/_models/lifecycle.py +++ b/python/databricks/bundles/alerts/_models/lifecycle.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/permission.py b/python/databricks/bundles/alerts/_models/permission.py index a6f8fd0cadb..e4091c6d061 100644 --- a/python/databricks/bundles/alerts/_models/permission.py +++ b/python/databricks/bundles/alerts/_models/permission.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/alerts/_models/permission_level.py b/python/databricks/bundles/alerts/_models/permission_level.py index 88649a15070..c6111911b29 100644 --- a/python/databricks/bundles/alerts/_models/permission_level.py +++ b/python/databricks/bundles/alerts/_models/permission_level.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/alerts/_models/schedule_pause_status.py b/python/databricks/bundles/alerts/_models/schedule_pause_status.py index e0f8856ae35..ab05367f8c1 100644 --- a/python/databricks/bundles/alerts/_models/schedule_pause_status.py +++ b/python/databricks/bundles/alerts/_models/schedule_pause_status.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/catalogs/__init__.py b/python/databricks/bundles/catalogs/__init__.py index af3df5a2c86..f36750b4816 100644 --- a/python/databricks/bundles/catalogs/__init__.py +++ b/python/databricks/bundles/catalogs/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "AzureEncryptionSettings", "AzureEncryptionSettingsDict", diff --git a/python/databricks/bundles/catalogs/_models/azure_encryption_settings.py b/python/databricks/bundles/catalogs/_models/azure_encryption_settings.py index 023e0608d38..d68ba739a24 100644 --- a/python/databricks/bundles/catalogs/_models/azure_encryption_settings.py +++ b/python/databricks/bundles/catalogs/_models/azure_encryption_settings.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/catalogs/_models/catalog.py b/python/databricks/bundles/catalogs/_models/catalog.py index ffdda5725d9..bdb397b0cb0 100644 --- a/python/databricks/bundles/catalogs/_models/catalog.py +++ b/python/databricks/bundles/catalogs/_models/catalog.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/catalogs/_models/encryption_settings.py b/python/databricks/bundles/catalogs/_models/encryption_settings.py index 184997cda55..dfb53029dbe 100644 --- a/python/databricks/bundles/catalogs/_models/encryption_settings.py +++ b/python/databricks/bundles/catalogs/_models/encryption_settings.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/catalogs/_models/lifecycle.py b/python/databricks/bundles/catalogs/_models/lifecycle.py index c934967f37e..697776a198e 100644 --- a/python/databricks/bundles/catalogs/_models/lifecycle.py +++ b/python/databricks/bundles/catalogs/_models/lifecycle.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/catalogs/_models/privilege.py b/python/databricks/bundles/catalogs/_models/privilege.py index 7f118b07668..21a52a2f112 100644 --- a/python/databricks/bundles/catalogs/_models/privilege.py +++ b/python/databricks/bundles/catalogs/_models/privilege.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/catalogs/_models/privilege_assignment.py b/python/databricks/bundles/catalogs/_models/privilege_assignment.py index f3b67558216..a85471c5931 100644 --- a/python/databricks/bundles/catalogs/_models/privilege_assignment.py +++ b/python/databricks/bundles/catalogs/_models/privilege_assignment.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/__init__.py b/python/databricks/bundles/jobs/__init__.py index 338bc69c013..3e775fcb16c 100644 --- a/python/databricks/bundles/jobs/__init__.py +++ b/python/databricks/bundles/jobs/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "Adlsgen2Info", "Adlsgen2InfoDict", diff --git a/python/databricks/bundles/jobs/_models/adlsgen2_info.py b/python/databricks/bundles/jobs/_models/adlsgen2_info.py index 206c8b676ec..87c883adeb9 100644 --- a/python/databricks/bundles/jobs/_models/adlsgen2_info.py +++ b/python/databricks/bundles/jobs/_models/adlsgen2_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/ai_runtime_task.py b/python/databricks/bundles/jobs/_models/ai_runtime_task.py index 7b7608eb19c..3c8a802d5be 100644 --- a/python/databricks/bundles/jobs/_models/ai_runtime_task.py +++ b/python/databricks/bundles/jobs/_models/ai_runtime_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/alert_task.py b/python/databricks/bundles/jobs/_models/alert_task.py index 66da2e9e4e7..9060a9b96df 100644 --- a/python/databricks/bundles/jobs/_models/alert_task.py +++ b/python/databricks/bundles/jobs/_models/alert_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/alert_task_subscriber.py b/python/databricks/bundles/jobs/_models/alert_task_subscriber.py index 0921eb11524..3805069edcf 100644 --- a/python/databricks/bundles/jobs/_models/alert_task_subscriber.py +++ b/python/databricks/bundles/jobs/_models/alert_task_subscriber.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/authentication_method.py b/python/databricks/bundles/jobs/_models/authentication_method.py index 68be0e62184..ba7b603d8d5 100644 --- a/python/databricks/bundles/jobs/_models/authentication_method.py +++ b/python/databricks/bundles/jobs/_models/authentication_method.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/auto_scale.py b/python/databricks/bundles/jobs/_models/auto_scale.py index 6a07ee8b0b1..10ca50c26d7 100644 --- a/python/databricks/bundles/jobs/_models/auto_scale.py +++ b/python/databricks/bundles/jobs/_models/auto_scale.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/aws_attributes.py b/python/databricks/bundles/jobs/_models/aws_attributes.py index 64aa3ab01c0..5eaf7acbed8 100644 --- a/python/databricks/bundles/jobs/_models/aws_attributes.py +++ b/python/databricks/bundles/jobs/_models/aws_attributes.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/aws_availability.py b/python/databricks/bundles/jobs/_models/aws_availability.py index 5d87ffafbac..4c3810f067e 100644 --- a/python/databricks/bundles/jobs/_models/aws_availability.py +++ b/python/databricks/bundles/jobs/_models/aws_availability.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/azure_attributes.py b/python/databricks/bundles/jobs/_models/azure_attributes.py index 05b9add8fb0..64509dcd040 100644 --- a/python/databricks/bundles/jobs/_models/azure_attributes.py +++ b/python/databricks/bundles/jobs/_models/azure_attributes.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/azure_availability.py b/python/databricks/bundles/jobs/_models/azure_availability.py index 72d461d5d71..a03cb1fdddf 100644 --- a/python/databricks/bundles/jobs/_models/azure_availability.py +++ b/python/databricks/bundles/jobs/_models/azure_availability.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/clean_rooms_notebook_task.py b/python/databricks/bundles/jobs/_models/clean_rooms_notebook_task.py index d0281f144ce..52845928fe1 100644 --- a/python/databricks/bundles/jobs/_models/clean_rooms_notebook_task.py +++ b/python/databricks/bundles/jobs/_models/clean_rooms_notebook_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/clients_types.py b/python/databricks/bundles/jobs/_models/clients_types.py index 6891497e55c..87f92446ba5 100644 --- a/python/databricks/bundles/jobs/_models/clients_types.py +++ b/python/databricks/bundles/jobs/_models/clients_types.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/cluster_log_conf.py b/python/databricks/bundles/jobs/_models/cluster_log_conf.py index be698246720..a5ff3dd34f8 100644 --- a/python/databricks/bundles/jobs/_models/cluster_log_conf.py +++ b/python/databricks/bundles/jobs/_models/cluster_log_conf.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/cluster_spec.py b/python/databricks/bundles/jobs/_models/cluster_spec.py index e4b3646ac93..685863137f3 100644 --- a/python/databricks/bundles/jobs/_models/cluster_spec.py +++ b/python/databricks/bundles/jobs/_models/cluster_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/compute.py b/python/databricks/bundles/jobs/_models/compute.py index 3df3b13d7fc..6e6e47d1d7a 100644 --- a/python/databricks/bundles/jobs/_models/compute.py +++ b/python/databricks/bundles/jobs/_models/compute.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/compute_config.py b/python/databricks/bundles/jobs/_models/compute_config.py index 116d91392a4..cac29578ce0 100644 --- a/python/databricks/bundles/jobs/_models/compute_config.py +++ b/python/databricks/bundles/jobs/_models/compute_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/compute_spec.py b/python/databricks/bundles/jobs/_models/compute_spec.py index c6c4206a975..6141e7a2054 100644 --- a/python/databricks/bundles/jobs/_models/compute_spec.py +++ b/python/databricks/bundles/jobs/_models/compute_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/compute_spec_accelerator_type.py b/python/databricks/bundles/jobs/_models/compute_spec_accelerator_type.py index 669a8470065..c3428f40d43 100644 --- a/python/databricks/bundles/jobs/_models/compute_spec_accelerator_type.py +++ b/python/databricks/bundles/jobs/_models/compute_spec_accelerator_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/condition.py b/python/databricks/bundles/jobs/_models/condition.py index d7c1b25bc74..7c242ae9dbf 100644 --- a/python/databricks/bundles/jobs/_models/condition.py +++ b/python/databricks/bundles/jobs/_models/condition.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/condition_task.py b/python/databricks/bundles/jobs/_models/condition_task.py index 4934c16b025..478ca88de11 100644 --- a/python/databricks/bundles/jobs/_models/condition_task.py +++ b/python/databricks/bundles/jobs/_models/condition_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/condition_task_op.py b/python/databricks/bundles/jobs/_models/condition_task_op.py index 099413271ca..615a7ea995c 100644 --- a/python/databricks/bundles/jobs/_models/condition_task_op.py +++ b/python/databricks/bundles/jobs/_models/condition_task_op.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/confidential_compute_type.py b/python/databricks/bundles/jobs/_models/confidential_compute_type.py index 26a2cc842ba..e881295bd47 100644 --- a/python/databricks/bundles/jobs/_models/confidential_compute_type.py +++ b/python/databricks/bundles/jobs/_models/confidential_compute_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/continuous.py b/python/databricks/bundles/jobs/_models/continuous.py index 43268661c13..805c7e1d654 100644 --- a/python/databricks/bundles/jobs/_models/continuous.py +++ b/python/databricks/bundles/jobs/_models/continuous.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/continuous_trigger_configuration.py b/python/databricks/bundles/jobs/_models/continuous_trigger_configuration.py index e6de0bfc48e..866ffda4c61 100644 --- a/python/databricks/bundles/jobs/_models/continuous_trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/continuous_trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/cron_schedule.py b/python/databricks/bundles/jobs/_models/cron_schedule.py index 3a75f9625ec..3c8a37992af 100644 --- a/python/databricks/bundles/jobs/_models/cron_schedule.py +++ b/python/databricks/bundles/jobs/_models/cron_schedule.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/cron_trigger_configuration.py b/python/databricks/bundles/jobs/_models/cron_trigger_configuration.py index 01d7d004183..e62e51e217d 100644 --- a/python/databricks/bundles/jobs/_models/cron_trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/cron_trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/dashboard_task.py b/python/databricks/bundles/jobs/_models/dashboard_task.py index 4fb86a325ca..abc9005172f 100644 --- a/python/databricks/bundles/jobs/_models/dashboard_task.py +++ b/python/databricks/bundles/jobs/_models/dashboard_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/data_security_mode.py b/python/databricks/bundles/jobs/_models/data_security_mode.py index 2a050bfddc5..ae1aafcf085 100644 --- a/python/databricks/bundles/jobs/_models/data_security_mode.py +++ b/python/databricks/bundles/jobs/_models/data_security_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/dbfs_storage_info.py b/python/databricks/bundles/jobs/_models/dbfs_storage_info.py index 81fe319a65e..29744acf26a 100644 --- a/python/databricks/bundles/jobs/_models/dbfs_storage_info.py +++ b/python/databricks/bundles/jobs/_models/dbfs_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/dbt_platform_task.py b/python/databricks/bundles/jobs/_models/dbt_platform_task.py index 992b8e9e922..61128b71634 100644 --- a/python/databricks/bundles/jobs/_models/dbt_platform_task.py +++ b/python/databricks/bundles/jobs/_models/dbt_platform_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/dbt_task.py b/python/databricks/bundles/jobs/_models/dbt_task.py index 52ae3cfa46e..d8c92391e30 100644 --- a/python/databricks/bundles/jobs/_models/dbt_task.py +++ b/python/databricks/bundles/jobs/_models/dbt_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/dependency_mode.py b/python/databricks/bundles/jobs/_models/dependency_mode.py index 6612562f3dd..1fdc22cfa4c 100644 --- a/python/databricks/bundles/jobs/_models/dependency_mode.py +++ b/python/databricks/bundles/jobs/_models/dependency_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/deployment_spec.py b/python/databricks/bundles/jobs/_models/deployment_spec.py index 23ef9dfc16a..21b634a19e3 100644 --- a/python/databricks/bundles/jobs/_models/deployment_spec.py +++ b/python/databricks/bundles/jobs/_models/deployment_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/docker_basic_auth.py b/python/databricks/bundles/jobs/_models/docker_basic_auth.py index 21edca52b71..552ea90a83b 100644 --- a/python/databricks/bundles/jobs/_models/docker_basic_auth.py +++ b/python/databricks/bundles/jobs/_models/docker_basic_auth.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/docker_image.py b/python/databricks/bundles/jobs/_models/docker_image.py index bce0a359893..9dca00df1e2 100644 --- a/python/databricks/bundles/jobs/_models/docker_image.py +++ b/python/databricks/bundles/jobs/_models/docker_image.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/ebs_volume_type.py b/python/databricks/bundles/jobs/_models/ebs_volume_type.py index b67853f8cb8..d8f3ef13f89 100644 --- a/python/databricks/bundles/jobs/_models/ebs_volume_type.py +++ b/python/databricks/bundles/jobs/_models/ebs_volume_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/environment.py b/python/databricks/bundles/jobs/_models/environment.py index dc2e5132d7f..0451fbc667d 100644 --- a/python/databricks/bundles/jobs/_models/environment.py +++ b/python/databricks/bundles/jobs/_models/environment.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/file_arrival_trigger_configuration.py b/python/databricks/bundles/jobs/_models/file_arrival_trigger_configuration.py index cf4ae748cf7..7e31a4b6946 100644 --- a/python/databricks/bundles/jobs/_models/file_arrival_trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/file_arrival_trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/for_each_task.py b/python/databricks/bundles/jobs/_models/for_each_task.py index db353a28851..c8ac1625ff6 100644 --- a/python/databricks/bundles/jobs/_models/for_each_task.py +++ b/python/databricks/bundles/jobs/_models/for_each_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/gcp_attributes.py b/python/databricks/bundles/jobs/_models/gcp_attributes.py index c89d9d31b13..c8d33a8a83d 100644 --- a/python/databricks/bundles/jobs/_models/gcp_attributes.py +++ b/python/databricks/bundles/jobs/_models/gcp_attributes.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/gcp_availability.py b/python/databricks/bundles/jobs/_models/gcp_availability.py index aa8e785a71f..0d391b87fe3 100644 --- a/python/databricks/bundles/jobs/_models/gcp_availability.py +++ b/python/databricks/bundles/jobs/_models/gcp_availability.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/gcs_storage_info.py b/python/databricks/bundles/jobs/_models/gcs_storage_info.py index a5e6d51e6ee..e8f1059373b 100644 --- a/python/databricks/bundles/jobs/_models/gcs_storage_info.py +++ b/python/databricks/bundles/jobs/_models/gcs_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/gen_ai_compute_task.py b/python/databricks/bundles/jobs/_models/gen_ai_compute_task.py index 534e83910e6..4e42c50f81d 100644 --- a/python/databricks/bundles/jobs/_models/gen_ai_compute_task.py +++ b/python/databricks/bundles/jobs/_models/gen_ai_compute_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/git_provider.py b/python/databricks/bundles/jobs/_models/git_provider.py index b3f8a73a376..165f77de5cb 100644 --- a/python/databricks/bundles/jobs/_models/git_provider.py +++ b/python/databricks/bundles/jobs/_models/git_provider.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/git_source.py b/python/databricks/bundles/jobs/_models/git_source.py index a2c09691985..4ddd1d83764 100644 --- a/python/databricks/bundles/jobs/_models/git_source.py +++ b/python/databricks/bundles/jobs/_models/git_source.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/hardware_accelerator_type.py b/python/databricks/bundles/jobs/_models/hardware_accelerator_type.py index feb9f498cef..4b1501f0f25 100644 --- a/python/databricks/bundles/jobs/_models/hardware_accelerator_type.py +++ b/python/databricks/bundles/jobs/_models/hardware_accelerator_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/init_script_info.py b/python/databricks/bundles/jobs/_models/init_script_info.py index 7e125c63dff..a7c5800a594 100644 --- a/python/databricks/bundles/jobs/_models/init_script_info.py +++ b/python/databricks/bundles/jobs/_models/init_script_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job.py b/python/databricks/bundles/jobs/_models/job.py index b6eb2bede9b..d4010ac38f8 100644 --- a/python/databricks/bundles/jobs/_models/job.py +++ b/python/databricks/bundles/jobs/_models/job.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_cluster.py b/python/databricks/bundles/jobs/_models/job_cluster.py index ec9c4e72440..8c3390db857 100644 --- a/python/databricks/bundles/jobs/_models/job_cluster.py +++ b/python/databricks/bundles/jobs/_models/job_cluster.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_email_notifications.py b/python/databricks/bundles/jobs/_models/job_email_notifications.py index e8474261a8d..d9420802ef7 100644 --- a/python/databricks/bundles/jobs/_models/job_email_notifications.py +++ b/python/databricks/bundles/jobs/_models/job_email_notifications.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_environment.py b/python/databricks/bundles/jobs/_models/job_environment.py index ee3769d00f1..c71ee45dbd6 100644 --- a/python/databricks/bundles/jobs/_models/job_environment.py +++ b/python/databricks/bundles/jobs/_models/job_environment.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_notification_settings.py b/python/databricks/bundles/jobs/_models/job_notification_settings.py index a311536fbd9..eb6ca454186 100644 --- a/python/databricks/bundles/jobs/_models/job_notification_settings.py +++ b/python/databricks/bundles/jobs/_models/job_notification_settings.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_parameter_definition.py b/python/databricks/bundles/jobs/_models/job_parameter_definition.py index 8cd8fb9b5f7..3e81a538218 100644 --- a/python/databricks/bundles/jobs/_models/job_parameter_definition.py +++ b/python/databricks/bundles/jobs/_models/job_parameter_definition.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_permission.py b/python/databricks/bundles/jobs/_models/job_permission.py index adf805863cc..6864bf99e23 100644 --- a/python/databricks/bundles/jobs/_models/job_permission.py +++ b/python/databricks/bundles/jobs/_models/job_permission.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/job_permission_level.py b/python/databricks/bundles/jobs/_models/job_permission_level.py index c3ed76bd593..e56c96b09d2 100644 --- a/python/databricks/bundles/jobs/_models/job_permission_level.py +++ b/python/databricks/bundles/jobs/_models/job_permission_level.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/job_run_as.py b/python/databricks/bundles/jobs/_models/job_run_as.py index 4e5c4a72e26..dec1eff158b 100644 --- a/python/databricks/bundles/jobs/_models/job_run_as.py +++ b/python/databricks/bundles/jobs/_models/job_run_as.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/jobs_health_metric.py b/python/databricks/bundles/jobs/_models/jobs_health_metric.py index fcc894a5577..b662439d3ef 100644 --- a/python/databricks/bundles/jobs/_models/jobs_health_metric.py +++ b/python/databricks/bundles/jobs/_models/jobs_health_metric.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/jobs_health_operator.py b/python/databricks/bundles/jobs/_models/jobs_health_operator.py index 2d949ff07ad..3de343a8b6a 100644 --- a/python/databricks/bundles/jobs/_models/jobs_health_operator.py +++ b/python/databricks/bundles/jobs/_models/jobs_health_operator.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/jobs_health_rule.py b/python/databricks/bundles/jobs/_models/jobs_health_rule.py index 0be82576ea2..59447874eda 100644 --- a/python/databricks/bundles/jobs/_models/jobs_health_rule.py +++ b/python/databricks/bundles/jobs/_models/jobs_health_rule.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/jobs_health_rules.py b/python/databricks/bundles/jobs/_models/jobs_health_rules.py index 4f251368d1b..daf613406b5 100644 --- a/python/databricks/bundles/jobs/_models/jobs_health_rules.py +++ b/python/databricks/bundles/jobs/_models/jobs_health_rules.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/kind.py b/python/databricks/bundles/jobs/_models/kind.py index b5408117ef6..8614e25dd52 100644 --- a/python/databricks/bundles/jobs/_models/kind.py +++ b/python/databricks/bundles/jobs/_models/kind.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/library.py b/python/databricks/bundles/jobs/_models/library.py index c8d4b5f5b5e..29d4c5b1fdd 100644 --- a/python/databricks/bundles/jobs/_models/library.py +++ b/python/databricks/bundles/jobs/_models/library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/lifecycle.py b/python/databricks/bundles/jobs/_models/lifecycle.py index c934967f37e..697776a198e 100644 --- a/python/databricks/bundles/jobs/_models/lifecycle.py +++ b/python/databricks/bundles/jobs/_models/lifecycle.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/local_file_info.py b/python/databricks/bundles/jobs/_models/local_file_info.py index 70d6f258200..875f2fe8353 100644 --- a/python/databricks/bundles/jobs/_models/local_file_info.py +++ b/python/databricks/bundles/jobs/_models/local_file_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/log_analytics_info.py b/python/databricks/bundles/jobs/_models/log_analytics_info.py index 5eced870a1e..67cdf85b2b9 100644 --- a/python/databricks/bundles/jobs/_models/log_analytics_info.py +++ b/python/databricks/bundles/jobs/_models/log_analytics_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/maven_library.py b/python/databricks/bundles/jobs/_models/maven_library.py index 45925700b82..25be1599c28 100644 --- a/python/databricks/bundles/jobs/_models/maven_library.py +++ b/python/databricks/bundles/jobs/_models/maven_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/model_trigger_configuration.py b/python/databricks/bundles/jobs/_models/model_trigger_configuration.py index eebf5713a93..29ba7ed1479 100644 --- a/python/databricks/bundles/jobs/_models/model_trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/model_trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/model_trigger_configuration_condition.py b/python/databricks/bundles/jobs/_models/model_trigger_configuration_condition.py index 60d942a2c57..013f413303b 100644 --- a/python/databricks/bundles/jobs/_models/model_trigger_configuration_condition.py +++ b/python/databricks/bundles/jobs/_models/model_trigger_configuration_condition.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/node_type_flexibility.py b/python/databricks/bundles/jobs/_models/node_type_flexibility.py index 1f6dade3569..aa582b763a8 100644 --- a/python/databricks/bundles/jobs/_models/node_type_flexibility.py +++ b/python/databricks/bundles/jobs/_models/node_type_flexibility.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/notebook_task.py b/python/databricks/bundles/jobs/_models/notebook_task.py index 3585a849419..7b4329392db 100644 --- a/python/databricks/bundles/jobs/_models/notebook_task.py +++ b/python/databricks/bundles/jobs/_models/notebook_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/pause_status.py b/python/databricks/bundles/jobs/_models/pause_status.py index ee701fa10c9..9e5044fb880 100644 --- a/python/databricks/bundles/jobs/_models/pause_status.py +++ b/python/databricks/bundles/jobs/_models/pause_status.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/performance_target.py b/python/databricks/bundles/jobs/_models/performance_target.py index 5e7b83ae616..8dbe7e4a435 100644 --- a/python/databricks/bundles/jobs/_models/performance_target.py +++ b/python/databricks/bundles/jobs/_models/performance_target.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/periodic_trigger_configuration.py b/python/databricks/bundles/jobs/_models/periodic_trigger_configuration.py index 5ff5479a886..2e7215aad06 100644 --- a/python/databricks/bundles/jobs/_models/periodic_trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/periodic_trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/periodic_trigger_configuration_time_unit.py b/python/databricks/bundles/jobs/_models/periodic_trigger_configuration_time_unit.py index c049a9788bb..e035958b12c 100644 --- a/python/databricks/bundles/jobs/_models/periodic_trigger_configuration_time_unit.py +++ b/python/databricks/bundles/jobs/_models/periodic_trigger_configuration_time_unit.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/pipeline_params.py b/python/databricks/bundles/jobs/_models/pipeline_params.py index 6c653b3e6c3..0d84734931d 100644 --- a/python/databricks/bundles/jobs/_models/pipeline_params.py +++ b/python/databricks/bundles/jobs/_models/pipeline_params.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/pipeline_task.py b/python/databricks/bundles/jobs/_models/pipeline_task.py index 256a5d8f913..e23ed9da713 100644 --- a/python/databricks/bundles/jobs/_models/pipeline_task.py +++ b/python/databricks/bundles/jobs/_models/pipeline_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/power_bi_model.py b/python/databricks/bundles/jobs/_models/power_bi_model.py index 72ddd53ea21..f791b1901a8 100644 --- a/python/databricks/bundles/jobs/_models/power_bi_model.py +++ b/python/databricks/bundles/jobs/_models/power_bi_model.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/power_bi_table.py b/python/databricks/bundles/jobs/_models/power_bi_table.py index 4c91b194cf5..368f432c45d 100644 --- a/python/databricks/bundles/jobs/_models/power_bi_table.py +++ b/python/databricks/bundles/jobs/_models/power_bi_table.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/power_bi_task.py b/python/databricks/bundles/jobs/_models/power_bi_task.py index 61d6930d1bf..cd6246cbca8 100644 --- a/python/databricks/bundles/jobs/_models/power_bi_task.py +++ b/python/databricks/bundles/jobs/_models/power_bi_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/python_operator_task.py b/python/databricks/bundles/jobs/_models/python_operator_task.py index be557e49e63..a2ca2be4c3b 100644 --- a/python/databricks/bundles/jobs/_models/python_operator_task.py +++ b/python/databricks/bundles/jobs/_models/python_operator_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/python_operator_task_parameter.py b/python/databricks/bundles/jobs/_models/python_operator_task_parameter.py index e109668e4e2..867dff0db64 100644 --- a/python/databricks/bundles/jobs/_models/python_operator_task_parameter.py +++ b/python/databricks/bundles/jobs/_models/python_operator_task_parameter.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/python_py_pi_library.py b/python/databricks/bundles/jobs/_models/python_py_pi_library.py index 58db37caf5b..037c2029f50 100644 --- a/python/databricks/bundles/jobs/_models/python_py_pi_library.py +++ b/python/databricks/bundles/jobs/_models/python_py_pi_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/python_wheel_task.py b/python/databricks/bundles/jobs/_models/python_wheel_task.py index 07a230d8f59..ce2dea3ea15 100644 --- a/python/databricks/bundles/jobs/_models/python_wheel_task.py +++ b/python/databricks/bundles/jobs/_models/python_wheel_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/queue_settings.py b/python/databricks/bundles/jobs/_models/queue_settings.py index c0c2b5af346..a72921aed96 100644 --- a/python/databricks/bundles/jobs/_models/queue_settings.py +++ b/python/databricks/bundles/jobs/_models/queue_settings.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/r_cran_library.py b/python/databricks/bundles/jobs/_models/r_cran_library.py index 0770f2265aa..0bd2c4d5296 100644 --- a/python/databricks/bundles/jobs/_models/r_cran_library.py +++ b/python/databricks/bundles/jobs/_models/r_cran_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/run_if.py b/python/databricks/bundles/jobs/_models/run_if.py index d61bf51eac3..fdbf95b1bc2 100644 --- a/python/databricks/bundles/jobs/_models/run_if.py +++ b/python/databricks/bundles/jobs/_models/run_if.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/run_job_task.py b/python/databricks/bundles/jobs/_models/run_job_task.py index c7b88ee5eaa..24d0246a8a7 100644 --- a/python/databricks/bundles/jobs/_models/run_job_task.py +++ b/python/databricks/bundles/jobs/_models/run_job_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/runtime_engine.py b/python/databricks/bundles/jobs/_models/runtime_engine.py index 1829c507e7e..2e1559fa801 100644 --- a/python/databricks/bundles/jobs/_models/runtime_engine.py +++ b/python/databricks/bundles/jobs/_models/runtime_engine.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/s3_storage_info.py b/python/databricks/bundles/jobs/_models/s3_storage_info.py index b5e09063e51..071abd5b6f3 100644 --- a/python/databricks/bundles/jobs/_models/s3_storage_info.py +++ b/python/databricks/bundles/jobs/_models/s3_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/source.py b/python/databricks/bundles/jobs/_models/source.py index c9e02d4a437..380ab711022 100644 --- a/python/databricks/bundles/jobs/_models/source.py +++ b/python/databricks/bundles/jobs/_models/source.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/spark_jar_task.py b/python/databricks/bundles/jobs/_models/spark_jar_task.py index 9b727384377..d782da867f3 100644 --- a/python/databricks/bundles/jobs/_models/spark_jar_task.py +++ b/python/databricks/bundles/jobs/_models/spark_jar_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/spark_python_task.py b/python/databricks/bundles/jobs/_models/spark_python_task.py index fe5a3fcce3e..001d9287b1c 100644 --- a/python/databricks/bundles/jobs/_models/spark_python_task.py +++ b/python/databricks/bundles/jobs/_models/spark_python_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/spark_submit_task.py b/python/databricks/bundles/jobs/_models/spark_submit_task.py index c809dbe7211..2acc389b91b 100644 --- a/python/databricks/bundles/jobs/_models/spark_submit_task.py +++ b/python/databricks/bundles/jobs/_models/spark_submit_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sparse_checkout.py b/python/databricks/bundles/jobs/_models/sparse_checkout.py index 47e41f54bb8..a42a78e49f1 100644 --- a/python/databricks/bundles/jobs/_models/sparse_checkout.py +++ b/python/databricks/bundles/jobs/_models/sparse_checkout.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_condition_configuration.py b/python/databricks/bundles/jobs/_models/sql_condition_configuration.py index c459eb896a1..f6b2da80685 100644 --- a/python/databricks/bundles/jobs/_models/sql_condition_configuration.py +++ b/python/databricks/bundles/jobs/_models/sql_condition_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_condition_trigger_mode.py b/python/databricks/bundles/jobs/_models/sql_condition_trigger_mode.py index 677e0bdd4b8..c2b8472faea 100644 --- a/python/databricks/bundles/jobs/_models/sql_condition_trigger_mode.py +++ b/python/databricks/bundles/jobs/_models/sql_condition_trigger_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/sql_task.py b/python/databricks/bundles/jobs/_models/sql_task.py index f404a5b7a91..dd731928af0 100644 --- a/python/databricks/bundles/jobs/_models/sql_task.py +++ b/python/databricks/bundles/jobs/_models/sql_task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_task_alert.py b/python/databricks/bundles/jobs/_models/sql_task_alert.py index 513eecd7104..6db18d1c876 100644 --- a/python/databricks/bundles/jobs/_models/sql_task_alert.py +++ b/python/databricks/bundles/jobs/_models/sql_task_alert.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_task_dashboard.py b/python/databricks/bundles/jobs/_models/sql_task_dashboard.py index bc0a9b831fe..98e544e5aa0 100644 --- a/python/databricks/bundles/jobs/_models/sql_task_dashboard.py +++ b/python/databricks/bundles/jobs/_models/sql_task_dashboard.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_task_file.py b/python/databricks/bundles/jobs/_models/sql_task_file.py index a0c02a2ca1a..8a49f54c7b7 100644 --- a/python/databricks/bundles/jobs/_models/sql_task_file.py +++ b/python/databricks/bundles/jobs/_models/sql_task_file.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_task_query.py b/python/databricks/bundles/jobs/_models/sql_task_query.py index c367bff828b..2682c425112 100644 --- a/python/databricks/bundles/jobs/_models/sql_task_query.py +++ b/python/databricks/bundles/jobs/_models/sql_task_query.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/sql_task_subscription.py b/python/databricks/bundles/jobs/_models/sql_task_subscription.py index e58319b5386..d5f2a65ddf5 100644 --- a/python/databricks/bundles/jobs/_models/sql_task_subscription.py +++ b/python/databricks/bundles/jobs/_models/sql_task_subscription.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/storage_mode.py b/python/databricks/bundles/jobs/_models/storage_mode.py index 764e2e7d54a..f15a94689d6 100644 --- a/python/databricks/bundles/jobs/_models/storage_mode.py +++ b/python/databricks/bundles/jobs/_models/storage_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/subscription.py b/python/databricks/bundles/jobs/_models/subscription.py index 5636e02d312..3107959902b 100644 --- a/python/databricks/bundles/jobs/_models/subscription.py +++ b/python/databricks/bundles/jobs/_models/subscription.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/subscription_subscriber.py b/python/databricks/bundles/jobs/_models/subscription_subscriber.py index bb45559505b..d03875f1ab2 100644 --- a/python/databricks/bundles/jobs/_models/subscription_subscriber.py +++ b/python/databricks/bundles/jobs/_models/subscription_subscriber.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/table_update_trigger_configuration.py b/python/databricks/bundles/jobs/_models/table_update_trigger_configuration.py index c824a724999..24cf1301154 100644 --- a/python/databricks/bundles/jobs/_models/table_update_trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/table_update_trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/task.py b/python/databricks/bundles/jobs/_models/task.py index 78c87da5052..1b352983859 100644 --- a/python/databricks/bundles/jobs/_models/task.py +++ b/python/databricks/bundles/jobs/_models/task.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/task_dependency.py b/python/databricks/bundles/jobs/_models/task_dependency.py index 5f8fd3e6074..a1e18f0bb59 100644 --- a/python/databricks/bundles/jobs/_models/task_dependency.py +++ b/python/databricks/bundles/jobs/_models/task_dependency.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/task_email_notifications.py b/python/databricks/bundles/jobs/_models/task_email_notifications.py index 5b0ae515f61..fca8c3255b1 100644 --- a/python/databricks/bundles/jobs/_models/task_email_notifications.py +++ b/python/databricks/bundles/jobs/_models/task_email_notifications.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/task_notification_settings.py b/python/databricks/bundles/jobs/_models/task_notification_settings.py index 87ca47ac9c3..346f4463b9a 100644 --- a/python/databricks/bundles/jobs/_models/task_notification_settings.py +++ b/python/databricks/bundles/jobs/_models/task_notification_settings.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/task_retry_mode.py b/python/databricks/bundles/jobs/_models/task_retry_mode.py index ce5ccaa6878..f0642b54f2c 100644 --- a/python/databricks/bundles/jobs/_models/task_retry_mode.py +++ b/python/databricks/bundles/jobs/_models/task_retry_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/jobs/_models/trigger_configuration.py b/python/databricks/bundles/jobs/_models/trigger_configuration.py index 155080b5e55..259c45c7f9d 100644 --- a/python/databricks/bundles/jobs/_models/trigger_configuration.py +++ b/python/databricks/bundles/jobs/_models/trigger_configuration.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/trigger_settings.py b/python/databricks/bundles/jobs/_models/trigger_settings.py index 826282f15bc..878f45732fa 100644 --- a/python/databricks/bundles/jobs/_models/trigger_settings.py +++ b/python/databricks/bundles/jobs/_models/trigger_settings.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/volumes_storage_info.py b/python/databricks/bundles/jobs/_models/volumes_storage_info.py index cbe74758fc7..1eb4fff7bc2 100644 --- a/python/databricks/bundles/jobs/_models/volumes_storage_info.py +++ b/python/databricks/bundles/jobs/_models/volumes_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/webhook.py b/python/databricks/bundles/jobs/_models/webhook.py index 5e47d57f83a..17a391ac2c2 100644 --- a/python/databricks/bundles/jobs/_models/webhook.py +++ b/python/databricks/bundles/jobs/_models/webhook.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/webhook_notifications.py b/python/databricks/bundles/jobs/_models/webhook_notifications.py index ffd043261dc..32358a8280e 100644 --- a/python/databricks/bundles/jobs/_models/webhook_notifications.py +++ b/python/databricks/bundles/jobs/_models/webhook_notifications.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/workload_type.py b/python/databricks/bundles/jobs/_models/workload_type.py index db40f98df0a..033590c3949 100644 --- a/python/databricks/bundles/jobs/_models/workload_type.py +++ b/python/databricks/bundles/jobs/_models/workload_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/jobs/_models/workspace_storage_info.py b/python/databricks/bundles/jobs/_models/workspace_storage_info.py index 29c075ac2f3..49aef9256c8 100644 --- a/python/databricks/bundles/jobs/_models/workspace_storage_info.py +++ b/python/databricks/bundles/jobs/_models/workspace_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/__init__.py b/python/databricks/bundles/pipelines/__init__.py index 2fdf1c4cd06..c3cdbee96f7 100644 --- a/python/databricks/bundles/pipelines/__init__.py +++ b/python/databricks/bundles/pipelines/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "Adlsgen2Info", "Adlsgen2InfoDict", diff --git a/python/databricks/bundles/pipelines/_models/adlsgen2_info.py b/python/databricks/bundles/pipelines/_models/adlsgen2_info.py index 206c8b676ec..87c883adeb9 100644 --- a/python/databricks/bundles/pipelines/_models/adlsgen2_info.py +++ b/python/databricks/bundles/pipelines/_models/adlsgen2_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/api_source_connector_config.py b/python/databricks/bundles/pipelines/_models/api_source_connector_config.py index 69c3047f100..2ab533ab32f 100644 --- a/python/databricks/bundles/pipelines/_models/api_source_connector_config.py +++ b/python/databricks/bundles/pipelines/_models/api_source_connector_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/api_source_connector_options.py b/python/databricks/bundles/pipelines/_models/api_source_connector_options.py index f44041c7b0a..2e0f23c0f03 100644 --- a/python/databricks/bundles/pipelines/_models/api_source_connector_options.py +++ b/python/databricks/bundles/pipelines/_models/api_source_connector_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/auto_full_refresh_policy.py b/python/databricks/bundles/pipelines/_models/auto_full_refresh_policy.py index 3a538d30fa6..2ee3ed2382a 100644 --- a/python/databricks/bundles/pipelines/_models/auto_full_refresh_policy.py +++ b/python/databricks/bundles/pipelines/_models/auto_full_refresh_policy.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/aws_attributes.py b/python/databricks/bundles/pipelines/_models/aws_attributes.py index 96d999815de..3308f3c6e96 100644 --- a/python/databricks/bundles/pipelines/_models/aws_attributes.py +++ b/python/databricks/bundles/pipelines/_models/aws_attributes.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/aws_availability.py b/python/databricks/bundles/pipelines/_models/aws_availability.py index 5d87ffafbac..4c3810f067e 100644 --- a/python/databricks/bundles/pipelines/_models/aws_availability.py +++ b/python/databricks/bundles/pipelines/_models/aws_availability.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/azure_attributes.py b/python/databricks/bundles/pipelines/_models/azure_attributes.py index c03d336f3b2..7caff90e481 100644 --- a/python/databricks/bundles/pipelines/_models/azure_attributes.py +++ b/python/databricks/bundles/pipelines/_models/azure_attributes.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/azure_availability.py b/python/databricks/bundles/pipelines/_models/azure_availability.py index 72d461d5d71..a03cb1fdddf 100644 --- a/python/databricks/bundles/pipelines/_models/azure_availability.py +++ b/python/databricks/bundles/pipelines/_models/azure_availability.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/cluster_log_conf.py b/python/databricks/bundles/pipelines/_models/cluster_log_conf.py index f0b4f985455..74c9dd37df4 100644 --- a/python/databricks/bundles/pipelines/_models/cluster_log_conf.py +++ b/python/databricks/bundles/pipelines/_models/cluster_log_conf.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/confidential_compute_type.py b/python/databricks/bundles/pipelines/_models/confidential_compute_type.py index 26a2cc842ba..e881295bd47 100644 --- a/python/databricks/bundles/pipelines/_models/confidential_compute_type.py +++ b/python/databricks/bundles/pipelines/_models/confidential_compute_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/confluence_connector_options.py b/python/databricks/bundles/pipelines/_models/confluence_connector_options.py index 0c6ed1f1ebe..39f414edbd2 100644 --- a/python/databricks/bundles/pipelines/_models/confluence_connector_options.py +++ b/python/databricks/bundles/pipelines/_models/confluence_connector_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/connection_parameters.py b/python/databricks/bundles/pipelines/_models/connection_parameters.py index e4c3d43cc59..bb13f406413 100644 --- a/python/databricks/bundles/pipelines/_models/connection_parameters.py +++ b/python/databricks/bundles/pipelines/_models/connection_parameters.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/connector_options.py b/python/databricks/bundles/pipelines/_models/connector_options.py index 370e45df6a9..5fc9bfce6cc 100644 --- a/python/databricks/bundles/pipelines/_models/connector_options.py +++ b/python/databricks/bundles/pipelines/_models/connector_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/connector_type.py b/python/databricks/bundles/pipelines/_models/connector_type.py index 95e7aa95ad5..e8c7fb15931 100644 --- a/python/databricks/bundles/pipelines/_models/connector_type.py +++ b/python/databricks/bundles/pipelines/_models/connector_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/data_staging_options.py b/python/databricks/bundles/pipelines/_models/data_staging_options.py index 15840321abd..62672108bbd 100644 --- a/python/databricks/bundles/pipelines/_models/data_staging_options.py +++ b/python/databricks/bundles/pipelines/_models/data_staging_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/day_of_week.py b/python/databricks/bundles/pipelines/_models/day_of_week.py index 648acf7f795..8ba5a7c1ab6 100644 --- a/python/databricks/bundles/pipelines/_models/day_of_week.py +++ b/python/databricks/bundles/pipelines/_models/day_of_week.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/dbfs_storage_info.py b/python/databricks/bundles/pipelines/_models/dbfs_storage_info.py index 81fe319a65e..29744acf26a 100644 --- a/python/databricks/bundles/pipelines/_models/dbfs_storage_info.py +++ b/python/databricks/bundles/pipelines/_models/dbfs_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/ebs_volume_type.py b/python/databricks/bundles/pipelines/_models/ebs_volume_type.py index b67853f8cb8..d8f3ef13f89 100644 --- a/python/databricks/bundles/pipelines/_models/ebs_volume_type.py +++ b/python/databricks/bundles/pipelines/_models/ebs_volume_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/event_log_spec.py b/python/databricks/bundles/pipelines/_models/event_log_spec.py index 9b7f5dcdcca..d415ee83246 100644 --- a/python/databricks/bundles/pipelines/_models/event_log_spec.py +++ b/python/databricks/bundles/pipelines/_models/event_log_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/file_filter.py b/python/databricks/bundles/pipelines/_models/file_filter.py index 8d24212250d..7e80f319c0f 100644 --- a/python/databricks/bundles/pipelines/_models/file_filter.py +++ b/python/databricks/bundles/pipelines/_models/file_filter.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/file_ingestion_options.py b/python/databricks/bundles/pipelines/_models/file_ingestion_options.py index c3855364f72..0e6d82d6684 100644 --- a/python/databricks/bundles/pipelines/_models/file_ingestion_options.py +++ b/python/databricks/bundles/pipelines/_models/file_ingestion_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/file_ingestion_options_file_format.py b/python/databricks/bundles/pipelines/_models/file_ingestion_options_file_format.py index bf5838c8701..25838583512 100644 --- a/python/databricks/bundles/pipelines/_models/file_ingestion_options_file_format.py +++ b/python/databricks/bundles/pipelines/_models/file_ingestion_options_file_format.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/file_ingestion_options_schema_evolution_mode.py b/python/databricks/bundles/pipelines/_models/file_ingestion_options_schema_evolution_mode.py index 191e0cdf994..6d136255c5f 100644 --- a/python/databricks/bundles/pipelines/_models/file_ingestion_options_schema_evolution_mode.py +++ b/python/databricks/bundles/pipelines/_models/file_ingestion_options_schema_evolution_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/file_library.py b/python/databricks/bundles/pipelines/_models/file_library.py index 612c1e05bd3..4fbf2a564af 100644 --- a/python/databricks/bundles/pipelines/_models/file_library.py +++ b/python/databricks/bundles/pipelines/_models/file_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/filters.py b/python/databricks/bundles/pipelines/_models/filters.py index 13f29eeb491..c9dc61c8c0c 100644 --- a/python/databricks/bundles/pipelines/_models/filters.py +++ b/python/databricks/bundles/pipelines/_models/filters.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/gcp_attributes.py b/python/databricks/bundles/pipelines/_models/gcp_attributes.py index be4ef269052..ba466fb2da8 100644 --- a/python/databricks/bundles/pipelines/_models/gcp_attributes.py +++ b/python/databricks/bundles/pipelines/_models/gcp_attributes.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/gcp_availability.py b/python/databricks/bundles/pipelines/_models/gcp_availability.py index aa8e785a71f..0d391b87fe3 100644 --- a/python/databricks/bundles/pipelines/_models/gcp_availability.py +++ b/python/databricks/bundles/pipelines/_models/gcp_availability.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/gcs_storage_info.py b/python/databricks/bundles/pipelines/_models/gcs_storage_info.py index a5e6d51e6ee..e8f1059373b 100644 --- a/python/databricks/bundles/pipelines/_models/gcs_storage_info.py +++ b/python/databricks/bundles/pipelines/_models/gcs_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/google_ads_config.py b/python/databricks/bundles/pipelines/_models/google_ads_config.py index 68ad306a40c..3ddb52b9667 100644 --- a/python/databricks/bundles/pipelines/_models/google_ads_config.py +++ b/python/databricks/bundles/pipelines/_models/google_ads_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/google_ads_custom_report_options.py b/python/databricks/bundles/pipelines/_models/google_ads_custom_report_options.py index 6cab19509e4..441a8947342 100644 --- a/python/databricks/bundles/pipelines/_models/google_ads_custom_report_options.py +++ b/python/databricks/bundles/pipelines/_models/google_ads_custom_report_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/google_ads_options.py b/python/databricks/bundles/pipelines/_models/google_ads_options.py index 822122b4b67..33d94383803 100644 --- a/python/databricks/bundles/pipelines/_models/google_ads_options.py +++ b/python/databricks/bundles/pipelines/_models/google_ads_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/google_drive_options.py b/python/databricks/bundles/pipelines/_models/google_drive_options.py index 968daabefb7..e11b5048555 100644 --- a/python/databricks/bundles/pipelines/_models/google_drive_options.py +++ b/python/databricks/bundles/pipelines/_models/google_drive_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/google_drive_options_google_drive_entity_type.py b/python/databricks/bundles/pipelines/_models/google_drive_options_google_drive_entity_type.py index 136b3aff953..b3b9847c550 100644 --- a/python/databricks/bundles/pipelines/_models/google_drive_options_google_drive_entity_type.py +++ b/python/databricks/bundles/pipelines/_models/google_drive_options_google_drive_entity_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/ingestion_config.py b/python/databricks/bundles/pipelines/_models/ingestion_config.py index b9276540f8a..d301a71fb87 100644 --- a/python/databricks/bundles/pipelines/_models/ingestion_config.py +++ b/python/databricks/bundles/pipelines/_models/ingestion_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/ingestion_gateway_pipeline_definition.py b/python/databricks/bundles/pipelines/_models/ingestion_gateway_pipeline_definition.py index a1f73e0a85c..56282a61fea 100644 --- a/python/databricks/bundles/pipelines/_models/ingestion_gateway_pipeline_definition.py +++ b/python/databricks/bundles/pipelines/_models/ingestion_gateway_pipeline_definition.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition.py b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition.py index c033e451d2c..605a119255e 100644 --- a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition.py +++ b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_fanout_options.py b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_fanout_options.py index c7c433a984c..d2e17ce0c9d 100644 --- a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_fanout_options.py +++ b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_fanout_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_table_specific_config_query_based_connector_config.py b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_table_specific_config_query_based_connector_config.py index 33a73ffa5c8..2ef994bb09e 100644 --- a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_table_specific_config_query_based_connector_config.py +++ b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_table_specific_config_query_based_connector_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_workday_report_parameters.py b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_workday_report_parameters.py index c86ff492d22..a819adcf236 100644 --- a/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_workday_report_parameters.py +++ b/python/databricks/bundles/pipelines/_models/ingestion_pipeline_definition_workday_report_parameters.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/init_script_info.py b/python/databricks/bundles/pipelines/_models/init_script_info.py index 60e72762837..f6c696d11bd 100644 --- a/python/databricks/bundles/pipelines/_models/init_script_info.py +++ b/python/databricks/bundles/pipelines/_models/init_script_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/jira_connector_options.py b/python/databricks/bundles/pipelines/_models/jira_connector_options.py index ed97e56ddfd..beb6f273455 100644 --- a/python/databricks/bundles/pipelines/_models/jira_connector_options.py +++ b/python/databricks/bundles/pipelines/_models/jira_connector_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/json_transformer_options.py b/python/databricks/bundles/pipelines/_models/json_transformer_options.py index 88bd9c2fa8e..ef2b9592efc 100644 --- a/python/databricks/bundles/pipelines/_models/json_transformer_options.py +++ b/python/databricks/bundles/pipelines/_models/json_transformer_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/kafka_options.py b/python/databricks/bundles/pipelines/_models/kafka_options.py index 61cd437c607..3277d532b86 100644 --- a/python/databricks/bundles/pipelines/_models/kafka_options.py +++ b/python/databricks/bundles/pipelines/_models/kafka_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/lifecycle.py b/python/databricks/bundles/pipelines/_models/lifecycle.py index c934967f37e..697776a198e 100644 --- a/python/databricks/bundles/pipelines/_models/lifecycle.py +++ b/python/databricks/bundles/pipelines/_models/lifecycle.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/linked_in_ads_options.py b/python/databricks/bundles/pipelines/_models/linked_in_ads_options.py index 37cabd3fc72..1d997abc919 100644 --- a/python/databricks/bundles/pipelines/_models/linked_in_ads_options.py +++ b/python/databricks/bundles/pipelines/_models/linked_in_ads_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options.py b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options.py index 31c9ad557a0..1420eb50d50 100644 --- a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options.py +++ b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_entity_granularity.py b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_entity_granularity.py index a9281cc3c05..ae32b0b83a4 100644 --- a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_entity_granularity.py +++ b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_entity_granularity.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_finder.py b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_finder.py index 9bf28e8ab92..9abf3e9d7be 100644 --- a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_finder.py +++ b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_finder.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_time_granularity.py b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_time_granularity.py index 0c5e9f2a4bf..256974843ea 100644 --- a/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_time_granularity.py +++ b/python/databricks/bundles/pipelines/_models/linked_in_ads_options_linked_in_ads_custom_report_options_linked_in_ads_time_granularity.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/local_file_info.py b/python/databricks/bundles/pipelines/_models/local_file_info.py index 70d6f258200..875f2fe8353 100644 --- a/python/databricks/bundles/pipelines/_models/local_file_info.py +++ b/python/databricks/bundles/pipelines/_models/local_file_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/log_analytics_info.py b/python/databricks/bundles/pipelines/_models/log_analytics_info.py index 5eced870a1e..67cdf85b2b9 100644 --- a/python/databricks/bundles/pipelines/_models/log_analytics_info.py +++ b/python/databricks/bundles/pipelines/_models/log_analytics_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/marketo_options.py b/python/databricks/bundles/pipelines/_models/marketo_options.py index 7c822e1465f..943dba4ff7b 100644 --- a/python/databricks/bundles/pipelines/_models/marketo_options.py +++ b/python/databricks/bundles/pipelines/_models/marketo_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/maven_library.py b/python/databricks/bundles/pipelines/_models/maven_library.py index 45925700b82..25be1599c28 100644 --- a/python/databricks/bundles/pipelines/_models/maven_library.py +++ b/python/databricks/bundles/pipelines/_models/maven_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/meta_marketing_options.py b/python/databricks/bundles/pipelines/_models/meta_marketing_options.py index 9378ee27ec2..4a3a244183f 100644 --- a/python/databricks/bundles/pipelines/_models/meta_marketing_options.py +++ b/python/databricks/bundles/pipelines/_models/meta_marketing_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/meta_marketing_options_meta_marketing_custom_report_options.py b/python/databricks/bundles/pipelines/_models/meta_marketing_options_meta_marketing_custom_report_options.py index 4b19c3afc42..a01a24ec45b 100644 --- a/python/databricks/bundles/pipelines/_models/meta_marketing_options_meta_marketing_custom_report_options.py +++ b/python/databricks/bundles/pipelines/_models/meta_marketing_options_meta_marketing_custom_report_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/notebook_library.py b/python/databricks/bundles/pipelines/_models/notebook_library.py index 5cc6ae9ee34..72ded094151 100644 --- a/python/databricks/bundles/pipelines/_models/notebook_library.py +++ b/python/databricks/bundles/pipelines/_models/notebook_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/notifications.py b/python/databricks/bundles/pipelines/_models/notifications.py index 22dbec8d709..271bb4c1fdb 100644 --- a/python/databricks/bundles/pipelines/_models/notifications.py +++ b/python/databricks/bundles/pipelines/_models/notifications.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/operation_time_window.py b/python/databricks/bundles/pipelines/_models/operation_time_window.py index 8acd9ea7bb8..cc3c315d6de 100644 --- a/python/databricks/bundles/pipelines/_models/operation_time_window.py +++ b/python/databricks/bundles/pipelines/_models/operation_time_window.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/outlook_attachment_mode.py b/python/databricks/bundles/pipelines/_models/outlook_attachment_mode.py index dab9825c251..5d3c5fa042f 100644 --- a/python/databricks/bundles/pipelines/_models/outlook_attachment_mode.py +++ b/python/databricks/bundles/pipelines/_models/outlook_attachment_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/outlook_body_format.py b/python/databricks/bundles/pipelines/_models/outlook_body_format.py index 2354444c584..e5f409e0412 100644 --- a/python/databricks/bundles/pipelines/_models/outlook_body_format.py +++ b/python/databricks/bundles/pipelines/_models/outlook_body_format.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/outlook_options.py b/python/databricks/bundles/pipelines/_models/outlook_options.py index 36fafbdfd91..98e93a16a69 100644 --- a/python/databricks/bundles/pipelines/_models/outlook_options.py +++ b/python/databricks/bundles/pipelines/_models/outlook_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/path_pattern.py b/python/databricks/bundles/pipelines/_models/path_pattern.py index 55ad00ebd38..6df8c4c5a3f 100644 --- a/python/databricks/bundles/pipelines/_models/path_pattern.py +++ b/python/databricks/bundles/pipelines/_models/path_pattern.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/pipeline.py b/python/databricks/bundles/pipelines/_models/pipeline.py index a54a284644c..9f179f7c7a9 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline.py +++ b/python/databricks/bundles/pipelines/_models/pipeline.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/pipeline_cluster.py b/python/databricks/bundles/pipelines/_models/pipeline_cluster.py index 01563f6a850..6261e74e5da 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline_cluster.py +++ b/python/databricks/bundles/pipelines/_models/pipeline_cluster.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale.py b/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale.py index 58afdbefabe..d5ba9da3665 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale.py +++ b/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale_mode.py b/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale_mode.py index 21d2e054cb1..52afa7d09d1 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale_mode.py +++ b/python/databricks/bundles/pipelines/_models/pipeline_cluster_autoscale_mode.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/pipeline_library.py b/python/databricks/bundles/pipelines/_models/pipeline_library.py index 90d048f9644..5639f57fb2f 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline_library.py +++ b/python/databricks/bundles/pipelines/_models/pipeline_library.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/pipeline_permission.py b/python/databricks/bundles/pipelines/_models/pipeline_permission.py index 66ef2cbcf91..e7b9c90f94e 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline_permission.py +++ b/python/databricks/bundles/pipelines/_models/pipeline_permission.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/pipeline_permission_level.py b/python/databricks/bundles/pipelines/_models/pipeline_permission_level.py index 746bedc51ab..5c2d68bfe57 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline_permission_level.py +++ b/python/databricks/bundles/pipelines/_models/pipeline_permission_level.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/pipelines_environment.py b/python/databricks/bundles/pipelines/_models/pipelines_environment.py index c56eccdea8a..095104bf8a2 100644 --- a/python/databricks/bundles/pipelines/_models/pipelines_environment.py +++ b/python/databricks/bundles/pipelines/_models/pipelines_environment.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/postgres_catalog_config.py b/python/databricks/bundles/pipelines/_models/postgres_catalog_config.py index a25c35870a9..0bc642e8a5a 100644 --- a/python/databricks/bundles/pipelines/_models/postgres_catalog_config.py +++ b/python/databricks/bundles/pipelines/_models/postgres_catalog_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/postgres_slot_config.py b/python/databricks/bundles/pipelines/_models/postgres_slot_config.py index 31db5806e62..d6eaeacbb08 100644 --- a/python/databricks/bundles/pipelines/_models/postgres_slot_config.py +++ b/python/databricks/bundles/pipelines/_models/postgres_slot_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/reddit_ads_options.py b/python/databricks/bundles/pipelines/_models/reddit_ads_options.py index c166e9da1cf..3e39958b026 100644 --- a/python/databricks/bundles/pipelines/_models/reddit_ads_options.py +++ b/python/databricks/bundles/pipelines/_models/reddit_ads_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/reddit_ads_options_reddit_ads_custom_report_options.py b/python/databricks/bundles/pipelines/_models/reddit_ads_options_reddit_ads_custom_report_options.py index 777fe0f2fed..78063a7dcaf 100644 --- a/python/databricks/bundles/pipelines/_models/reddit_ads_options_reddit_ads_custom_report_options.py +++ b/python/databricks/bundles/pipelines/_models/reddit_ads_options_reddit_ads_custom_report_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/report_spec.py b/python/databricks/bundles/pipelines/_models/report_spec.py index f2b6fc1aacd..c1ae97d014b 100644 --- a/python/databricks/bundles/pipelines/_models/report_spec.py +++ b/python/databricks/bundles/pipelines/_models/report_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/restart_window.py b/python/databricks/bundles/pipelines/_models/restart_window.py index dcc468b3ffc..9987bbe8ec7 100644 --- a/python/databricks/bundles/pipelines/_models/restart_window.py +++ b/python/databricks/bundles/pipelines/_models/restart_window.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/run_as.py b/python/databricks/bundles/pipelines/_models/run_as.py index b4d52af00a1..129422096fc 100644 --- a/python/databricks/bundles/pipelines/_models/run_as.py +++ b/python/databricks/bundles/pipelines/_models/run_as.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/s3_storage_info.py b/python/databricks/bundles/pipelines/_models/s3_storage_info.py index b5e09063e51..071abd5b6f3 100644 --- a/python/databricks/bundles/pipelines/_models/s3_storage_info.py +++ b/python/databricks/bundles/pipelines/_models/s3_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/schema_spec.py b/python/databricks/bundles/pipelines/_models/schema_spec.py index 1edf4c4132d..b3dd638c455 100644 --- a/python/databricks/bundles/pipelines/_models/schema_spec.py +++ b/python/databricks/bundles/pipelines/_models/schema_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/sharepoint_options.py b/python/databricks/bundles/pipelines/_models/sharepoint_options.py index 6f5994995a7..4da2754ee21 100644 --- a/python/databricks/bundles/pipelines/_models/sharepoint_options.py +++ b/python/databricks/bundles/pipelines/_models/sharepoint_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/sharepoint_options_sharepoint_entity_type.py b/python/databricks/bundles/pipelines/_models/sharepoint_options_sharepoint_entity_type.py index 46e15fff79d..3b0f8bf6403 100644 --- a/python/databricks/bundles/pipelines/_models/sharepoint_options_sharepoint_entity_type.py +++ b/python/databricks/bundles/pipelines/_models/sharepoint_options_sharepoint_entity_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/smartsheet_options.py b/python/databricks/bundles/pipelines/_models/smartsheet_options.py index d378d8ec2a0..7ee26e273ad 100644 --- a/python/databricks/bundles/pipelines/_models/smartsheet_options.py +++ b/python/databricks/bundles/pipelines/_models/smartsheet_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/source_catalog_config.py b/python/databricks/bundles/pipelines/_models/source_catalog_config.py index e61521e1f3f..096c7e971d7 100644 --- a/python/databricks/bundles/pipelines/_models/source_catalog_config.py +++ b/python/databricks/bundles/pipelines/_models/source_catalog_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/source_config.py b/python/databricks/bundles/pipelines/_models/source_config.py index d5fbf3800ae..4695b153b40 100644 --- a/python/databricks/bundles/pipelines/_models/source_config.py +++ b/python/databricks/bundles/pipelines/_models/source_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/table_spec.py b/python/databricks/bundles/pipelines/_models/table_spec.py index 086ed2e98b5..508a4acb7e6 100644 --- a/python/databricks/bundles/pipelines/_models/table_spec.py +++ b/python/databricks/bundles/pipelines/_models/table_spec.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/table_specific_config.py b/python/databricks/bundles/pipelines/_models/table_specific_config.py index 747ce012e49..1b4c26a748e 100644 --- a/python/databricks/bundles/pipelines/_models/table_specific_config.py +++ b/python/databricks/bundles/pipelines/_models/table_specific_config.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/table_specific_config_scd_type.py b/python/databricks/bundles/pipelines/_models/table_specific_config_scd_type.py index 89fc41416e2..2d650e17111 100644 --- a/python/databricks/bundles/pipelines/_models/table_specific_config_scd_type.py +++ b/python/databricks/bundles/pipelines/_models/table_specific_config_scd_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options.py b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options.py index 89ea94cef13..ba73cfa7dca 100644 --- a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options.py +++ b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_ads_custom_report_options.py b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_ads_custom_report_options.py index 47c2ba1f9d4..6c2820a3bc2 100644 --- a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_ads_custom_report_options.py +++ b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_ads_custom_report_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_data_level.py b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_data_level.py index 11f6159bcf8..1d282eb6a0e 100644 --- a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_data_level.py +++ b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_data_level.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_report_type.py b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_report_type.py index 272d36ff0c0..a036081c2eb 100644 --- a/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_report_type.py +++ b/python/databricks/bundles/pipelines/_models/tik_tok_ads_options_tik_tok_report_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/transformer.py b/python/databricks/bundles/pipelines/_models/transformer.py index af403056d30..b7823c623bb 100644 --- a/python/databricks/bundles/pipelines/_models/transformer.py +++ b/python/databricks/bundles/pipelines/_models/transformer.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/transformer_format.py b/python/databricks/bundles/pipelines/_models/transformer_format.py index 5c2a771bbeb..5dfc1965ab7 100644 --- a/python/databricks/bundles/pipelines/_models/transformer_format.py +++ b/python/databricks/bundles/pipelines/_models/transformer_format.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/pipelines/_models/volumes_storage_info.py b/python/databricks/bundles/pipelines/_models/volumes_storage_info.py index cbe74758fc7..1eb4fff7bc2 100644 --- a/python/databricks/bundles/pipelines/_models/volumes_storage_info.py +++ b/python/databricks/bundles/pipelines/_models/volumes_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/workspace_storage_info.py b/python/databricks/bundles/pipelines/_models/workspace_storage_info.py index 29c075ac2f3..49aef9256c8 100644 --- a/python/databricks/bundles/pipelines/_models/workspace_storage_info.py +++ b/python/databricks/bundles/pipelines/_models/workspace_storage_info.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/pipelines/_models/zendesk_support_options.py b/python/databricks/bundles/pipelines/_models/zendesk_support_options.py index 49ff34bcab0..23a03e8eab8 100644 --- a/python/databricks/bundles/pipelines/_models/zendesk_support_options.py +++ b/python/databricks/bundles/pipelines/_models/zendesk_support_options.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/schemas/__init__.py b/python/databricks/bundles/schemas/__init__.py index 11517faaab9..e891669012c 100644 --- a/python/databricks/bundles/schemas/__init__.py +++ b/python/databricks/bundles/schemas/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "Lifecycle", "LifecycleDict", diff --git a/python/databricks/bundles/schemas/_models/lifecycle.py b/python/databricks/bundles/schemas/_models/lifecycle.py index c934967f37e..697776a198e 100644 --- a/python/databricks/bundles/schemas/_models/lifecycle.py +++ b/python/databricks/bundles/schemas/_models/lifecycle.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/schemas/_models/privilege.py b/python/databricks/bundles/schemas/_models/privilege.py index 7f118b07668..21a52a2f112 100644 --- a/python/databricks/bundles/schemas/_models/privilege.py +++ b/python/databricks/bundles/schemas/_models/privilege.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/schemas/_models/privilege_assignment.py b/python/databricks/bundles/schemas/_models/privilege_assignment.py index c60d5a82ecc..012fe5b3b59 100644 --- a/python/databricks/bundles/schemas/_models/privilege_assignment.py +++ b/python/databricks/bundles/schemas/_models/privilege_assignment.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/schemas/_models/schema.py b/python/databricks/bundles/schemas/_models/schema.py index a25b3593305..32ff22c8227 100644 --- a/python/databricks/bundles/schemas/_models/schema.py +++ b/python/databricks/bundles/schemas/_models/schema.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/volumes/__init__.py b/python/databricks/bundles/volumes/__init__.py index 57cf0f1e909..97bc1d54bd7 100644 --- a/python/databricks/bundles/volumes/__init__.py +++ b/python/databricks/bundles/volumes/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "Lifecycle", "LifecycleDict", diff --git a/python/databricks/bundles/volumes/_models/lifecycle.py b/python/databricks/bundles/volumes/_models/lifecycle.py index c934967f37e..697776a198e 100644 --- a/python/databricks/bundles/volumes/_models/lifecycle.py +++ b/python/databricks/bundles/volumes/_models/lifecycle.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/volumes/_models/privilege.py b/python/databricks/bundles/volumes/_models/privilege.py index 7f118b07668..21a52a2f112 100644 --- a/python/databricks/bundles/volumes/_models/privilege.py +++ b/python/databricks/bundles/volumes/_models/privilege.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal diff --git a/python/databricks/bundles/volumes/_models/privilege_assignment.py b/python/databricks/bundles/volumes/_models/privilege_assignment.py index 35b695e10db..612e9d85eb0 100644 --- a/python/databricks/bundles/volumes/_models/privilege_assignment.py +++ b/python/databricks/bundles/volumes/_models/privilege_assignment.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/volumes/_models/volume.py b/python/databricks/bundles/volumes/_models/volume.py index 6599d6b7620..db248fbba94 100644 --- a/python/databricks/bundles/volumes/_models/volume.py +++ b/python/databricks/bundles/volumes/_models/volume.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypedDict diff --git a/python/databricks/bundles/volumes/_models/volume_type.py b/python/databricks/bundles/volumes/_models/volume_type.py index 5c96db8fde9..0caf77b1c33 100644 --- a/python/databricks/bundles/volumes/_models/volume_type.py +++ b/python/databricks/bundles/volumes/_models/volume_type.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + from enum import Enum from typing import Literal From 660d03d1eec27b088cb00a62dbe5bad8ec46406e Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 13:13:03 +0000 Subject: [PATCH 03/14] Use inverse glob for generated __init__.py in .gitattributes Match all namespace __init__.py files and unset the hand-written core one, instead of listing each generated namespace. New resource namespaces are then marked automatically without touching .gitattributes. Co-authored-by: Isaac --- python/databricks/bundles/.gitattributes | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/python/databricks/bundles/.gitattributes b/python/databricks/bundles/.gitattributes index db137e8d08e..747d44f1640 100644 --- a/python/databricks/bundles/.gitattributes +++ b/python/databricks/bundles/.gitattributes @@ -1,9 +1,5 @@ -# Generated by pydabs-codegen (see python/codegen). core/ and resources/ are -# hand-written and intentionally excluded. +# Generated by pydabs-codegen (see python/codegen). Each generated namespace +# has a _models/ tree and an __init__.py; core/ is hand-written, so unset it. */_models/** linguist-generated=true -alerts/__init__.py linguist-generated=true -catalogs/__init__.py linguist-generated=true -jobs/__init__.py linguist-generated=true -pipelines/__init__.py linguist-generated=true -schemas/__init__.py linguist-generated=true -volumes/__init__.py linguist-generated=true +*/__init__.py linguist-generated=true +core/__init__.py linguist-generated=false From 3afdfc4f48a653f1d79bcf650ac9efe05ea9a11a Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 16:42:02 +0000 Subject: [PATCH 04/14] Add PyDABs support for catalogs Wire the catalog resource into the core package: add_catalog, the catalogs collection property, catalog_mutator, and the _ResourceType registration, mirroring the other resources. The catalog model was already generated (resources.Catalog is in RESOURCE_NAMESPACE) but never wired, so it was not user-addable. Add a catalog case to test_resources.py. Catalog is supported only on the direct deployment engine (there is no terraform converter for it); this matches YAML-defined catalogs. Co-authored-by: Isaac --- python/databricks/bundles/core/__init__.py | 2 + .../bundles/core/_resource_mutator.py | 33 ++++++++++++++ .../databricks/bundles/core/_resource_type.py | 6 +++ python/databricks/bundles/core/_resources.py | 44 +++++++++++++++++++ .../databricks_tests/core/test_resources.py | 11 +++++ 5 files changed, 96 insertions(+) diff --git a/python/databricks/bundles/core/__init__.py b/python/databricks/bundles/core/__init__.py index 09ebbd37ccf..98abbaaf458 100644 --- a/python/databricks/bundles/core/__init__.py +++ b/python/databricks/bundles/core/__init__.py @@ -13,6 +13,7 @@ "VariableOrList", "VariableOrOptional", "alert_mutator", + "catalog_mutator", "job_mutator", "load_resources_from_current_package_module", "load_resources_from_module", @@ -41,6 +42,7 @@ from databricks.bundles.core._resource_mutator import ( ResourceMutator, alert_mutator, + catalog_mutator, job_mutator, pipeline_mutator, schema_mutator, diff --git a/python/databricks/bundles/core/_resource_mutator.py b/python/databricks/bundles/core/_resource_mutator.py index 4cf7eb0a47c..fafdcdc5efb 100644 --- a/python/databricks/bundles/core/_resource_mutator.py +++ b/python/databricks/bundles/core/_resource_mutator.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from databricks.bundles.alerts._models.alert import Alert + from databricks.bundles.catalogs._models.catalog import Catalog from databricks.bundles.jobs._models.job import Job from databricks.bundles.pipelines._models.pipeline import Pipeline from databricks.bundles.schemas._models.schema import Schema @@ -102,6 +103,38 @@ def my_alert_mutator(bundle: Bundle, alert: Alert) -> Alert: return ResourceMutator(resource_type=Alert, function=function) +@overload +def catalog_mutator( + function: Callable[[Bundle, "Catalog"], "Catalog"], +) -> ResourceMutator["Catalog"]: ... + + +@overload +def catalog_mutator( + function: Callable[["Catalog"], "Catalog"], +) -> ResourceMutator["Catalog"]: ... + + +def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: + """ + Decorator for defining a catalog mutator. Function should return a new instance of the catalog with the desired changes, + instead of mutating the input catalog. + + Example: + + .. code-block:: python + + @catalog_mutator + def my_catalog_mutator(bundle: Bundle, catalog: Catalog) -> Catalog: + return replace(catalog, name="my_catalog") + + :param function: Function that mutates a catalog. + """ + from databricks.bundles.catalogs._models.catalog import Catalog + + return ResourceMutator(resource_type=Catalog, function=function) + + @overload def job_mutator( function: Callable[[Bundle, "Job"], "Job"], diff --git a/python/databricks/bundles/core/_resource_type.py b/python/databricks/bundles/core/_resource_type.py index c5930f02beb..73d30a92072 100644 --- a/python/databricks/bundles/core/_resource_type.py +++ b/python/databricks/bundles/core/_resource_type.py @@ -32,6 +32,7 @@ def all(cls) -> tuple["_ResourceType", ...]: # be imported in databricks.bundles. from databricks.bundles.alerts._models.alert import Alert + from databricks.bundles.catalogs._models.catalog import Catalog from databricks.bundles.jobs._models.job import Job from databricks.bundles.pipelines._models.pipeline import Pipeline from databricks.bundles.schemas._models.schema import Schema @@ -63,4 +64,9 @@ def all(cls) -> tuple["_ResourceType", ...]: plural_name="alerts", singular_name="alert", ), + _ResourceType( + resource_type=Catalog, + plural_name="catalogs", + singular_name="catalog", + ), ) diff --git a/python/databricks/bundles/core/_resources.py b/python/databricks/bundles/core/_resources.py index 2db10ebac2f..b926f14b750 100644 --- a/python/databricks/bundles/core/_resources.py +++ b/python/databricks/bundles/core/_resources.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from databricks.bundles.alerts._models.alert import Alert, AlertParam + from databricks.bundles.catalogs._models.catalog import Catalog, CatalogParam from databricks.bundles.jobs._models.job import Job, JobParam from databricks.bundles.pipelines._models.pipeline import Pipeline, PipelineParam from databricks.bundles.schemas._models.schema import Schema, SchemaParam @@ -62,6 +63,7 @@ def __init__(self): self._schemas = dict[str, "Schema"]() self._volumes = dict[str, "Volume"]() self._alerts = dict[str, "Alert"]() + self._catalogs = dict[str, "Catalog"]() self._locations = dict[tuple[str, ...], Location]() self._diagnostics = Diagnostics() @@ -92,6 +94,10 @@ def diagnostics(self) -> Diagnostics: def alerts(self) -> dict[str, "Alert"]: return self._alerts + @property + def catalogs(self) -> dict[str, "Catalog"]: + return self._catalogs + def add_resource( self, resource_name: str, @@ -109,6 +115,7 @@ def add_resource( """ from databricks.bundles.alerts import Alert + from databricks.bundles.catalogs import Catalog from databricks.bundles.jobs import Job from databricks.bundles.pipelines import Pipeline from databricks.bundles.schemas import Schema @@ -127,6 +134,8 @@ def add_resource( self.add_volume(resource_name, resource, location=location) case Alert(): self.add_alert(resource_name, resource, location=location) + case Catalog(): + self.add_catalog(resource_name, resource, location=location) case _: raise ValueError(f"Unsupported resource type: {type(resource)}") @@ -286,6 +295,38 @@ def add_alert( self._alerts[resource_name] = alert + def add_catalog( + self, + resource_name: str, + catalog: "CatalogParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds a catalog to the collection of resources. Resource name must be unique across all catalogs. + + :param resource_name: unique identifier for the catalog + :param catalog: the catalog to add, can be Catalog or dict + :param location: optional location of the catalog in the source code + """ + from databricks.bundles.catalogs import Catalog + + catalog = _transform(Catalog, catalog) + path = ("resources", "catalogs", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._catalogs.get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for a catalog. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._catalogs[resource_name] = catalog + def add_location(self, path: tuple[str, ...], location: Location) -> None: """ Associate source code location with a path in the bundle configuration. @@ -371,6 +412,9 @@ def add_resources(self, other: "Resources") -> None: for name, alert in other.alerts.items(): self.add_alert(name, alert) + for name, catalog in other.catalogs.items(): + self.add_catalog(name, catalog) + for path, location in other._locations.items(): self.add_location(path, location) diff --git a/python/databricks_tests/core/test_resources.py b/python/databricks_tests/core/test_resources.py index 421a7e9dbe0..d58650d8936 100644 --- a/python/databricks_tests/core/test_resources.py +++ b/python/databricks_tests/core/test_resources.py @@ -10,12 +10,14 @@ ) from databricks.bundles.alerts._models.comparison_operator import ComparisonOperator from databricks.bundles.alerts._models.cron_schedule import CronSchedule +from databricks.bundles.catalogs._models.catalog import Catalog from databricks.bundles.core import Location, Resources, Severity from databricks.bundles.core._bundle import Bundle from databricks.bundles.core._resource import Resource from databricks.bundles.core._resource_mutator import ( ResourceMutator, alert_mutator, + catalog_mutator, job_mutator, pipeline_mutator, schema_mutator, @@ -117,6 +119,15 @@ class TestCase: ), resource_types[Alert], ), + ( + TestCase( + add_resource=Resources.add_catalog, + dict_example={"name": "my_catalog"}, + dataclass_example=Catalog(name="my_catalog"), + mutator=catalog_mutator, + ), + resource_types[Catalog], + ), ] test_case_ids = [tpe.plural_name for _, tpe in test_cases] From d05605b5c40374254be1fd59921f69d139727215 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 16:42:03 +0000 Subject: [PATCH 05/14] Add acceptance test for PyDABs catalogs support Validate that a YAML-defined catalog and a Python-added catalog coexist, serialize, and are mutated by catalog_mutator. Restricted to the direct deployment engine, since catalogs have no terraform converter. Co-authored-by: Isaac --- .../python/catalogs-support/databricks.yml | 16 ++++++++++++ .../python/catalogs-support/mutators.py | 11 ++++++++ .../python/catalogs-support/out.test.toml | 3 +++ .../bundle/python/catalogs-support/output.txt | 26 +++++++++++++++++++ .../python/catalogs-support/resources.py | 15 +++++++++++ .../bundle/python/catalogs-support/script | 5 ++++ .../bundle/python/catalogs-support/test.toml | 7 +++++ 7 files changed, 83 insertions(+) create mode 100644 acceptance/bundle/python/catalogs-support/databricks.yml create mode 100644 acceptance/bundle/python/catalogs-support/mutators.py create mode 100644 acceptance/bundle/python/catalogs-support/out.test.toml create mode 100644 acceptance/bundle/python/catalogs-support/output.txt create mode 100644 acceptance/bundle/python/catalogs-support/resources.py create mode 100644 acceptance/bundle/python/catalogs-support/script create mode 100644 acceptance/bundle/python/catalogs-support/test.toml diff --git a/acceptance/bundle/python/catalogs-support/databricks.yml b/acceptance/bundle/python/catalogs-support/databricks.yml new file mode 100644 index 00000000000..c9a049d5831 --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/databricks.yml @@ -0,0 +1,16 @@ +bundle: + name: my_project + +sync: {paths: []} # don't need to copy files + +python: + resources: + - "resources:load_resources" + mutators: + - "mutators:update_catalog" + +resources: + catalogs: + my_catalog_1: + name: "my_catalog_1" + comment: "My catalog" diff --git a/acceptance/bundle/python/catalogs-support/mutators.py b/acceptance/bundle/python/catalogs-support/mutators.py new file mode 100644 index 00000000000..5d024a928a8 --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/mutators.py @@ -0,0 +1,11 @@ +from dataclasses import replace + +from databricks.bundles.catalogs import Catalog +from databricks.bundles.core import catalog_mutator + + +@catalog_mutator +def update_catalog(catalog: Catalog) -> Catalog: + assert isinstance(catalog.comment, str) + + return replace(catalog, comment=f"{catalog.comment} (updated)") diff --git a/acceptance/bundle/python/catalogs-support/out.test.toml b/acceptance/bundle/python/catalogs-support/out.test.toml new file mode 100644 index 00000000000..7c0f9bcacf5 --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/out.test.toml @@ -0,0 +1,3 @@ +Cloud = false +EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] +EnvMatrix.PYDAB_VERSION = ["current"] diff --git a/acceptance/bundle/python/catalogs-support/output.txt b/acceptance/bundle/python/catalogs-support/output.txt new file mode 100644 index 00000000000..7022fa145c8 --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/output.txt @@ -0,0 +1,26 @@ + +>>> uv run [UV_ARGS] -q [CLI] bundle validate --output json +{ + "experimental": { + "python": { + "mutators": [ + "mutators:update_catalog" + ], + "resources": [ + "resources:load_resources" + ] + } + }, + "resources": { + "catalogs": { + "my_catalog_1": { + "comment": "My catalog (updated)", + "name": "my_catalog_1" + }, + "my_catalog_2": { + "comment": "My catalog (2) (updated)", + "name": "my_catalog_2" + } + } + } +} diff --git a/acceptance/bundle/python/catalogs-support/resources.py b/acceptance/bundle/python/catalogs-support/resources.py new file mode 100644 index 00000000000..d5f91ed2d8e --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/resources.py @@ -0,0 +1,15 @@ +from databricks.bundles.core import Resources + + +def load_resources() -> Resources: + resources = Resources() + + resources.add_catalog( + "my_catalog_2", + { + "name": "my_catalog_2", + "comment": "My catalog (2)", + }, + ) + + return resources diff --git a/acceptance/bundle/python/catalogs-support/script b/acceptance/bundle/python/catalogs-support/script new file mode 100644 index 00000000000..e273fb45a53 --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/script @@ -0,0 +1,5 @@ + +trace uv run $UV_ARGS -q $CLI bundle validate --output json | \ + jq "pick(.experimental.python, .resources)" + +rm -fr .databricks __pycache__ diff --git a/acceptance/bundle/python/catalogs-support/test.toml b/acceptance/bundle/python/catalogs-support/test.toml new file mode 100644 index 00000000000..be087892be4 --- /dev/null +++ b/acceptance/bundle/python/catalogs-support/test.toml @@ -0,0 +1,7 @@ +Cloud = false # tests don't interact with APIs + +# catalogs are only supported in the current version of the wheel +EnvMatrix.PYDAB_VERSION = ["current"] + +# catalogs are only supported on the direct deployment engine +EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] From 686b3439c2f7c60d087e5ae0018906770130dd8a Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 16:42:05 +0000 Subject: [PATCH 06/14] Add changelog entry for PyDABs catalogs support Co-authored-by: Isaac --- .nextchanges/bundles/pydabs-catalogs.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nextchanges/bundles/pydabs-catalogs.md diff --git a/.nextchanges/bundles/pydabs-catalogs.md b/.nextchanges/bundles/pydabs-catalogs.md new file mode 100644 index 00000000000..de1f9b8ea4c --- /dev/null +++ b/.nextchanges/bundles/pydabs-catalogs.md @@ -0,0 +1 @@ +Added PyDABs (Python) support for catalogs: `Resources.add_catalog` and the `catalog_mutator` decorator. From 11d06f55408f1b9c4fd4157f4953eac83d27c1c1 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 21:12:13 +0000 Subject: [PATCH 07/14] Data-drive add_resource dispatch and add_resources merge Rewrite Resources.add_resource and Resources.add_resources to iterate _ResourceType.all() instead of enumerating each resource type by hand, so they no longer need per-resource edits when a resource is added. Behavior-preserving. Co-authored-by: Isaac --- python/databricks/bundles/core/_resources.py | 51 +++++--------------- 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/python/databricks/bundles/core/_resources.py b/python/databricks/bundles/core/_resources.py index b926f14b750..a7f032e50ba 100644 --- a/python/databricks/bundles/core/_resources.py +++ b/python/databricks/bundles/core/_resources.py @@ -3,6 +3,7 @@ from databricks.bundles.core._diagnostics import Diagnostics from databricks.bundles.core._location import Location from databricks.bundles.core._resource import Resource +from databricks.bundles.core._resource_type import _ResourceType from databricks.bundles.core._transform import _transform if TYPE_CHECKING: @@ -114,30 +115,15 @@ def add_resource( :param location: optional location of the resource in the source code """ - from databricks.bundles.alerts import Alert - from databricks.bundles.catalogs import Catalog - from databricks.bundles.jobs import Job - from databricks.bundles.pipelines import Pipeline - from databricks.bundles.schemas import Schema - from databricks.bundles.volumes import Volume - location = location or Location.from_stack_frame(depth=1) - match resource: - case Job(): - self.add_job(resource_name, resource, location=location) - case Pipeline(): - self.add_pipeline(resource_name, resource, location=location) - case Schema(): - self.add_schema(resource_name, resource, location=location) - case Volume(): - self.add_volume(resource_name, resource, location=location) - case Alert(): - self.add_alert(resource_name, resource, location=location) - case Catalog(): - self.add_catalog(resource_name, resource, location=location) - case _: - raise ValueError(f"Unsupported resource type: {type(resource)}") + for resource_type in _ResourceType.all(): + if isinstance(resource, resource_type.resource_type): + add_method = getattr(self, f"add_{resource_type.singular_name}") + add_method(resource_name, resource, location=location) + return + + raise ValueError(f"Unsupported resource type: {type(resource)}") def add_job( self, @@ -397,23 +383,10 @@ def add_resources(self, other: "Resources") -> None: Adds error to diagnostics if there are duplicate resource names. """ - for name, job in other.jobs.items(): - self.add_job(name, job) - - for name, pipeline in other.pipelines.items(): - self.add_pipeline(name, pipeline) - - for name, schema in other.schemas.items(): - self.add_schema(name, schema) - - for name, volume in other.volumes.items(): - self.add_volume(name, volume) - - for name, alert in other.alerts.items(): - self.add_alert(name, alert) - - for name, catalog in other.catalogs.items(): - self.add_catalog(name, catalog) + for resource_type in _ResourceType.all(): + add_method = getattr(self, f"add_{resource_type.singular_name}") + for name, resource in getattr(other, resource_type.plural_name).items(): + add_method(name, resource) for path, location in other._locations.items(): self.add_location(path, location) From fe95df73582969f2b45a6d437a763be454465cf3 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 21:13:06 +0000 Subject: [PATCH 08/14] Store bundle resources in a single dict keyed by plural name Replace the per-type Resources._jobs/_pipelines/... attributes with a single self._resources dict keyed by plural name, populated by iterating _ResourceType.all(). __init__ no longer needs a per-resource line; the add_X methods and properties read/write self._resources[plural]. Behavior-preserving. Co-authored-by: Isaac --- python/databricks/bundles/core/_resources.py | 45 +++++++++----------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/python/databricks/bundles/core/_resources.py b/python/databricks/bundles/core/_resources.py index a7f032e50ba..d1746808f31 100644 --- a/python/databricks/bundles/core/_resources.py +++ b/python/databricks/bundles/core/_resources.py @@ -59,30 +59,27 @@ def load_resources(bundle: Bundle) -> Resources: """ def __init__(self): - self._jobs = dict[str, "Job"]() - self._pipelines = dict[str, "Pipeline"]() - self._schemas = dict[str, "Schema"]() - self._volumes = dict[str, "Volume"]() - self._alerts = dict[str, "Alert"]() - self._catalogs = dict[str, "Catalog"]() + self._resources: dict[str, dict] = { + resource_type.plural_name: {} for resource_type in _ResourceType.all() + } self._locations = dict[tuple[str, ...], Location]() self._diagnostics = Diagnostics() @property def jobs(self) -> dict[str, "Job"]: - return self._jobs + return self._resources["jobs"] @property def pipelines(self) -> dict[str, "Pipeline"]: - return self._pipelines + return self._resources["pipelines"] @property def schemas(self) -> dict[str, "Schema"]: - return self._schemas + return self._resources["schemas"] @property def volumes(self) -> dict[str, "Volume"]: - return self._volumes + return self._resources["volumes"] @property def diagnostics(self) -> Diagnostics: @@ -93,11 +90,11 @@ def diagnostics(self) -> Diagnostics: @property def alerts(self) -> dict[str, "Alert"]: - return self._alerts + return self._resources["alerts"] @property def catalogs(self) -> dict[str, "Catalog"]: - return self._catalogs + return self._resources["catalogs"] def add_resource( self, @@ -145,7 +142,7 @@ def add_job( path = ("resources", "jobs", resource_name) location = location or Location.from_stack_frame(depth=1) - if self._jobs.get(resource_name): + if self._resources["jobs"].get(resource_name): self.add_diagnostic_error( msg=f"Duplicate resource name '{resource_name}' for a job. Resource names must be unique.", location=location, @@ -155,7 +152,7 @@ def add_job( if location: self.add_location(path, location) - self._jobs[resource_name] = job + self._resources["jobs"][resource_name] = job def add_pipeline( self, @@ -177,7 +174,7 @@ def add_pipeline( path = ("resources", "pipelines", resource_name) location = location or Location.from_stack_frame(depth=1) - if self._pipelines.get(resource_name): + if self._resources["pipelines"].get(resource_name): self.add_diagnostic_error( msg=f"Duplicate resource name '{resource_name}' for a pipeline. Resource names must be unique.", location=location, @@ -187,7 +184,7 @@ def add_pipeline( if location: self.add_location(path, location) - self._pipelines[resource_name] = pipeline + self._resources["pipelines"][resource_name] = pipeline def add_schema( self, @@ -209,7 +206,7 @@ def add_schema( path = ("resources", "schemas", resource_name) location = location or Location.from_stack_frame(depth=1) - if self._schemas.get(resource_name): + if self._resources["schemas"].get(resource_name): self.add_diagnostic_error( msg=f"Duplicate resource name '{resource_name}' for a schema. Resource names must be unique.", location=location, @@ -219,7 +216,7 @@ def add_schema( if location: self.add_location(path, location) - self._schemas[resource_name] = schema + self._resources["schemas"][resource_name] = schema def add_volume( self, @@ -241,7 +238,7 @@ def add_volume( path = ("resources", "volumes", resource_name) location = location or Location.from_stack_frame(depth=1) - if self._volumes.get(resource_name): + if self._resources["volumes"].get(resource_name): self.add_diagnostic_error( msg=f"Duplicate resource name '{resource_name}' for a volume. Resource names must be unique.", location=location, @@ -251,7 +248,7 @@ def add_volume( if location: self.add_location(path, location) - self._volumes[resource_name] = volume + self._resources["volumes"][resource_name] = volume def add_alert( self, @@ -269,7 +266,7 @@ def add_alert( path = ("resources", "alerts", resource_name) location = location or Location.from_stack_frame(depth=1) - if self._alerts.get(resource_name): + if self._resources["alerts"].get(resource_name): self.add_diagnostic_error( msg=f"Duplicate resource name '{resource_name}' for an alert. Resource names must be unique.", location=location, @@ -279,7 +276,7 @@ def add_alert( if location: self.add_location(path, location) - self._alerts[resource_name] = alert + self._resources["alerts"][resource_name] = alert def add_catalog( self, @@ -301,7 +298,7 @@ def add_catalog( path = ("resources", "catalogs", resource_name) location = location or Location.from_stack_frame(depth=1) - if self._catalogs.get(resource_name): + if self._resources["catalogs"].get(resource_name): self.add_diagnostic_error( msg=f"Duplicate resource name '{resource_name}' for a catalog. Resource names must be unique.", location=location, @@ -311,7 +308,7 @@ def add_catalog( if location: self.add_location(path, location) - self._catalogs[resource_name] = catalog + self._resources["catalogs"][resource_name] = catalog def add_location(self, path: tuple[str, ...], location: Location) -> None: """ From 2f6c19a92031e385ac29508ab80087055e8b3b0c Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 21:13:46 +0000 Subject: [PATCH 09/14] Use uniform duplicate-resource error wording across resource types Replace the per-type "for a job" / "for an alert" phrasing in the duplicate-resource-name error with a uniform "for resource ''". This removes the grammatical-article special case so the wiring can be generated uniformly. Drops the now-unused TestCase.article field. Co-authored-by: Isaac --- python/databricks/bundles/core/_resources.py | 12 ++++++------ python/databricks_tests/core/test_resources.py | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/python/databricks/bundles/core/_resources.py b/python/databricks/bundles/core/_resources.py index d1746808f31..72649b33650 100644 --- a/python/databricks/bundles/core/_resources.py +++ b/python/databricks/bundles/core/_resources.py @@ -144,7 +144,7 @@ def add_job( if self._resources["jobs"].get(resource_name): self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for a job. Resource names must be unique.", + msg=f"Duplicate resource name '{resource_name}' for resource 'job'. Resource names must be unique.", location=location, path=path, ) @@ -176,7 +176,7 @@ def add_pipeline( if self._resources["pipelines"].get(resource_name): self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for a pipeline. Resource names must be unique.", + msg=f"Duplicate resource name '{resource_name}' for resource 'pipeline'. Resource names must be unique.", location=location, path=path, ) @@ -208,7 +208,7 @@ def add_schema( if self._resources["schemas"].get(resource_name): self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for a schema. Resource names must be unique.", + msg=f"Duplicate resource name '{resource_name}' for resource 'schema'. Resource names must be unique.", location=location, path=path, ) @@ -240,7 +240,7 @@ def add_volume( if self._resources["volumes"].get(resource_name): self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for a volume. Resource names must be unique.", + msg=f"Duplicate resource name '{resource_name}' for resource 'volume'. Resource names must be unique.", location=location, path=path, ) @@ -268,7 +268,7 @@ def add_alert( if self._resources["alerts"].get(resource_name): self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for an alert. Resource names must be unique.", + msg=f"Duplicate resource name '{resource_name}' for resource 'alert'. Resource names must be unique.", location=location, path=path, ) @@ -300,7 +300,7 @@ def add_catalog( if self._resources["catalogs"].get(resource_name): self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for a catalog. Resource names must be unique.", + msg=f"Duplicate resource name '{resource_name}' for resource 'catalog'. Resource names must be unique.", location=location, path=path, ) diff --git a/python/databricks_tests/core/test_resources.py b/python/databricks_tests/core/test_resources.py index d58650d8936..af1b9cc774d 100644 --- a/python/databricks_tests/core/test_resources.py +++ b/python/databricks_tests/core/test_resources.py @@ -36,7 +36,6 @@ class TestCase: dict_example: dict dataclass_example: Resource mutator: Callable - article: str = "a" # grammatical article in the duplicate-resource error message resource_types = {tpe.resource_type: tpe for tpe in _ResourceType.all()} @@ -115,7 +114,6 @@ class TestCase: ), ), mutator=alert_mutator, - article="an", ), resource_types[Alert], ), @@ -324,7 +322,7 @@ def test_add_duplicate_resource(tc: TestCase, tpe: _ResourceType): assert item.severity == Severity.ERROR assert ( item.summary - == f"Duplicate resource name 'my_resource' for {tc.article} {tpe.singular_name}. Resource names must be unique." + == f"Duplicate resource name 'my_resource' for resource '{tpe.singular_name}'. Resource names must be unique." ) From 28de6685618fb89053ccccd4247d74bb22a10bcd Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 21:14:26 +0000 Subject: [PATCH 10/14] Generate PyDABs core resource wiring Add codegen/generated_wiring.py, which emits the per-resource wiring for databricks.bundles.core into a new core/_generated/ package: the _ResourceType registry (_resource_types.py), the Resources add_*/property methods (_resources.py, a mixin), and the *_mutator decorators (_resource_mutators.py). main.py calls it after the model-generation loop. The core package __init__ is now generated too (static exports plus the generated mutator exports); mark core/_generated/ generated in .gitattributes and wipe it before regenerating. The hand-written wiring in _resource_type.py / _resources.py / _resource_mutator.py is removed in the next commit. Co-authored-by: Isaac --- python/Taskfile.yml | 2 + python/codegen/codegen/generated_wiring.py | 333 ++++++++++++++++++ python/codegen/codegen/main.py | 6 + python/databricks/bundles/.gitattributes | 5 +- python/databricks/bundles/core/__init__.py | 20 +- .../bundles/core/_generated/__init__.py | 1 + .../core/_generated/_resource_mutators.py | 216 ++++++++++++ .../core/_generated/_resource_types.py | 51 +++ .../bundles/core/_generated/_resources.py | 255 ++++++++++++++ 9 files changed, 878 insertions(+), 11 deletions(-) create mode 100644 python/codegen/codegen/generated_wiring.py create mode 100644 python/databricks/bundles/core/_generated/__init__.py create mode 100644 python/databricks/bundles/core/_generated/_resource_mutators.py create mode 100644 python/databricks/bundles/core/_generated/_resource_types.py create mode 100644 python/databricks/bundles/core/_generated/_resources.py diff --git a/python/Taskfile.yml b/python/Taskfile.yml index 30e2db62ae5..602e92028a5 100644 --- a/python/Taskfile.yml +++ b/python/Taskfile.yml @@ -76,6 +76,8 @@ tasks: ! -path databricks/bundles/core \ ! -path databricks/bundles/resources \ -exec rm -rf {} \; + # core/ is hand-written except for the generated wiring under _generated/. + - rm -rf databricks/bundles/core/_generated - cd codegen && uv run -m pytest codegen_tests - cd codegen && uv run -m codegen.main --output .. # Generated code is fixed and formatted by the global ruff (see ../ruff.toml). diff --git a/python/codegen/codegen/generated_wiring.py b/python/codegen/codegen/generated_wiring.py new file mode 100644 index 00000000000..33be440ac51 --- /dev/null +++ b/python/codegen/codegen/generated_wiring.py @@ -0,0 +1,333 @@ +""" +Generates the per-resource wiring in databricks.bundles.core that used to be +hand-written: the _ResourceType registry, the Resources add_*/property methods, +the *_mutator decorators, and the core package __init__. + +Everything specific to a resource type is emitted here so that adding a resource +needs no manual edits under databricks/bundles/core. The static, non-resource +parts of core stay hand-written (see _CORE_INIT_STATIC_EXPORTS / _CORE_INIT_STATIC_IMPORTS). +""" + +from dataclasses import dataclass +from pathlib import Path + +import codegen.packages as packages + +HEADER = "# Code generated by pydabs-codegen. DO NOT EDIT.\n\n" + + +def _article(word: str) -> str: + # Grammatical article for docstrings only; the duplicate-resource error + # message uses uniform wording and does not need this. + return "an" if word[:1].lower() in "aeiou" else "a" + + +@dataclass(frozen=True) +class _WiredResource: + class_name: str + """Resource dataclass name, e.g. "Job".""" + + singular_name: str + """Singular name used in methods and messages, e.g. "job".""" + + plural_name: str + """Plural name, the same as the "resources" bundle section, e.g. "jobs".""" + + model_module: str + """Module the resource dataclass lives in, e.g. "databricks.bundles.jobs._models.job".""" + + +def _wired_resources() -> list[_WiredResource]: + # Every namespaced resource is wired. RESOURCE_NAMESPACE is the single source + # of truth for both model generation and wiring. + resources = [] + + for ref, namespace in packages.RESOURCE_NAMESPACE.items(): + class_name = packages.get_class_name(ref) + + resources.append( + _WiredResource( + class_name=class_name, + singular_name=class_name.lower(), + plural_name=namespace, + model_module=packages.get_package(namespace, ref), + ) + ) + + resources.sort(key=lambda r: r.plural_name) + + return resources + + +def write_wiring(output: str): + resources = _wired_resources() + + core_path = Path(output) / "databricks" / "bundles" / "core" + generated_path = core_path / "_generated" + generated_path.mkdir(parents=True, exist_ok=True) + + # Package marker: just the generated-file header, with no trailing blank + # line (the whitespace check rejects one). + (generated_path / "__init__.py").write_text(HEADER.rstrip() + "\n") + (generated_path / "_resource_types.py").write_text( + HEADER + _resource_types_code(resources) + ) + (generated_path / "_resources.py").write_text(HEADER + _resources_code(resources)) + (generated_path / "_resource_mutators.py").write_text( + HEADER + _resource_mutators_code(resources) + ) + (core_path / "__init__.py").write_text(HEADER + _core_init_code(resources)) + + print(f"Writing wiring into {generated_path}") + + +def _resource_types_code(resources: list[_WiredResource]) -> str: + model_imports = "\n".join( + f" from {r.model_module} import {r.class_name}" for r in resources + ) + + entries = "\n".join( + f""" _ResourceType( + resource_type={r.class_name}, + singular_name="{r.singular_name}", + plural_name="{r.plural_name}", + ),""" + for r in resources + ) + + return f"""from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + + +def _all_resource_types() -> "tuple[_ResourceType, ...]": + # Lazily import resource types so that databricks.bundles.core is not + # imported from databricks.bundles.. + from databricks.bundles.core._resource_type import _ResourceType + +{model_imports} + + return ( +{entries} + ) +""" + + +def _resources_code(resources: list[_WiredResource]) -> str: + type_checking_imports = "\n".join( + f" from {r.model_module} import {r.class_name}, {r.class_name}Param" + for r in resources + ) + + properties = "\n\n".join( + f''' @property + def {r.plural_name}(self) -> dict[str, "{r.class_name}"]: + return self._resources["{r.plural_name}"]''' + for r in resources + ) + + methods = "\n\n".join(_add_method_code(r) for r in resources) + + return f'''from typing import TYPE_CHECKING, Optional + +from databricks.bundles.core._location import Location +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: +{type_checking_imports} + +__all__ = ["_GeneratedResources"] + + +class _GeneratedResources: + """ + Generated per-resource accessors and add_* methods, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location( + self, path: tuple[str, ...], location: Location + ) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + +{properties} + +{methods} +''' + + +def _add_method_code(r: _WiredResource) -> str: + return f''' def add_{r.singular_name}( + self, + resource_name: str, + {r.singular_name}: "{r.class_name}Param", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds {_article(r.singular_name)} {r.singular_name} to the collection of resources. Resource name must be unique across all {r.plural_name}. + + :param resource_name: unique identifier for the {r.singular_name} + :param {r.singular_name}: the {r.singular_name} to add, can be {r.class_name} or dict + :param location: optional location of the {r.singular_name} in the source code + """ + from {r.model_module} import {r.class_name} + + {r.singular_name} = _transform({r.class_name}, {r.singular_name}) + path = ("resources", "{r.plural_name}", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["{r.plural_name}"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{{resource_name}}' for resource '{r.singular_name}'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["{r.plural_name}"][resource_name] = {r.singular_name}''' + + +def _resource_mutators_code(resources: list[_WiredResource]) -> str: + type_checking_imports = "\n".join( + f" from {r.model_module} import {r.class_name}" for r in resources + ) + + exports = ", ".join(f'"{r.singular_name}_mutator"' for r in resources) + + decorators = "\n\n\n".join(_mutator_code(r) for r in resources) + + return f"""from collections.abc import Callable +from typing import TYPE_CHECKING, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._resource_mutator import ResourceMutator + +if TYPE_CHECKING: +{type_checking_imports} + +__all__ = [{exports}] + + +{decorators} +""" + + +def _mutator_code(r: _WiredResource) -> str: + name = f"{r.singular_name}_mutator" + + return f'''@overload +def {name}( + function: Callable[[Bundle, "{r.class_name}"], "{r.class_name}"], +) -> ResourceMutator["{r.class_name}"]: ... + + +@overload +def {name}( + function: Callable[["{r.class_name}"], "{r.class_name}"], +) -> ResourceMutator["{r.class_name}"]: ... + + +def {name}(function: Callable) -> ResourceMutator["{r.class_name}"]: + """ + Decorator for defining {_article(r.singular_name)} {r.singular_name} mutator. Function should return a new instance of the {r.singular_name} + with the desired changes, instead of mutating the input {r.singular_name}. + + Example: + + .. code-block:: python + + @{name} + def my_{name}(bundle: Bundle, {r.singular_name}: {r.class_name}) -> {r.class_name}: + return replace({r.singular_name}, ...) + + :param function: Function that mutates {_article(r.singular_name)} {r.singular_name}. + """ + from {r.model_module} import {r.class_name} + + return ResourceMutator(resource_type={r.class_name}, function=function)''' + + +# Static, non-resource exports of databricks.bundles.core. Kept here because the +# package __init__ is generated; the resource mutators are appended and the whole +# list is sorted. +_CORE_INIT_STATIC_EXPORTS = [ + "Bundle", + "Diagnostic", + "Diagnostics", + "Location", + "Resource", + "ResourceMutator", + "Resources", + "Severity", + "Variable", + "VariableOr", + "VariableOrDict", + "VariableOrList", + "VariableOrOptional", + "load_resources_from_current_package_module", + "load_resources_from_module", + "load_resources_from_modules", + "load_resources_from_package_module", + "variables", +] + +_CORE_INIT_STATIC_IMPORTS = """from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._diagnostics import ( + Diagnostic, + Diagnostics, + Severity, +) +from databricks.bundles.core._load import ( + load_resources_from_current_package_module, + load_resources_from_module, + load_resources_from_modules, + load_resources_from_package_module, +) +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource import Resource +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._resources import Resources +from databricks.bundles.core._variable import ( + Variable, + VariableOr, + VariableOrDict, + VariableOrList, + VariableOrOptional, + variables, +)""" + + +def _core_init_code(resources: list[_WiredResource]) -> str: + mutator_names = [f"{r.singular_name}_mutator" for r in resources] + + all_exports = sorted(_CORE_INIT_STATIC_EXPORTS + mutator_names) + all_block = "\n".join(f' "{name}",' for name in all_exports) + + mutator_imports = ",\n".join(f" {name}" for name in sorted(mutator_names)) + + return f"""__all__ = [ +{all_block} +] + +{_CORE_INIT_STATIC_IMPORTS} +from databricks.bundles.core._generated._resource_mutators import ( +{mutator_imports}, +) +""" diff --git a/python/codegen/codegen/main.py b/python/codegen/codegen/main.py index 2cd3fcd91a5..7927da85961 100644 --- a/python/codegen/codegen/main.py +++ b/python/codegen/codegen/main.py @@ -8,6 +8,7 @@ import codegen.generated_dataclass_patch as generated_dataclass_patch import codegen.generated_enum as generated_enum import codegen.generated_imports as generated_imports +import codegen.generated_wiring as generated_wiring import codegen.jsonschema as openapi import codegen.jsonschema_patch as openapi_patch import codegen.packages as packages @@ -46,6 +47,11 @@ def main(output: str): _write_exports(namespace, dataclasses, enums, output) + # Generate the per-resource wiring in databricks.bundles.core (the + # _ResourceType registry, Resources add_*/property methods, *_mutator + # decorators, and the core package __init__). + generated_wiring.write_wiring(output) + def _transitively_mark_deprecated_and_private( roots: list[str], diff --git a/python/databricks/bundles/.gitattributes b/python/databricks/bundles/.gitattributes index 747d44f1640..658274265f1 100644 --- a/python/databricks/bundles/.gitattributes +++ b/python/databricks/bundles/.gitattributes @@ -1,5 +1,6 @@ # Generated by pydabs-codegen (see python/codegen). Each generated namespace -# has a _models/ tree and an __init__.py; core/ is hand-written, so unset it. +# has a _models/ tree and an __init__.py. In core/, only the _generated/ tree +# and the package __init__.py are generated; the rest is hand-written. */_models/** linguist-generated=true */__init__.py linguist-generated=true -core/__init__.py linguist-generated=false +core/_generated/** linguist-generated=true diff --git a/python/databricks/bundles/core/__init__.py b/python/databricks/bundles/core/__init__.py index 98abbaaf458..cb0f122ad03 100644 --- a/python/databricks/bundles/core/__init__.py +++ b/python/databricks/bundles/core/__init__.py @@ -1,3 +1,5 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + __all__ = [ "Bundle", "Diagnostic", @@ -31,6 +33,14 @@ Diagnostics, Severity, ) +from databricks.bundles.core._generated._resource_mutators import ( + alert_mutator, + catalog_mutator, + job_mutator, + pipeline_mutator, + schema_mutator, + volume_mutator, +) from databricks.bundles.core._load import ( load_resources_from_current_package_module, load_resources_from_module, @@ -39,15 +49,7 @@ ) from databricks.bundles.core._location import Location from databricks.bundles.core._resource import Resource -from databricks.bundles.core._resource_mutator import ( - ResourceMutator, - alert_mutator, - catalog_mutator, - job_mutator, - pipeline_mutator, - schema_mutator, - volume_mutator, -) +from databricks.bundles.core._resource_mutator import ResourceMutator from databricks.bundles.core._resources import Resources from databricks.bundles.core._variable import ( Variable, diff --git a/python/databricks/bundles/core/_generated/__init__.py b/python/databricks/bundles/core/_generated/__init__.py new file mode 100644 index 00000000000..571ca160596 --- /dev/null +++ b/python/databricks/bundles/core/_generated/__init__.py @@ -0,0 +1 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. diff --git a/python/databricks/bundles/core/_generated/_resource_mutators.py b/python/databricks/bundles/core/_generated/_resource_mutators.py new file mode 100644 index 00000000000..410124eac81 --- /dev/null +++ b/python/databricks/bundles/core/_generated/_resource_mutators.py @@ -0,0 +1,216 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._resource_mutator import ResourceMutator + +if TYPE_CHECKING: + from databricks.bundles.alerts._models.alert import Alert + from databricks.bundles.catalogs._models.catalog import Catalog + from databricks.bundles.jobs._models.job import Job + from databricks.bundles.pipelines._models.pipeline import Pipeline + from databricks.bundles.schemas._models.schema import Schema + from databricks.bundles.volumes._models.volume import Volume + +__all__ = [ + "alert_mutator", + "catalog_mutator", + "job_mutator", + "pipeline_mutator", + "schema_mutator", + "volume_mutator", +] + + +@overload +def alert_mutator( + function: Callable[[Bundle, "Alert"], "Alert"], +) -> ResourceMutator["Alert"]: ... + + +@overload +def alert_mutator( + function: Callable[["Alert"], "Alert"], +) -> ResourceMutator["Alert"]: ... + + +def alert_mutator(function: Callable) -> ResourceMutator["Alert"]: + """ + Decorator for defining an alert mutator. Function should return a new instance of the alert + with the desired changes, instead of mutating the input alert. + + Example: + + .. code-block:: python + + @alert_mutator + def my_alert_mutator(bundle: Bundle, alert: Alert) -> Alert: + return replace(alert, ...) + + :param function: Function that mutates an alert. + """ + from databricks.bundles.alerts._models.alert import Alert + + return ResourceMutator(resource_type=Alert, function=function) + + +@overload +def catalog_mutator( + function: Callable[[Bundle, "Catalog"], "Catalog"], +) -> ResourceMutator["Catalog"]: ... + + +@overload +def catalog_mutator( + function: Callable[["Catalog"], "Catalog"], +) -> ResourceMutator["Catalog"]: ... + + +def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: + """ + Decorator for defining a catalog mutator. Function should return a new instance of the catalog + with the desired changes, instead of mutating the input catalog. + + Example: + + .. code-block:: python + + @catalog_mutator + def my_catalog_mutator(bundle: Bundle, catalog: Catalog) -> Catalog: + return replace(catalog, ...) + + :param function: Function that mutates a catalog. + """ + from databricks.bundles.catalogs._models.catalog import Catalog + + return ResourceMutator(resource_type=Catalog, function=function) + + +@overload +def job_mutator( + function: Callable[[Bundle, "Job"], "Job"], +) -> ResourceMutator["Job"]: ... + + +@overload +def job_mutator( + function: Callable[["Job"], "Job"], +) -> ResourceMutator["Job"]: ... + + +def job_mutator(function: Callable) -> ResourceMutator["Job"]: + """ + Decorator for defining a job mutator. Function should return a new instance of the job + with the desired changes, instead of mutating the input job. + + Example: + + .. code-block:: python + + @job_mutator + def my_job_mutator(bundle: Bundle, job: Job) -> Job: + return replace(job, ...) + + :param function: Function that mutates a job. + """ + from databricks.bundles.jobs._models.job import Job + + return ResourceMutator(resource_type=Job, function=function) + + +@overload +def pipeline_mutator( + function: Callable[[Bundle, "Pipeline"], "Pipeline"], +) -> ResourceMutator["Pipeline"]: ... + + +@overload +def pipeline_mutator( + function: Callable[["Pipeline"], "Pipeline"], +) -> ResourceMutator["Pipeline"]: ... + + +def pipeline_mutator(function: Callable) -> ResourceMutator["Pipeline"]: + """ + Decorator for defining a pipeline mutator. Function should return a new instance of the pipeline + with the desired changes, instead of mutating the input pipeline. + + Example: + + .. code-block:: python + + @pipeline_mutator + def my_pipeline_mutator(bundle: Bundle, pipeline: Pipeline) -> Pipeline: + return replace(pipeline, ...) + + :param function: Function that mutates a pipeline. + """ + from databricks.bundles.pipelines._models.pipeline import Pipeline + + return ResourceMutator(resource_type=Pipeline, function=function) + + +@overload +def schema_mutator( + function: Callable[[Bundle, "Schema"], "Schema"], +) -> ResourceMutator["Schema"]: ... + + +@overload +def schema_mutator( + function: Callable[["Schema"], "Schema"], +) -> ResourceMutator["Schema"]: ... + + +def schema_mutator(function: Callable) -> ResourceMutator["Schema"]: + """ + Decorator for defining a schema mutator. Function should return a new instance of the schema + with the desired changes, instead of mutating the input schema. + + Example: + + .. code-block:: python + + @schema_mutator + def my_schema_mutator(bundle: Bundle, schema: Schema) -> Schema: + return replace(schema, ...) + + :param function: Function that mutates a schema. + """ + from databricks.bundles.schemas._models.schema import Schema + + return ResourceMutator(resource_type=Schema, function=function) + + +@overload +def volume_mutator( + function: Callable[[Bundle, "Volume"], "Volume"], +) -> ResourceMutator["Volume"]: ... + + +@overload +def volume_mutator( + function: Callable[["Volume"], "Volume"], +) -> ResourceMutator["Volume"]: ... + + +def volume_mutator(function: Callable) -> ResourceMutator["Volume"]: + """ + Decorator for defining a volume mutator. Function should return a new instance of the volume + with the desired changes, instead of mutating the input volume. + + Example: + + .. code-block:: python + + @volume_mutator + def my_volume_mutator(bundle: Bundle, volume: Volume) -> Volume: + return replace(volume, ...) + + :param function: Function that mutates a volume. + """ + from databricks.bundles.volumes._models.volume import Volume + + return ResourceMutator(resource_type=Volume, function=function) diff --git a/python/databricks/bundles/core/_generated/_resource_types.py b/python/databricks/bundles/core/_generated/_resource_types.py new file mode 100644 index 00000000000..614600d1d39 --- /dev/null +++ b/python/databricks/bundles/core/_generated/_resource_types.py @@ -0,0 +1,51 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + + +def _all_resource_types() -> "tuple[_ResourceType, ...]": + # Lazily import resource types so that databricks.bundles.core is not + # imported from databricks.bundles.. + from databricks.bundles.alerts._models.alert import Alert + from databricks.bundles.catalogs._models.catalog import Catalog + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.jobs._models.job import Job + from databricks.bundles.pipelines._models.pipeline import Pipeline + from databricks.bundles.schemas._models.schema import Schema + from databricks.bundles.volumes._models.volume import Volume + + return ( + _ResourceType( + resource_type=Alert, + singular_name="alert", + plural_name="alerts", + ), + _ResourceType( + resource_type=Catalog, + singular_name="catalog", + plural_name="catalogs", + ), + _ResourceType( + resource_type=Job, + singular_name="job", + plural_name="jobs", + ), + _ResourceType( + resource_type=Pipeline, + singular_name="pipeline", + plural_name="pipelines", + ), + _ResourceType( + resource_type=Schema, + singular_name="schema", + plural_name="schemas", + ), + _ResourceType( + resource_type=Volume, + singular_name="volume", + plural_name="volumes", + ), + ) diff --git a/python/databricks/bundles/core/_generated/_resources.py b/python/databricks/bundles/core/_generated/_resources.py new file mode 100644 index 00000000000..f9881ccc08d --- /dev/null +++ b/python/databricks/bundles/core/_generated/_resources.py @@ -0,0 +1,255 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from typing import TYPE_CHECKING, Optional + +from databricks.bundles.core._location import Location +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.alerts._models.alert import Alert, AlertParam + from databricks.bundles.catalogs._models.catalog import Catalog, CatalogParam + from databricks.bundles.jobs._models.job import Job, JobParam + from databricks.bundles.pipelines._models.pipeline import Pipeline, PipelineParam + from databricks.bundles.schemas._models.schema import Schema, SchemaParam + from databricks.bundles.volumes._models.volume import Volume, VolumeParam + +__all__ = ["_GeneratedResources"] + + +class _GeneratedResources: + """ + Generated per-resource accessors and add_* methods, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def alerts(self) -> dict[str, "Alert"]: + return self._resources["alerts"] + + @property + def catalogs(self) -> dict[str, "Catalog"]: + return self._resources["catalogs"] + + @property + def jobs(self) -> dict[str, "Job"]: + return self._resources["jobs"] + + @property + def pipelines(self) -> dict[str, "Pipeline"]: + return self._resources["pipelines"] + + @property + def schemas(self) -> dict[str, "Schema"]: + return self._resources["schemas"] + + @property + def volumes(self) -> dict[str, "Volume"]: + return self._resources["volumes"] + + def add_alert( + self, + resource_name: str, + alert: "AlertParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds an alert to the collection of resources. Resource name must be unique across all alerts. + + :param resource_name: unique identifier for the alert + :param alert: the alert to add, can be Alert or dict + :param location: optional location of the alert in the source code + """ + from databricks.bundles.alerts._models.alert import Alert + + alert = _transform(Alert, alert) + path = ("resources", "alerts", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["alerts"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'alert'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["alerts"][resource_name] = alert + + def add_catalog( + self, + resource_name: str, + catalog: "CatalogParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds a catalog to the collection of resources. Resource name must be unique across all catalogs. + + :param resource_name: unique identifier for the catalog + :param catalog: the catalog to add, can be Catalog or dict + :param location: optional location of the catalog in the source code + """ + from databricks.bundles.catalogs._models.catalog import Catalog + + catalog = _transform(Catalog, catalog) + path = ("resources", "catalogs", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["catalogs"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'catalog'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["catalogs"][resource_name] = catalog + + def add_job( + self, + resource_name: str, + job: "JobParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds a job to the collection of resources. Resource name must be unique across all jobs. + + :param resource_name: unique identifier for the job + :param job: the job to add, can be Job or dict + :param location: optional location of the job in the source code + """ + from databricks.bundles.jobs._models.job import Job + + job = _transform(Job, job) + path = ("resources", "jobs", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["jobs"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'job'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["jobs"][resource_name] = job + + def add_pipeline( + self, + resource_name: str, + pipeline: "PipelineParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds a pipeline to the collection of resources. Resource name must be unique across all pipelines. + + :param resource_name: unique identifier for the pipeline + :param pipeline: the pipeline to add, can be Pipeline or dict + :param location: optional location of the pipeline in the source code + """ + from databricks.bundles.pipelines._models.pipeline import Pipeline + + pipeline = _transform(Pipeline, pipeline) + path = ("resources", "pipelines", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["pipelines"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'pipeline'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["pipelines"][resource_name] = pipeline + + def add_schema( + self, + resource_name: str, + schema: "SchemaParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds a schema to the collection of resources. Resource name must be unique across all schemas. + + :param resource_name: unique identifier for the schema + :param schema: the schema to add, can be Schema or dict + :param location: optional location of the schema in the source code + """ + from databricks.bundles.schemas._models.schema import Schema + + schema = _transform(Schema, schema) + path = ("resources", "schemas", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["schemas"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'schema'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["schemas"][resource_name] = schema + + def add_volume( + self, + resource_name: str, + volume: "VolumeParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds a volume to the collection of resources. Resource name must be unique across all volumes. + + :param resource_name: unique identifier for the volume + :param volume: the volume to add, can be Volume or dict + :param location: optional location of the volume in the source code + """ + from databricks.bundles.volumes._models.volume import Volume + + volume = _transform(Volume, volume) + path = ("resources", "volumes", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["volumes"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'volume'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["volumes"][resource_name] = volume From 69fb5199fa3e71ff215caa767d7bb2b2bd85f552 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 21:14:53 +0000 Subject: [PATCH 11/14] Consume generated wiring in core and drop hand-written duplicates Resources now inherits the generated _GeneratedResources mixin instead of defining per-resource add_*/property methods; _ResourceType.all() returns the generated tuple; and _resource_mutator.py keeps only the ResourceMutator dataclass, with the decorators now generated. Tests import the mutators from the public databricks.bundles.core instead of the internal module. Behavior-preserving: the generated wiring reproduces what was hand-written. Co-authored-by: Isaac --- .../bundles/core/_resource_mutator.py | 206 +--------------- .../databricks/bundles/core/_resource_type.py | 46 +--- python/databricks/bundles/core/_resources.py | 226 +----------------- .../databricks_tests/core/test_resources.py | 12 +- python/databricks_tests/test_build.py | 2 +- 5 files changed, 19 insertions(+), 473 deletions(-) diff --git a/python/databricks/bundles/core/_resource_mutator.py b/python/databricks/bundles/core/_resource_mutator.py index fafdcdc5efb..22ea17cfc51 100644 --- a/python/databricks/bundles/core/_resource_mutator.py +++ b/python/databricks/bundles/core/_resource_mutator.py @@ -1,18 +1,9 @@ from collections.abc import Callable from dataclasses import dataclass -from typing import TYPE_CHECKING, Generic, Type, TypeVar, overload +from typing import Generic, Type, TypeVar -from databricks.bundles.core._bundle import Bundle from databricks.bundles.core._resource import Resource -if TYPE_CHECKING: - from databricks.bundles.alerts._models.alert import Alert - from databricks.bundles.catalogs._models.catalog import Catalog - from databricks.bundles.jobs._models.job import Job - from databricks.bundles.pipelines._models.pipeline import Pipeline - from databricks.bundles.schemas._models.schema import Schema - from databricks.bundles.volumes._models.volume import Volume - _T = TypeVar("_T", bound=Resource) @@ -57,8 +48,9 @@ def my_job_mutator(bundle: Bundle, job: Job) -> Job: """ -# Below, we define decorators for each resource type. This approach allows us -# to implement mutators that are only applied for specific resource types. +# A decorator is generated for each resource type (see +# _generated/_resource_mutators.py). This approach allows us to implement +# mutators that are only applied for specific resource types. # # Alternative approaches considered and rejected during design: # @@ -69,193 +61,3 @@ def my_job_mutator(bundle: Bundle, job: Job) -> Job: # - Using a universal @mutator decorator. # Rationale: Determining whether a mutator is invoked based solely on type annotations # was deemed overly implicit and potentially confusing. - - -@overload -def alert_mutator( - function: Callable[[Bundle, "Alert"], "Alert"], -) -> ResourceMutator["Alert"]: ... - - -@overload -def alert_mutator( - function: Callable[["Alert"], "Alert"], -) -> ResourceMutator["Alert"]: ... - - -def alert_mutator(function: Callable) -> ResourceMutator["Alert"]: - """ - Decorator for defining an alert mutator. Function should return a new instance of the alert with the desired changes, - instead of mutating the input alert. - - Example: - - .. code-block:: python - - @alert_mutator - def my_alert_mutator(bundle: Bundle, alert: Alert) -> Alert: - return replace(alert, display_name="my_alert") - - :param function: Function that mutates an alert. - """ - from databricks.bundles.alerts._models.alert import Alert - - return ResourceMutator(resource_type=Alert, function=function) - - -@overload -def catalog_mutator( - function: Callable[[Bundle, "Catalog"], "Catalog"], -) -> ResourceMutator["Catalog"]: ... - - -@overload -def catalog_mutator( - function: Callable[["Catalog"], "Catalog"], -) -> ResourceMutator["Catalog"]: ... - - -def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: - """ - Decorator for defining a catalog mutator. Function should return a new instance of the catalog with the desired changes, - instead of mutating the input catalog. - - Example: - - .. code-block:: python - - @catalog_mutator - def my_catalog_mutator(bundle: Bundle, catalog: Catalog) -> Catalog: - return replace(catalog, name="my_catalog") - - :param function: Function that mutates a catalog. - """ - from databricks.bundles.catalogs._models.catalog import Catalog - - return ResourceMutator(resource_type=Catalog, function=function) - - -@overload -def job_mutator( - function: Callable[[Bundle, "Job"], "Job"], -) -> ResourceMutator["Job"]: ... - - -@overload -def job_mutator(function: Callable[["Job"], "Job"]) -> ResourceMutator["Job"]: ... - - -def job_mutator(function: Callable) -> ResourceMutator["Job"]: - """ - Decorator for defining a job mutator. Function should return a new instance of the job with the desired changes, - instead of mutating the input job. - - Example: - - .. code-block:: python - - @job_mutator - def my_job_mutator(bundle: Bundle, job: Job) -> Job: - return replace(job, name="my_job") - - :param function: Function that mutates a job. - """ - from databricks.bundles.jobs._models.job import Job - - return ResourceMutator(resource_type=Job, function=function) - - -@overload -def pipeline_mutator( - function: Callable[[Bundle, "Pipeline"], "Pipeline"], -) -> ResourceMutator["Pipeline"]: ... - - -@overload -def pipeline_mutator( - function: Callable[["Pipeline"], "Pipeline"], -) -> ResourceMutator["Pipeline"]: ... - - -def pipeline_mutator(function: Callable) -> ResourceMutator["Pipeline"]: - """ - Decorator for defining a pipeline mutator. Function should return a new instance of the pipeline with the desired changes, - instead of mutating the input pipeline. - - Example: - - .. code-block:: python - - @pipeline_mutator - def my_pipeline_mutator(bundle: Bundle, pipeline: Pipeline) -> Pipeline: - return replace(pipeline, name="my_job") - - :param function: Function that mutates a pipeline. - """ - from databricks.bundles.pipelines._models.pipeline import Pipeline - - return ResourceMutator(resource_type=Pipeline, function=function) - - -@overload -def schema_mutator( - function: Callable[[Bundle, "Schema"], "Schema"], -) -> ResourceMutator["Schema"]: ... - - -@overload -def schema_mutator( - function: Callable[["Schema"], "Schema"], -) -> ResourceMutator["Schema"]: ... - - -def schema_mutator(function: Callable) -> ResourceMutator["Schema"]: - """ - Decorator for defining a schema mutator. Function should return a new instance of the schema with the desired changes, - instead of mutating the input schema. - - Example: - - .. code-block:: python - - @schema_mutator - def my_schema_mutator(bundle: Bundle, schema: Schema) -> Schema: - return replace(schema, name="my_schema") - - :param function: Function that mutates a schema. - """ - from databricks.bundles.schemas._models.schema import Schema - - return ResourceMutator(resource_type=Schema, function=function) - - -@overload -def volume_mutator( - function: Callable[[Bundle, "Volume"], "Volume"], -) -> ResourceMutator["Volume"]: ... - - -@overload -def volume_mutator( - function: Callable[["Volume"], "Volume"], -) -> ResourceMutator["Volume"]: ... - - -def volume_mutator(function: Callable) -> ResourceMutator["Volume"]: - """ - Decorator for defining a volume mutator. Function should return a new instance of the volume with the desired changes, - instead of mutating the input volume. - - Example: - - .. code-block:: python - - @volume_mutator - def my_volume_mutator(bundle: Bundle, volume: Volume) -> Volume: - return replace(volume, name="my_volume") - - :param function: Function that mutates a volume. - """ - from databricks.bundles.volumes._models.volume import Volume - - return ResourceMutator(resource_type=Volume, function=function) diff --git a/python/databricks/bundles/core/_resource_type.py b/python/databricks/bundles/core/_resource_type.py index 73d30a92072..021ac4824ef 100644 --- a/python/databricks/bundles/core/_resource_type.py +++ b/python/databricks/bundles/core/_resource_type.py @@ -27,46 +27,8 @@ def all(cls) -> tuple["_ResourceType", ...]: """ Returns all supported resource types. """ - - # intentionally lazily load all resource types to avoid imports from databricks.bundles.core to - # be imported in databricks.bundles. - - from databricks.bundles.alerts._models.alert import Alert - from databricks.bundles.catalogs._models.catalog import Catalog - from databricks.bundles.jobs._models.job import Job - from databricks.bundles.pipelines._models.pipeline import Pipeline - from databricks.bundles.schemas._models.schema import Schema - from databricks.bundles.volumes._models.volume import Volume - - return ( - _ResourceType( - resource_type=Job, - singular_name="job", - plural_name="jobs", - ), - _ResourceType( - resource_type=Pipeline, - plural_name="pipelines", - singular_name="pipeline", - ), - _ResourceType( - resource_type=Volume, - plural_name="volumes", - singular_name="volume", - ), - _ResourceType( - resource_type=Schema, - plural_name="schemas", - singular_name="schema", - ), - _ResourceType( - resource_type=Alert, - plural_name="alerts", - singular_name="alert", - ), - _ResourceType( - resource_type=Catalog, - plural_name="catalogs", - singular_name="catalog", - ), + from databricks.bundles.core._generated._resource_types import ( + _all_resource_types, ) + + return _all_resource_types() diff --git a/python/databricks/bundles/core/_resources.py b/python/databricks/bundles/core/_resources.py index 72649b33650..cc4c57f0ec3 100644 --- a/python/databricks/bundles/core/_resources.py +++ b/python/databricks/bundles/core/_resources.py @@ -1,23 +1,15 @@ -from typing import TYPE_CHECKING, Optional +from typing import Optional from databricks.bundles.core._diagnostics import Diagnostics +from databricks.bundles.core._generated._resources import _GeneratedResources from databricks.bundles.core._location import Location from databricks.bundles.core._resource import Resource from databricks.bundles.core._resource_type import _ResourceType -from databricks.bundles.core._transform import _transform - -if TYPE_CHECKING: - from databricks.bundles.alerts._models.alert import Alert, AlertParam - from databricks.bundles.catalogs._models.catalog import Catalog, CatalogParam - from databricks.bundles.jobs._models.job import Job, JobParam - from databricks.bundles.pipelines._models.pipeline import Pipeline, PipelineParam - from databricks.bundles.schemas._models.schema import Schema, SchemaParam - from databricks.bundles.volumes._models.volume import Volume, VolumeParam __all__ = ["Resources"] -class Resources: +class Resources(_GeneratedResources): """ Resources is a collection of resources in a bundle. @@ -65,22 +57,6 @@ def __init__(self): self._locations = dict[tuple[str, ...], Location]() self._diagnostics = Diagnostics() - @property - def jobs(self) -> dict[str, "Job"]: - return self._resources["jobs"] - - @property - def pipelines(self) -> dict[str, "Pipeline"]: - return self._resources["pipelines"] - - @property - def schemas(self) -> dict[str, "Schema"]: - return self._resources["schemas"] - - @property - def volumes(self) -> dict[str, "Volume"]: - return self._resources["volumes"] - @property def diagnostics(self) -> Diagnostics: """ @@ -88,14 +64,6 @@ def diagnostics(self) -> Diagnostics: """ return self._diagnostics - @property - def alerts(self) -> dict[str, "Alert"]: - return self._resources["alerts"] - - @property - def catalogs(self) -> dict[str, "Catalog"]: - return self._resources["catalogs"] - def add_resource( self, resource_name: str, @@ -122,194 +90,6 @@ def add_resource( raise ValueError(f"Unsupported resource type: {type(resource)}") - def add_job( - self, - resource_name: str, - job: "JobParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds a job to the collection of resources. Resource name must be unique across all jobs. - - :param resource_name: unique identifier for the job - :param job: the job to add, can be Job or dict - :param location: optional location of the job in the source code - """ - from databricks.bundles.jobs import Job - - job = _transform(Job, job) - path = ("resources", "jobs", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["jobs"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'job'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["jobs"][resource_name] = job - - def add_pipeline( - self, - resource_name: str, - pipeline: "PipelineParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds a pipeline to the collection of resources. Resource name must be unique across all pipelines. - - :param resource_name: unique identifier for the pipeline - :param pipeline: the pipeline to add, can be Pipeline or dict - :param location: optional location of the pipeline in the source code - """ - from databricks.bundles.pipelines import Pipeline - - pipeline = _transform(Pipeline, pipeline) - path = ("resources", "pipelines", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["pipelines"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'pipeline'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["pipelines"][resource_name] = pipeline - - def add_schema( - self, - resource_name: str, - schema: "SchemaParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds a schema to the collection of resources. Resource name must be unique across all schemas. - - :param resource_name: unique identifier for the schema - :param schema: the schema to add, can be Schema or dict - :param location: optional location of the schema in the source code - """ - from databricks.bundles.schemas import Schema - - schema = _transform(Schema, schema) - path = ("resources", "schemas", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["schemas"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'schema'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["schemas"][resource_name] = schema - - def add_volume( - self, - resource_name: str, - volume: "VolumeParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds a volume to the collection of resources. Resource name must be unique across all volumes. - - :param resource_name: unique identifier for the volume - :param volume: the volume to add, can be Volume or dict - :param location: optional location of the volume in the source code - """ - from databricks.bundles.volumes import Volume - - volume = _transform(Volume, volume) - path = ("resources", "volumes", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["volumes"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'volume'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["volumes"][resource_name] = volume - - def add_alert( - self, - resource_name: str, - alert: "AlertParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds an alert to the collection of resources. Resource name must be unique across all alerts. - """ - from databricks.bundles.alerts import Alert - - alert = _transform(Alert, alert) - path = ("resources", "alerts", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["alerts"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'alert'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["alerts"][resource_name] = alert - - def add_catalog( - self, - resource_name: str, - catalog: "CatalogParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds a catalog to the collection of resources. Resource name must be unique across all catalogs. - - :param resource_name: unique identifier for the catalog - :param catalog: the catalog to add, can be Catalog or dict - :param location: optional location of the catalog in the source code - """ - from databricks.bundles.catalogs import Catalog - - catalog = _transform(Catalog, catalog) - path = ("resources", "catalogs", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["catalogs"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'catalog'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["catalogs"][resource_name] = catalog - def add_location(self, path: tuple[str, ...], location: Location) -> None: """ Associate source code location with a path in the bundle configuration. diff --git a/python/databricks_tests/core/test_resources.py b/python/databricks_tests/core/test_resources.py index af1b9cc774d..ee2ab7ec405 100644 --- a/python/databricks_tests/core/test_resources.py +++ b/python/databricks_tests/core/test_resources.py @@ -11,11 +11,10 @@ from databricks.bundles.alerts._models.comparison_operator import ComparisonOperator from databricks.bundles.alerts._models.cron_schedule import CronSchedule from databricks.bundles.catalogs._models.catalog import Catalog -from databricks.bundles.core import Location, Resources, Severity -from databricks.bundles.core._bundle import Bundle -from databricks.bundles.core._resource import Resource -from databricks.bundles.core._resource_mutator import ( - ResourceMutator, +from databricks.bundles.core import ( + Location, + Resources, + Severity, alert_mutator, catalog_mutator, job_mutator, @@ -23,6 +22,9 @@ schema_mutator, volume_mutator, ) +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._resource import Resource +from databricks.bundles.core._resource_mutator import ResourceMutator from databricks.bundles.core._resource_type import _ResourceType from databricks.bundles.jobs._models.job import Job from databricks.bundles.pipelines._models.pipeline import Pipeline diff --git a/python/databricks_tests/test_build.py b/python/databricks_tests/test_build.py index 65d9683e922..14fce619757 100644 --- a/python/databricks_tests/test_build.py +++ b/python/databricks_tests/test_build.py @@ -28,8 +28,8 @@ Resources, Severity, job_mutator, + pipeline_mutator, ) -from databricks.bundles.core._resource_mutator import pipeline_mutator from databricks.bundles.jobs import Job from databricks.bundles.pipelines._models.pipeline import Pipeline From 9ce5799e080bcc51af8b74226ddd4692b8c57343 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 22:32:30 +0000 Subject: [PATCH 12/14] remove the useless article generator --- python/codegen/codegen/generated_wiring.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/python/codegen/codegen/generated_wiring.py b/python/codegen/codegen/generated_wiring.py index 33be440ac51..7aa34c8f6f2 100644 --- a/python/codegen/codegen/generated_wiring.py +++ b/python/codegen/codegen/generated_wiring.py @@ -16,12 +16,6 @@ HEADER = "# Code generated by pydabs-codegen. DO NOT EDIT.\n\n" -def _article(word: str) -> str: - # Grammatical article for docstrings only; the duplicate-resource error - # message uses uniform wording and does not need this. - return "an" if word[:1].lower() in "aeiou" else "a" - - @dataclass(frozen=True) class _WiredResource: class_name: str @@ -66,8 +60,6 @@ def write_wiring(output: str): generated_path = core_path / "_generated" generated_path.mkdir(parents=True, exist_ok=True) - # Package marker: just the generated-file header, with no trailing blank - # line (the whitespace check rejects one). (generated_path / "__init__.py").write_text(HEADER.rstrip() + "\n") (generated_path / "_resource_types.py").write_text( HEADER + _resource_types_code(resources) From e1c2b7a921bf9943cbe8b046726b3910dbbb3037 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Thu, 27 Aug 2026 22:47:26 +0000 Subject: [PATCH 13/14] remove articles completely from the code --- python/codegen/codegen/generated_wiring.py | 6 ++--- .../core/_generated/_resource_mutators.py | 24 +++++++++---------- .../bundles/core/_generated/_resources.py | 12 +++++----- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/python/codegen/codegen/generated_wiring.py b/python/codegen/codegen/generated_wiring.py index 7aa34c8f6f2..58a90161a3e 100644 --- a/python/codegen/codegen/generated_wiring.py +++ b/python/codegen/codegen/generated_wiring.py @@ -171,7 +171,7 @@ def _add_method_code(r: _WiredResource) -> str: location: Optional[Location] = None, ) -> None: """ - Adds {_article(r.singular_name)} {r.singular_name} to the collection of resources. Resource name must be unique across all {r.plural_name}. + Adds the resource {r.singular_name} to the collection of resources. Resource name must be unique across all {r.plural_name}. :param resource_name: unique identifier for the {r.singular_name} :param {r.singular_name}: the {r.singular_name} to add, can be {r.class_name} or dict @@ -238,7 +238,7 @@ def {name}( def {name}(function: Callable) -> ResourceMutator["{r.class_name}"]: """ - Decorator for defining {_article(r.singular_name)} {r.singular_name} mutator. Function should return a new instance of the {r.singular_name} + Decorator for defining mutator for {r.plural_name}. Function should return a new instance of the {r.singular_name} with the desired changes, instead of mutating the input {r.singular_name}. Example: @@ -249,7 +249,7 @@ def {name}(function: Callable) -> ResourceMutator["{r.class_name}"]: def my_{name}(bundle: Bundle, {r.singular_name}: {r.class_name}) -> {r.class_name}: return replace({r.singular_name}, ...) - :param function: Function that mutates {_article(r.singular_name)} {r.singular_name}. + :param function: Function that mutates {r.plural_name}. """ from {r.model_module} import {r.class_name} diff --git a/python/databricks/bundles/core/_generated/_resource_mutators.py b/python/databricks/bundles/core/_generated/_resource_mutators.py index 410124eac81..37526b5833f 100644 --- a/python/databricks/bundles/core/_generated/_resource_mutators.py +++ b/python/databricks/bundles/core/_generated/_resource_mutators.py @@ -38,7 +38,7 @@ def alert_mutator( def alert_mutator(function: Callable) -> ResourceMutator["Alert"]: """ - Decorator for defining an alert mutator. Function should return a new instance of the alert + Decorator for defining mutator for alerts. Function should return a new instance of the alert with the desired changes, instead of mutating the input alert. Example: @@ -49,7 +49,7 @@ def alert_mutator(function: Callable) -> ResourceMutator["Alert"]: def my_alert_mutator(bundle: Bundle, alert: Alert) -> Alert: return replace(alert, ...) - :param function: Function that mutates an alert. + :param function: Function that mutates alerts. """ from databricks.bundles.alerts._models.alert import Alert @@ -70,7 +70,7 @@ def catalog_mutator( def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: """ - Decorator for defining a catalog mutator. Function should return a new instance of the catalog + Decorator for defining mutator for catalogs. Function should return a new instance of the catalog with the desired changes, instead of mutating the input catalog. Example: @@ -81,7 +81,7 @@ def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: def my_catalog_mutator(bundle: Bundle, catalog: Catalog) -> Catalog: return replace(catalog, ...) - :param function: Function that mutates a catalog. + :param function: Function that mutates catalogs. """ from databricks.bundles.catalogs._models.catalog import Catalog @@ -102,7 +102,7 @@ def job_mutator( def job_mutator(function: Callable) -> ResourceMutator["Job"]: """ - Decorator for defining a job mutator. Function should return a new instance of the job + Decorator for defining mutator for jobs. Function should return a new instance of the job with the desired changes, instead of mutating the input job. Example: @@ -113,7 +113,7 @@ def job_mutator(function: Callable) -> ResourceMutator["Job"]: def my_job_mutator(bundle: Bundle, job: Job) -> Job: return replace(job, ...) - :param function: Function that mutates a job. + :param function: Function that mutates jobs. """ from databricks.bundles.jobs._models.job import Job @@ -134,7 +134,7 @@ def pipeline_mutator( def pipeline_mutator(function: Callable) -> ResourceMutator["Pipeline"]: """ - Decorator for defining a pipeline mutator. Function should return a new instance of the pipeline + Decorator for defining mutator for pipelines. Function should return a new instance of the pipeline with the desired changes, instead of mutating the input pipeline. Example: @@ -145,7 +145,7 @@ def pipeline_mutator(function: Callable) -> ResourceMutator["Pipeline"]: def my_pipeline_mutator(bundle: Bundle, pipeline: Pipeline) -> Pipeline: return replace(pipeline, ...) - :param function: Function that mutates a pipeline. + :param function: Function that mutates pipelines. """ from databricks.bundles.pipelines._models.pipeline import Pipeline @@ -166,7 +166,7 @@ def schema_mutator( def schema_mutator(function: Callable) -> ResourceMutator["Schema"]: """ - Decorator for defining a schema mutator. Function should return a new instance of the schema + Decorator for defining mutator for schemas. Function should return a new instance of the schema with the desired changes, instead of mutating the input schema. Example: @@ -177,7 +177,7 @@ def schema_mutator(function: Callable) -> ResourceMutator["Schema"]: def my_schema_mutator(bundle: Bundle, schema: Schema) -> Schema: return replace(schema, ...) - :param function: Function that mutates a schema. + :param function: Function that mutates schemas. """ from databricks.bundles.schemas._models.schema import Schema @@ -198,7 +198,7 @@ def volume_mutator( def volume_mutator(function: Callable) -> ResourceMutator["Volume"]: """ - Decorator for defining a volume mutator. Function should return a new instance of the volume + Decorator for defining mutator for volumes. Function should return a new instance of the volume with the desired changes, instead of mutating the input volume. Example: @@ -209,7 +209,7 @@ def volume_mutator(function: Callable) -> ResourceMutator["Volume"]: def my_volume_mutator(bundle: Bundle, volume: Volume) -> Volume: return replace(volume, ...) - :param function: Function that mutates a volume. + :param function: Function that mutates volumes. """ from databricks.bundles.volumes._models.volume import Volume diff --git a/python/databricks/bundles/core/_generated/_resources.py b/python/databricks/bundles/core/_generated/_resources.py index f9881ccc08d..40f36b50705 100644 --- a/python/databricks/bundles/core/_generated/_resources.py +++ b/python/databricks/bundles/core/_generated/_resources.py @@ -70,7 +70,7 @@ def add_alert( location: Optional[Location] = None, ) -> None: """ - Adds an alert to the collection of resources. Resource name must be unique across all alerts. + Adds the resource alert to the collection of resources. Resource name must be unique across all alerts. :param resource_name: unique identifier for the alert :param alert: the alert to add, can be Alert or dict @@ -102,7 +102,7 @@ def add_catalog( location: Optional[Location] = None, ) -> None: """ - Adds a catalog to the collection of resources. Resource name must be unique across all catalogs. + Adds the resource catalog to the collection of resources. Resource name must be unique across all catalogs. :param resource_name: unique identifier for the catalog :param catalog: the catalog to add, can be Catalog or dict @@ -134,7 +134,7 @@ def add_job( location: Optional[Location] = None, ) -> None: """ - Adds a job to the collection of resources. Resource name must be unique across all jobs. + Adds the resource job to the collection of resources. Resource name must be unique across all jobs. :param resource_name: unique identifier for the job :param job: the job to add, can be Job or dict @@ -166,7 +166,7 @@ def add_pipeline( location: Optional[Location] = None, ) -> None: """ - Adds a pipeline to the collection of resources. Resource name must be unique across all pipelines. + Adds the resource pipeline to the collection of resources. Resource name must be unique across all pipelines. :param resource_name: unique identifier for the pipeline :param pipeline: the pipeline to add, can be Pipeline or dict @@ -198,7 +198,7 @@ def add_schema( location: Optional[Location] = None, ) -> None: """ - Adds a schema to the collection of resources. Resource name must be unique across all schemas. + Adds the resource schema to the collection of resources. Resource name must be unique across all schemas. :param resource_name: unique identifier for the schema :param schema: the schema to add, can be Schema or dict @@ -230,7 +230,7 @@ def add_volume( location: Optional[Location] = None, ) -> None: """ - Adds a volume to the collection of resources. Resource name must be unique across all volumes. + Adds the resource volume to the collection of resources. Resource name must be unique across all volumes. :param resource_name: unique identifier for the volume :param volume: the volume to add, can be Volume or dict From d385c7fc293a5141205468be3293bd59d54e1317 Mon Sep 17 00:00:00 2001 From: Sankalp-Mittal Date: Fri, 28 Aug 2026 11:02:25 +0000 Subject: [PATCH 14/14] Generate core wiring as one file per resource from a template Address review feedback that the f-string-based generator was hard to reason about. Each wired resource now gets its own _generated/.py rendered from wiring_resource.py.tmpl (a string.Template with $-placeholders, so the generated shape reads like real Python and there is no brace-escaping). The generated _generated/__init__.py collects the per-resource mixins into _GeneratedResources, exposes _all_resource_types(), and re-exports the mutators. Per-resource files stay small as more resources are onboarded instead of growing single aggregate modules. Behavior unchanged: same generated API, tests green, regeneration idempotent. Co-authored-by: Isaac --- python/codegen/codegen/generated_wiring.py | 232 ++++------------ .../codegen/codegen/wiring_resource.py.tmpl | 113 ++++++++ python/databricks/bundles/core/__init__.py | 2 +- .../bundles/core/_generated/__init__.py | 60 +++++ .../core/_generated/_resource_mutators.py | 216 --------------- .../core/_generated/_resource_types.py | 51 ---- .../bundles/core/_generated/_resources.py | 255 ------------------ .../bundles/core/_generated/alerts.py | 115 ++++++++ .../bundles/core/_generated/catalogs.py | 115 ++++++++ .../bundles/core/_generated/jobs.py | 115 ++++++++ .../bundles/core/_generated/pipelines.py | 115 ++++++++ .../bundles/core/_generated/schemas.py | 115 ++++++++ .../bundles/core/_generated/volumes.py | 115 ++++++++ .../databricks/bundles/core/_resource_type.py | 4 +- python/databricks/bundles/core/_resources.py | 2 +- 15 files changed, 919 insertions(+), 706 deletions(-) create mode 100644 python/codegen/codegen/wiring_resource.py.tmpl delete mode 100644 python/databricks/bundles/core/_generated/_resource_mutators.py delete mode 100644 python/databricks/bundles/core/_generated/_resource_types.py delete mode 100644 python/databricks/bundles/core/_generated/_resources.py create mode 100644 python/databricks/bundles/core/_generated/alerts.py create mode 100644 python/databricks/bundles/core/_generated/catalogs.py create mode 100644 python/databricks/bundles/core/_generated/jobs.py create mode 100644 python/databricks/bundles/core/_generated/pipelines.py create mode 100644 python/databricks/bundles/core/_generated/schemas.py create mode 100644 python/databricks/bundles/core/_generated/volumes.py diff --git a/python/codegen/codegen/generated_wiring.py b/python/codegen/codegen/generated_wiring.py index 58a90161a3e..7811992be94 100644 --- a/python/codegen/codegen/generated_wiring.py +++ b/python/codegen/codegen/generated_wiring.py @@ -1,20 +1,27 @@ """ Generates the per-resource wiring in databricks.bundles.core that used to be -hand-written: the _ResourceType registry, the Resources add_*/property methods, -the *_mutator decorators, and the core package __init__. - -Everything specific to a resource type is emitted here so that adding a resource -needs no manual edits under databricks/bundles/core. The static, non-resource -parts of core stay hand-written (see _CORE_INIT_STATIC_EXPORTS / _CORE_INIT_STATIC_IMPORTS). +hand-written. + +Each wired resource gets its own file _generated/.py (rendered from +wiring_resource.py.tmpl): the add_* method + collection property mixin, the +*_mutator decorator, and the _ResourceType entry. The generated +_generated/__init__.py collects them into _GeneratedResources (mixed into +Resources), _all_resource_types(), and the mutator re-exports. The core package +__init__ is generated too (static exports plus the generated mutators). """ from dataclasses import dataclass from pathlib import Path +from string import Template import codegen.packages as packages HEADER = "# Code generated by pydabs-codegen. DO NOT EDIT.\n\n" +_RESOURCE_TEMPLATE = Template( + (Path(__file__).parent / "wiring_resource.py.tmpl").read_text() +) + @dataclass(frozen=True) class _WiredResource: @@ -60,202 +67,69 @@ def write_wiring(output: str): generated_path = core_path / "_generated" generated_path.mkdir(parents=True, exist_ok=True) - (generated_path / "__init__.py").write_text(HEADER.rstrip() + "\n") - (generated_path / "_resource_types.py").write_text( - HEADER + _resource_types_code(resources) - ) - (generated_path / "_resources.py").write_text(HEADER + _resources_code(resources)) - (generated_path / "_resource_mutators.py").write_text( - HEADER + _resource_mutators_code(resources) - ) + for r in resources: + code = _RESOURCE_TEMPLATE.substitute( + { + "class": r.class_name, + "singular": r.singular_name, + "plural": r.plural_name, + "model_module": r.model_module, + } + ) + (generated_path / f"{r.plural_name}.py").write_text(HEADER + code) + + (generated_path / "__init__.py").write_text(HEADER + _collector_code(resources)) (core_path / "__init__.py").write_text(HEADER + _core_init_code(resources)) print(f"Writing wiring into {generated_path}") -def _resource_types_code(resources: list[_WiredResource]) -> str: - model_imports = "\n".join( - f" from {r.model_module} import {r.class_name}" for r in resources +def _collector_code(resources: list[_WiredResource]) -> str: + imports = "\n".join( + f"from databricks.bundles.core._generated.{r.plural_name} import " + f"_{r.class_name}Resources, {r.singular_name}_mutator" + for r in resources ) - entries = "\n".join( - f""" _ResourceType( - resource_type={r.class_name}, - singular_name="{r.singular_name}", - plural_name="{r.plural_name}", - ),""" - for r in resources + mutator_names = [f"{r.singular_name}_mutator" for r in resources] + exports = sorted(["_GeneratedResources", "_all_resource_types", *mutator_names]) + all_block = "\n".join(f' "{name}",' for name in exports) + + mixins = "\n".join(f" _{r.class_name}Resources," for r in resources) + module_imports = "\n".join(f" {r.plural_name}," for r in resources) + type_entries = "\n".join( + f" {r.plural_name}._resource_type()," for r in resources ) return f"""from typing import TYPE_CHECKING -if TYPE_CHECKING: - from databricks.bundles.core._resource_type import _ResourceType - +{imports} -def _all_resource_types() -> "tuple[_ResourceType, ...]": - # Lazily import resource types so that databricks.bundles.core is not - # imported from databricks.bundles.. +if TYPE_CHECKING: from databricks.bundles.core._resource_type import _ResourceType -{model_imports} +__all__ = [ +{all_block} +] - return ( -{entries} - ) -""" +class _GeneratedResources( +{mixins} +): + pass -def _resources_code(resources: list[_WiredResource]) -> str: - type_checking_imports = "\n".join( - f" from {r.model_module} import {r.class_name}, {r.class_name}Param" - for r in resources - ) - properties = "\n\n".join( - f''' @property - def {r.plural_name}(self) -> dict[str, "{r.class_name}"]: - return self._resources["{r.plural_name}"]''' - for r in resources +def _all_resource_types() -> "tuple[_ResourceType, ...]": + from databricks.bundles.core._generated import ( +{module_imports} ) - methods = "\n\n".join(_add_method_code(r) for r in resources) - - return f'''from typing import TYPE_CHECKING, Optional - -from databricks.bundles.core._location import Location -from databricks.bundles.core._transform import _transform - -if TYPE_CHECKING: -{type_checking_imports} - -__all__ = ["_GeneratedResources"] - - -class _GeneratedResources: - """ - Generated per-resource accessors and add_* methods, mixed into Resources. - """ - - # Provided by the Resources subclass; declared here so the generated methods - # below type-check. - _resources: dict[str, dict] - - if TYPE_CHECKING: - - def add_location( - self, path: tuple[str, ...], location: Location - ) -> None: ... - - def add_diagnostic_error( - self, - msg: str, - *, - detail: Optional[str] = None, - path: Optional[tuple[str, ...]] = None, - location: Optional[Location] = None, - ) -> None: ... - -{properties} - -{methods} -''' - - -def _add_method_code(r: _WiredResource) -> str: - return f''' def add_{r.singular_name}( - self, - resource_name: str, - {r.singular_name}: "{r.class_name}Param", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource {r.singular_name} to the collection of resources. Resource name must be unique across all {r.plural_name}. - - :param resource_name: unique identifier for the {r.singular_name} - :param {r.singular_name}: the {r.singular_name} to add, can be {r.class_name} or dict - :param location: optional location of the {r.singular_name} in the source code - """ - from {r.model_module} import {r.class_name} - - {r.singular_name} = _transform({r.class_name}, {r.singular_name}) - path = ("resources", "{r.plural_name}", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["{r.plural_name}"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{{resource_name}}' for resource '{r.singular_name}'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["{r.plural_name}"][resource_name] = {r.singular_name}''' - - -def _resource_mutators_code(resources: list[_WiredResource]) -> str: - type_checking_imports = "\n".join( - f" from {r.model_module} import {r.class_name}" for r in resources + return ( +{type_entries} ) - - exports = ", ".join(f'"{r.singular_name}_mutator"' for r in resources) - - decorators = "\n\n\n".join(_mutator_code(r) for r in resources) - - return f"""from collections.abc import Callable -from typing import TYPE_CHECKING, overload - -from databricks.bundles.core._bundle import Bundle -from databricks.bundles.core._resource_mutator import ResourceMutator - -if TYPE_CHECKING: -{type_checking_imports} - -__all__ = [{exports}] - - -{decorators} """ -def _mutator_code(r: _WiredResource) -> str: - name = f"{r.singular_name}_mutator" - - return f'''@overload -def {name}( - function: Callable[[Bundle, "{r.class_name}"], "{r.class_name}"], -) -> ResourceMutator["{r.class_name}"]: ... - - -@overload -def {name}( - function: Callable[["{r.class_name}"], "{r.class_name}"], -) -> ResourceMutator["{r.class_name}"]: ... - - -def {name}(function: Callable) -> ResourceMutator["{r.class_name}"]: - """ - Decorator for defining mutator for {r.plural_name}. Function should return a new instance of the {r.singular_name} - with the desired changes, instead of mutating the input {r.singular_name}. - - Example: - - .. code-block:: python - - @{name} - def my_{name}(bundle: Bundle, {r.singular_name}: {r.class_name}) -> {r.class_name}: - return replace({r.singular_name}, ...) - - :param function: Function that mutates {r.plural_name}. - """ - from {r.model_module} import {r.class_name} - - return ResourceMutator(resource_type={r.class_name}, function=function)''' - - # Static, non-resource exports of databricks.bundles.core. Kept here because the # package __init__ is generated; the resource mutators are appended and the whole # list is sorted. @@ -319,7 +193,7 @@ def _core_init_code(resources: list[_WiredResource]) -> str: ] {_CORE_INIT_STATIC_IMPORTS} -from databricks.bundles.core._generated._resource_mutators import ( +from databricks.bundles.core._generated import ( {mutator_imports}, ) """ diff --git a/python/codegen/codegen/wiring_resource.py.tmpl b/python/codegen/codegen/wiring_resource.py.tmpl new file mode 100644 index 00000000000..90a2ea0f157 --- /dev/null +++ b/python/codegen/codegen/wiring_resource.py.tmpl @@ -0,0 +1,113 @@ +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + from ${model_module} import ${class}, ${class}Param + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.core._resource_type import _ResourceType + from ${model_module} import ${class} + + return _ResourceType( + resource_type=${class}, + singular_name="${singular}", + plural_name="${plural}", + ) + + +class _${class}Resources: + """ + Generated ${singular} accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def ${plural}(self) -> dict[str, "${class}"]: + return self._resources["${plural}"] + + def add_${singular}( + self, + resource_name: str, + ${singular}: "${class}Param", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource ${singular} to the collection of resources. Resource name must be unique across all ${plural}. + + :param resource_name: unique identifier for the ${singular} + :param ${singular}: the ${singular} to add, can be ${class} or dict + :param location: optional location of the ${singular} in the source code + """ + from ${model_module} import ${class} + + ${singular} = _transform(${class}, ${singular}) + path = ("resources", "${plural}", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["${plural}"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource '${singular}'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["${plural}"][resource_name] = ${singular} + + +@overload +def ${singular}_mutator( + function: Callable[[Bundle, "${class}"], "${class}"], +) -> ResourceMutator["${class}"]: ... + + +@overload +def ${singular}_mutator( + function: Callable[["${class}"], "${class}"], +) -> ResourceMutator["${class}"]: ... + + +def ${singular}_mutator(function: Callable) -> ResourceMutator["${class}"]: + """ + Decorator for defining mutator for ${plural}. Function should return a new instance of the ${singular} + with the desired changes, instead of mutating the input ${singular}. + + Example: + + .. code-block:: python + + @${singular}_mutator + def my_${singular}_mutator(bundle: Bundle, ${singular}: ${class}) -> ${class}: + return replace(${singular}, ...) + + :param function: Function that mutates ${plural}. + """ + from ${model_module} import ${class} + + return ResourceMutator(resource_type=${class}, function=function) diff --git a/python/databricks/bundles/core/__init__.py b/python/databricks/bundles/core/__init__.py index cb0f122ad03..cbf4661aed8 100644 --- a/python/databricks/bundles/core/__init__.py +++ b/python/databricks/bundles/core/__init__.py @@ -33,7 +33,7 @@ Diagnostics, Severity, ) -from databricks.bundles.core._generated._resource_mutators import ( +from databricks.bundles.core._generated import ( alert_mutator, catalog_mutator, job_mutator, diff --git a/python/databricks/bundles/core/_generated/__init__.py b/python/databricks/bundles/core/_generated/__init__.py index 571ca160596..ade9313238c 100644 --- a/python/databricks/bundles/core/_generated/__init__.py +++ b/python/databricks/bundles/core/_generated/__init__.py @@ -1 +1,61 @@ # Code generated by pydabs-codegen. DO NOT EDIT. + +from typing import TYPE_CHECKING + +from databricks.bundles.core._generated.alerts import _AlertResources, alert_mutator +from databricks.bundles.core._generated.catalogs import ( + _CatalogResources, + catalog_mutator, +) +from databricks.bundles.core._generated.jobs import _JobResources, job_mutator +from databricks.bundles.core._generated.pipelines import ( + _PipelineResources, + pipeline_mutator, +) +from databricks.bundles.core._generated.schemas import _SchemaResources, schema_mutator +from databricks.bundles.core._generated.volumes import _VolumeResources, volume_mutator + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + +__all__ = [ + "_GeneratedResources", + "_all_resource_types", + "alert_mutator", + "catalog_mutator", + "job_mutator", + "pipeline_mutator", + "schema_mutator", + "volume_mutator", +] + + +class _GeneratedResources( + _AlertResources, + _CatalogResources, + _JobResources, + _PipelineResources, + _SchemaResources, + _VolumeResources, +): + pass + + +def _all_resource_types() -> "tuple[_ResourceType, ...]": + from databricks.bundles.core._generated import ( + alerts, + catalogs, + jobs, + pipelines, + schemas, + volumes, + ) + + return ( + alerts._resource_type(), + catalogs._resource_type(), + jobs._resource_type(), + pipelines._resource_type(), + schemas._resource_type(), + volumes._resource_type(), + ) diff --git a/python/databricks/bundles/core/_generated/_resource_mutators.py b/python/databricks/bundles/core/_generated/_resource_mutators.py deleted file mode 100644 index 37526b5833f..00000000000 --- a/python/databricks/bundles/core/_generated/_resource_mutators.py +++ /dev/null @@ -1,216 +0,0 @@ -# Code generated by pydabs-codegen. DO NOT EDIT. - -from collections.abc import Callable -from typing import TYPE_CHECKING, overload - -from databricks.bundles.core._bundle import Bundle -from databricks.bundles.core._resource_mutator import ResourceMutator - -if TYPE_CHECKING: - from databricks.bundles.alerts._models.alert import Alert - from databricks.bundles.catalogs._models.catalog import Catalog - from databricks.bundles.jobs._models.job import Job - from databricks.bundles.pipelines._models.pipeline import Pipeline - from databricks.bundles.schemas._models.schema import Schema - from databricks.bundles.volumes._models.volume import Volume - -__all__ = [ - "alert_mutator", - "catalog_mutator", - "job_mutator", - "pipeline_mutator", - "schema_mutator", - "volume_mutator", -] - - -@overload -def alert_mutator( - function: Callable[[Bundle, "Alert"], "Alert"], -) -> ResourceMutator["Alert"]: ... - - -@overload -def alert_mutator( - function: Callable[["Alert"], "Alert"], -) -> ResourceMutator["Alert"]: ... - - -def alert_mutator(function: Callable) -> ResourceMutator["Alert"]: - """ - Decorator for defining mutator for alerts. Function should return a new instance of the alert - with the desired changes, instead of mutating the input alert. - - Example: - - .. code-block:: python - - @alert_mutator - def my_alert_mutator(bundle: Bundle, alert: Alert) -> Alert: - return replace(alert, ...) - - :param function: Function that mutates alerts. - """ - from databricks.bundles.alerts._models.alert import Alert - - return ResourceMutator(resource_type=Alert, function=function) - - -@overload -def catalog_mutator( - function: Callable[[Bundle, "Catalog"], "Catalog"], -) -> ResourceMutator["Catalog"]: ... - - -@overload -def catalog_mutator( - function: Callable[["Catalog"], "Catalog"], -) -> ResourceMutator["Catalog"]: ... - - -def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: - """ - Decorator for defining mutator for catalogs. Function should return a new instance of the catalog - with the desired changes, instead of mutating the input catalog. - - Example: - - .. code-block:: python - - @catalog_mutator - def my_catalog_mutator(bundle: Bundle, catalog: Catalog) -> Catalog: - return replace(catalog, ...) - - :param function: Function that mutates catalogs. - """ - from databricks.bundles.catalogs._models.catalog import Catalog - - return ResourceMutator(resource_type=Catalog, function=function) - - -@overload -def job_mutator( - function: Callable[[Bundle, "Job"], "Job"], -) -> ResourceMutator["Job"]: ... - - -@overload -def job_mutator( - function: Callable[["Job"], "Job"], -) -> ResourceMutator["Job"]: ... - - -def job_mutator(function: Callable) -> ResourceMutator["Job"]: - """ - Decorator for defining mutator for jobs. Function should return a new instance of the job - with the desired changes, instead of mutating the input job. - - Example: - - .. code-block:: python - - @job_mutator - def my_job_mutator(bundle: Bundle, job: Job) -> Job: - return replace(job, ...) - - :param function: Function that mutates jobs. - """ - from databricks.bundles.jobs._models.job import Job - - return ResourceMutator(resource_type=Job, function=function) - - -@overload -def pipeline_mutator( - function: Callable[[Bundle, "Pipeline"], "Pipeline"], -) -> ResourceMutator["Pipeline"]: ... - - -@overload -def pipeline_mutator( - function: Callable[["Pipeline"], "Pipeline"], -) -> ResourceMutator["Pipeline"]: ... - - -def pipeline_mutator(function: Callable) -> ResourceMutator["Pipeline"]: - """ - Decorator for defining mutator for pipelines. Function should return a new instance of the pipeline - with the desired changes, instead of mutating the input pipeline. - - Example: - - .. code-block:: python - - @pipeline_mutator - def my_pipeline_mutator(bundle: Bundle, pipeline: Pipeline) -> Pipeline: - return replace(pipeline, ...) - - :param function: Function that mutates pipelines. - """ - from databricks.bundles.pipelines._models.pipeline import Pipeline - - return ResourceMutator(resource_type=Pipeline, function=function) - - -@overload -def schema_mutator( - function: Callable[[Bundle, "Schema"], "Schema"], -) -> ResourceMutator["Schema"]: ... - - -@overload -def schema_mutator( - function: Callable[["Schema"], "Schema"], -) -> ResourceMutator["Schema"]: ... - - -def schema_mutator(function: Callable) -> ResourceMutator["Schema"]: - """ - Decorator for defining mutator for schemas. Function should return a new instance of the schema - with the desired changes, instead of mutating the input schema. - - Example: - - .. code-block:: python - - @schema_mutator - def my_schema_mutator(bundle: Bundle, schema: Schema) -> Schema: - return replace(schema, ...) - - :param function: Function that mutates schemas. - """ - from databricks.bundles.schemas._models.schema import Schema - - return ResourceMutator(resource_type=Schema, function=function) - - -@overload -def volume_mutator( - function: Callable[[Bundle, "Volume"], "Volume"], -) -> ResourceMutator["Volume"]: ... - - -@overload -def volume_mutator( - function: Callable[["Volume"], "Volume"], -) -> ResourceMutator["Volume"]: ... - - -def volume_mutator(function: Callable) -> ResourceMutator["Volume"]: - """ - Decorator for defining mutator for volumes. Function should return a new instance of the volume - with the desired changes, instead of mutating the input volume. - - Example: - - .. code-block:: python - - @volume_mutator - def my_volume_mutator(bundle: Bundle, volume: Volume) -> Volume: - return replace(volume, ...) - - :param function: Function that mutates volumes. - """ - from databricks.bundles.volumes._models.volume import Volume - - return ResourceMutator(resource_type=Volume, function=function) diff --git a/python/databricks/bundles/core/_generated/_resource_types.py b/python/databricks/bundles/core/_generated/_resource_types.py deleted file mode 100644 index 614600d1d39..00000000000 --- a/python/databricks/bundles/core/_generated/_resource_types.py +++ /dev/null @@ -1,51 +0,0 @@ -# Code generated by pydabs-codegen. DO NOT EDIT. - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from databricks.bundles.core._resource_type import _ResourceType - - -def _all_resource_types() -> "tuple[_ResourceType, ...]": - # Lazily import resource types so that databricks.bundles.core is not - # imported from databricks.bundles.. - from databricks.bundles.alerts._models.alert import Alert - from databricks.bundles.catalogs._models.catalog import Catalog - from databricks.bundles.core._resource_type import _ResourceType - from databricks.bundles.jobs._models.job import Job - from databricks.bundles.pipelines._models.pipeline import Pipeline - from databricks.bundles.schemas._models.schema import Schema - from databricks.bundles.volumes._models.volume import Volume - - return ( - _ResourceType( - resource_type=Alert, - singular_name="alert", - plural_name="alerts", - ), - _ResourceType( - resource_type=Catalog, - singular_name="catalog", - plural_name="catalogs", - ), - _ResourceType( - resource_type=Job, - singular_name="job", - plural_name="jobs", - ), - _ResourceType( - resource_type=Pipeline, - singular_name="pipeline", - plural_name="pipelines", - ), - _ResourceType( - resource_type=Schema, - singular_name="schema", - plural_name="schemas", - ), - _ResourceType( - resource_type=Volume, - singular_name="volume", - plural_name="volumes", - ), - ) diff --git a/python/databricks/bundles/core/_generated/_resources.py b/python/databricks/bundles/core/_generated/_resources.py deleted file mode 100644 index 40f36b50705..00000000000 --- a/python/databricks/bundles/core/_generated/_resources.py +++ /dev/null @@ -1,255 +0,0 @@ -# Code generated by pydabs-codegen. DO NOT EDIT. - -from typing import TYPE_CHECKING, Optional - -from databricks.bundles.core._location import Location -from databricks.bundles.core._transform import _transform - -if TYPE_CHECKING: - from databricks.bundles.alerts._models.alert import Alert, AlertParam - from databricks.bundles.catalogs._models.catalog import Catalog, CatalogParam - from databricks.bundles.jobs._models.job import Job, JobParam - from databricks.bundles.pipelines._models.pipeline import Pipeline, PipelineParam - from databricks.bundles.schemas._models.schema import Schema, SchemaParam - from databricks.bundles.volumes._models.volume import Volume, VolumeParam - -__all__ = ["_GeneratedResources"] - - -class _GeneratedResources: - """ - Generated per-resource accessors and add_* methods, mixed into Resources. - """ - - # Provided by the Resources subclass; declared here so the generated methods - # below type-check. - _resources: dict[str, dict] - - if TYPE_CHECKING: - - def add_location(self, path: tuple[str, ...], location: Location) -> None: ... - - def add_diagnostic_error( - self, - msg: str, - *, - detail: Optional[str] = None, - path: Optional[tuple[str, ...]] = None, - location: Optional[Location] = None, - ) -> None: ... - - @property - def alerts(self) -> dict[str, "Alert"]: - return self._resources["alerts"] - - @property - def catalogs(self) -> dict[str, "Catalog"]: - return self._resources["catalogs"] - - @property - def jobs(self) -> dict[str, "Job"]: - return self._resources["jobs"] - - @property - def pipelines(self) -> dict[str, "Pipeline"]: - return self._resources["pipelines"] - - @property - def schemas(self) -> dict[str, "Schema"]: - return self._resources["schemas"] - - @property - def volumes(self) -> dict[str, "Volume"]: - return self._resources["volumes"] - - def add_alert( - self, - resource_name: str, - alert: "AlertParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource alert to the collection of resources. Resource name must be unique across all alerts. - - :param resource_name: unique identifier for the alert - :param alert: the alert to add, can be Alert or dict - :param location: optional location of the alert in the source code - """ - from databricks.bundles.alerts._models.alert import Alert - - alert = _transform(Alert, alert) - path = ("resources", "alerts", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["alerts"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'alert'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["alerts"][resource_name] = alert - - def add_catalog( - self, - resource_name: str, - catalog: "CatalogParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource catalog to the collection of resources. Resource name must be unique across all catalogs. - - :param resource_name: unique identifier for the catalog - :param catalog: the catalog to add, can be Catalog or dict - :param location: optional location of the catalog in the source code - """ - from databricks.bundles.catalogs._models.catalog import Catalog - - catalog = _transform(Catalog, catalog) - path = ("resources", "catalogs", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["catalogs"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'catalog'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["catalogs"][resource_name] = catalog - - def add_job( - self, - resource_name: str, - job: "JobParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource job to the collection of resources. Resource name must be unique across all jobs. - - :param resource_name: unique identifier for the job - :param job: the job to add, can be Job or dict - :param location: optional location of the job in the source code - """ - from databricks.bundles.jobs._models.job import Job - - job = _transform(Job, job) - path = ("resources", "jobs", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["jobs"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'job'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["jobs"][resource_name] = job - - def add_pipeline( - self, - resource_name: str, - pipeline: "PipelineParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource pipeline to the collection of resources. Resource name must be unique across all pipelines. - - :param resource_name: unique identifier for the pipeline - :param pipeline: the pipeline to add, can be Pipeline or dict - :param location: optional location of the pipeline in the source code - """ - from databricks.bundles.pipelines._models.pipeline import Pipeline - - pipeline = _transform(Pipeline, pipeline) - path = ("resources", "pipelines", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["pipelines"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'pipeline'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["pipelines"][resource_name] = pipeline - - def add_schema( - self, - resource_name: str, - schema: "SchemaParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource schema to the collection of resources. Resource name must be unique across all schemas. - - :param resource_name: unique identifier for the schema - :param schema: the schema to add, can be Schema or dict - :param location: optional location of the schema in the source code - """ - from databricks.bundles.schemas._models.schema import Schema - - schema = _transform(Schema, schema) - path = ("resources", "schemas", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["schemas"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'schema'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["schemas"][resource_name] = schema - - def add_volume( - self, - resource_name: str, - volume: "VolumeParam", - *, - location: Optional[Location] = None, - ) -> None: - """ - Adds the resource volume to the collection of resources. Resource name must be unique across all volumes. - - :param resource_name: unique identifier for the volume - :param volume: the volume to add, can be Volume or dict - :param location: optional location of the volume in the source code - """ - from databricks.bundles.volumes._models.volume import Volume - - volume = _transform(Volume, volume) - path = ("resources", "volumes", resource_name) - location = location or Location.from_stack_frame(depth=1) - - if self._resources["volumes"].get(resource_name): - self.add_diagnostic_error( - msg=f"Duplicate resource name '{resource_name}' for resource 'volume'. Resource names must be unique.", - location=location, - path=path, - ) - else: - if location: - self.add_location(path, location) - - self._resources["volumes"][resource_name] = volume diff --git a/python/databricks/bundles/core/_generated/alerts.py b/python/databricks/bundles/core/_generated/alerts.py new file mode 100644 index 00000000000..94e4af9a136 --- /dev/null +++ b/python/databricks/bundles/core/_generated/alerts.py @@ -0,0 +1,115 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.alerts._models.alert import Alert, AlertParam + from databricks.bundles.core._resource_type import _ResourceType + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.alerts._models.alert import Alert + from databricks.bundles.core._resource_type import _ResourceType + + return _ResourceType( + resource_type=Alert, + singular_name="alert", + plural_name="alerts", + ) + + +class _AlertResources: + """ + Generated alert accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def alerts(self) -> dict[str, "Alert"]: + return self._resources["alerts"] + + def add_alert( + self, + resource_name: str, + alert: "AlertParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource alert to the collection of resources. Resource name must be unique across all alerts. + + :param resource_name: unique identifier for the alert + :param alert: the alert to add, can be Alert or dict + :param location: optional location of the alert in the source code + """ + from databricks.bundles.alerts._models.alert import Alert + + alert = _transform(Alert, alert) + path = ("resources", "alerts", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["alerts"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'alert'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["alerts"][resource_name] = alert + + +@overload +def alert_mutator( + function: Callable[[Bundle, "Alert"], "Alert"], +) -> ResourceMutator["Alert"]: ... + + +@overload +def alert_mutator( + function: Callable[["Alert"], "Alert"], +) -> ResourceMutator["Alert"]: ... + + +def alert_mutator(function: Callable) -> ResourceMutator["Alert"]: + """ + Decorator for defining mutator for alerts. Function should return a new instance of the alert + with the desired changes, instead of mutating the input alert. + + Example: + + .. code-block:: python + + @alert_mutator + def my_alert_mutator(bundle: Bundle, alert: Alert) -> Alert: + return replace(alert, ...) + + :param function: Function that mutates alerts. + """ + from databricks.bundles.alerts._models.alert import Alert + + return ResourceMutator(resource_type=Alert, function=function) diff --git a/python/databricks/bundles/core/_generated/catalogs.py b/python/databricks/bundles/core/_generated/catalogs.py new file mode 100644 index 00000000000..55d6bbcd310 --- /dev/null +++ b/python/databricks/bundles/core/_generated/catalogs.py @@ -0,0 +1,115 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.catalogs._models.catalog import Catalog, CatalogParam + from databricks.bundles.core._resource_type import _ResourceType + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.catalogs._models.catalog import Catalog + from databricks.bundles.core._resource_type import _ResourceType + + return _ResourceType( + resource_type=Catalog, + singular_name="catalog", + plural_name="catalogs", + ) + + +class _CatalogResources: + """ + Generated catalog accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def catalogs(self) -> dict[str, "Catalog"]: + return self._resources["catalogs"] + + def add_catalog( + self, + resource_name: str, + catalog: "CatalogParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource catalog to the collection of resources. Resource name must be unique across all catalogs. + + :param resource_name: unique identifier for the catalog + :param catalog: the catalog to add, can be Catalog or dict + :param location: optional location of the catalog in the source code + """ + from databricks.bundles.catalogs._models.catalog import Catalog + + catalog = _transform(Catalog, catalog) + path = ("resources", "catalogs", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["catalogs"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'catalog'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["catalogs"][resource_name] = catalog + + +@overload +def catalog_mutator( + function: Callable[[Bundle, "Catalog"], "Catalog"], +) -> ResourceMutator["Catalog"]: ... + + +@overload +def catalog_mutator( + function: Callable[["Catalog"], "Catalog"], +) -> ResourceMutator["Catalog"]: ... + + +def catalog_mutator(function: Callable) -> ResourceMutator["Catalog"]: + """ + Decorator for defining mutator for catalogs. Function should return a new instance of the catalog + with the desired changes, instead of mutating the input catalog. + + Example: + + .. code-block:: python + + @catalog_mutator + def my_catalog_mutator(bundle: Bundle, catalog: Catalog) -> Catalog: + return replace(catalog, ...) + + :param function: Function that mutates catalogs. + """ + from databricks.bundles.catalogs._models.catalog import Catalog + + return ResourceMutator(resource_type=Catalog, function=function) diff --git a/python/databricks/bundles/core/_generated/jobs.py b/python/databricks/bundles/core/_generated/jobs.py new file mode 100644 index 00000000000..8653c55055d --- /dev/null +++ b/python/databricks/bundles/core/_generated/jobs.py @@ -0,0 +1,115 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.jobs._models.job import Job, JobParam + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.jobs._models.job import Job + + return _ResourceType( + resource_type=Job, + singular_name="job", + plural_name="jobs", + ) + + +class _JobResources: + """ + Generated job accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def jobs(self) -> dict[str, "Job"]: + return self._resources["jobs"] + + def add_job( + self, + resource_name: str, + job: "JobParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource job to the collection of resources. Resource name must be unique across all jobs. + + :param resource_name: unique identifier for the job + :param job: the job to add, can be Job or dict + :param location: optional location of the job in the source code + """ + from databricks.bundles.jobs._models.job import Job + + job = _transform(Job, job) + path = ("resources", "jobs", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["jobs"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'job'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["jobs"][resource_name] = job + + +@overload +def job_mutator( + function: Callable[[Bundle, "Job"], "Job"], +) -> ResourceMutator["Job"]: ... + + +@overload +def job_mutator( + function: Callable[["Job"], "Job"], +) -> ResourceMutator["Job"]: ... + + +def job_mutator(function: Callable) -> ResourceMutator["Job"]: + """ + Decorator for defining mutator for jobs. Function should return a new instance of the job + with the desired changes, instead of mutating the input job. + + Example: + + .. code-block:: python + + @job_mutator + def my_job_mutator(bundle: Bundle, job: Job) -> Job: + return replace(job, ...) + + :param function: Function that mutates jobs. + """ + from databricks.bundles.jobs._models.job import Job + + return ResourceMutator(resource_type=Job, function=function) diff --git a/python/databricks/bundles/core/_generated/pipelines.py b/python/databricks/bundles/core/_generated/pipelines.py new file mode 100644 index 00000000000..961070a6e4b --- /dev/null +++ b/python/databricks/bundles/core/_generated/pipelines.py @@ -0,0 +1,115 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.pipelines._models.pipeline import Pipeline, PipelineParam + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.pipelines._models.pipeline import Pipeline + + return _ResourceType( + resource_type=Pipeline, + singular_name="pipeline", + plural_name="pipelines", + ) + + +class _PipelineResources: + """ + Generated pipeline accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def pipelines(self) -> dict[str, "Pipeline"]: + return self._resources["pipelines"] + + def add_pipeline( + self, + resource_name: str, + pipeline: "PipelineParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource pipeline to the collection of resources. Resource name must be unique across all pipelines. + + :param resource_name: unique identifier for the pipeline + :param pipeline: the pipeline to add, can be Pipeline or dict + :param location: optional location of the pipeline in the source code + """ + from databricks.bundles.pipelines._models.pipeline import Pipeline + + pipeline = _transform(Pipeline, pipeline) + path = ("resources", "pipelines", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["pipelines"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'pipeline'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["pipelines"][resource_name] = pipeline + + +@overload +def pipeline_mutator( + function: Callable[[Bundle, "Pipeline"], "Pipeline"], +) -> ResourceMutator["Pipeline"]: ... + + +@overload +def pipeline_mutator( + function: Callable[["Pipeline"], "Pipeline"], +) -> ResourceMutator["Pipeline"]: ... + + +def pipeline_mutator(function: Callable) -> ResourceMutator["Pipeline"]: + """ + Decorator for defining mutator for pipelines. Function should return a new instance of the pipeline + with the desired changes, instead of mutating the input pipeline. + + Example: + + .. code-block:: python + + @pipeline_mutator + def my_pipeline_mutator(bundle: Bundle, pipeline: Pipeline) -> Pipeline: + return replace(pipeline, ...) + + :param function: Function that mutates pipelines. + """ + from databricks.bundles.pipelines._models.pipeline import Pipeline + + return ResourceMutator(resource_type=Pipeline, function=function) diff --git a/python/databricks/bundles/core/_generated/schemas.py b/python/databricks/bundles/core/_generated/schemas.py new file mode 100644 index 00000000000..e83fe02c415 --- /dev/null +++ b/python/databricks/bundles/core/_generated/schemas.py @@ -0,0 +1,115 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.schemas._models.schema import Schema, SchemaParam + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.schemas._models.schema import Schema + + return _ResourceType( + resource_type=Schema, + singular_name="schema", + plural_name="schemas", + ) + + +class _SchemaResources: + """ + Generated schema accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def schemas(self) -> dict[str, "Schema"]: + return self._resources["schemas"] + + def add_schema( + self, + resource_name: str, + schema: "SchemaParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource schema to the collection of resources. Resource name must be unique across all schemas. + + :param resource_name: unique identifier for the schema + :param schema: the schema to add, can be Schema or dict + :param location: optional location of the schema in the source code + """ + from databricks.bundles.schemas._models.schema import Schema + + schema = _transform(Schema, schema) + path = ("resources", "schemas", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["schemas"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'schema'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["schemas"][resource_name] = schema + + +@overload +def schema_mutator( + function: Callable[[Bundle, "Schema"], "Schema"], +) -> ResourceMutator["Schema"]: ... + + +@overload +def schema_mutator( + function: Callable[["Schema"], "Schema"], +) -> ResourceMutator["Schema"]: ... + + +def schema_mutator(function: Callable) -> ResourceMutator["Schema"]: + """ + Decorator for defining mutator for schemas. Function should return a new instance of the schema + with the desired changes, instead of mutating the input schema. + + Example: + + .. code-block:: python + + @schema_mutator + def my_schema_mutator(bundle: Bundle, schema: Schema) -> Schema: + return replace(schema, ...) + + :param function: Function that mutates schemas. + """ + from databricks.bundles.schemas._models.schema import Schema + + return ResourceMutator(resource_type=Schema, function=function) diff --git a/python/databricks/bundles/core/_generated/volumes.py b/python/databricks/bundles/core/_generated/volumes.py new file mode 100644 index 00000000000..fe56e45ce30 --- /dev/null +++ b/python/databricks/bundles/core/_generated/volumes.py @@ -0,0 +1,115 @@ +# Code generated by pydabs-codegen. DO NOT EDIT. + +from collections.abc import Callable +from typing import TYPE_CHECKING, Optional, overload + +from databricks.bundles.core._bundle import Bundle +from databricks.bundles.core._location import Location +from databricks.bundles.core._resource_mutator import ResourceMutator +from databricks.bundles.core._transform import _transform + +if TYPE_CHECKING: + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.volumes._models.volume import Volume, VolumeParam + + +def _resource_type() -> "_ResourceType": + from databricks.bundles.core._resource_type import _ResourceType + from databricks.bundles.volumes._models.volume import Volume + + return _ResourceType( + resource_type=Volume, + singular_name="volume", + plural_name="volumes", + ) + + +class _VolumeResources: + """ + Generated volume accessors, mixed into Resources. + """ + + # Provided by the Resources subclass; declared here so the generated methods + # below type-check. + _resources: dict[str, dict] + + if TYPE_CHECKING: + + def add_location(self, path: tuple[str, ...], location: Location) -> None: ... + + def add_diagnostic_error( + self, + msg: str, + *, + detail: Optional[str] = None, + path: Optional[tuple[str, ...]] = None, + location: Optional[Location] = None, + ) -> None: ... + + @property + def volumes(self) -> dict[str, "Volume"]: + return self._resources["volumes"] + + def add_volume( + self, + resource_name: str, + volume: "VolumeParam", + *, + location: Optional[Location] = None, + ) -> None: + """ + Adds the resource volume to the collection of resources. Resource name must be unique across all volumes. + + :param resource_name: unique identifier for the volume + :param volume: the volume to add, can be Volume or dict + :param location: optional location of the volume in the source code + """ + from databricks.bundles.volumes._models.volume import Volume + + volume = _transform(Volume, volume) + path = ("resources", "volumes", resource_name) + location = location or Location.from_stack_frame(depth=1) + + if self._resources["volumes"].get(resource_name): + self.add_diagnostic_error( + msg=f"Duplicate resource name '{resource_name}' for resource 'volume'. Resource names must be unique.", + location=location, + path=path, + ) + else: + if location: + self.add_location(path, location) + + self._resources["volumes"][resource_name] = volume + + +@overload +def volume_mutator( + function: Callable[[Bundle, "Volume"], "Volume"], +) -> ResourceMutator["Volume"]: ... + + +@overload +def volume_mutator( + function: Callable[["Volume"], "Volume"], +) -> ResourceMutator["Volume"]: ... + + +def volume_mutator(function: Callable) -> ResourceMutator["Volume"]: + """ + Decorator for defining mutator for volumes. Function should return a new instance of the volume + with the desired changes, instead of mutating the input volume. + + Example: + + .. code-block:: python + + @volume_mutator + def my_volume_mutator(bundle: Bundle, volume: Volume) -> Volume: + return replace(volume, ...) + + :param function: Function that mutates volumes. + """ + from databricks.bundles.volumes._models.volume import Volume + + return ResourceMutator(resource_type=Volume, function=function) diff --git a/python/databricks/bundles/core/_resource_type.py b/python/databricks/bundles/core/_resource_type.py index 021ac4824ef..53fd17c169b 100644 --- a/python/databricks/bundles/core/_resource_type.py +++ b/python/databricks/bundles/core/_resource_type.py @@ -27,8 +27,6 @@ def all(cls) -> tuple["_ResourceType", ...]: """ Returns all supported resource types. """ - from databricks.bundles.core._generated._resource_types import ( - _all_resource_types, - ) + from databricks.bundles.core._generated import _all_resource_types return _all_resource_types() diff --git a/python/databricks/bundles/core/_resources.py b/python/databricks/bundles/core/_resources.py index cc4c57f0ec3..6818031596c 100644 --- a/python/databricks/bundles/core/_resources.py +++ b/python/databricks/bundles/core/_resources.py @@ -1,7 +1,7 @@ from typing import Optional from databricks.bundles.core._diagnostics import Diagnostics -from databricks.bundles.core._generated._resources import _GeneratedResources +from databricks.bundles.core._generated import _GeneratedResources from databricks.bundles.core._location import Location from databricks.bundles.core._resource import Resource from databricks.bundles.core._resource_type import _ResourceType