Skip to content

Commit 43bea62

Browse files
authored
Add pydabs template (#3806)
## Changes Add the pydabs template as a specialized version of the `default-python` template. The template is hidden until we move "python" outside of "experimental". ## Why We want to have a separate template for the full Python version of the default-python template. ## Tests Existing acceptance tests and unit tests for additional templating features
1 parent 0ea8d98 commit 43bea62

File tree

15 files changed

+90
-20
lines changed

15 files changed

+90
-20
lines changed

acceptance/bundle/templates/pydabs/check-consistency/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== Collecting resources into ./enable_pydabs=yes
22

3-
>>> [CLI] bundle init default-python --config-file ./input.json
3+
>>> [CLI] bundle init pydabs --config-file ./input.json
44

55
Welcome to the default Python template for Databricks Asset Bundles!
66
Workspace to use (auto-detected, edit in 'my_pydabs/databricks.yml'): [DATABRICKS_URL]
@@ -17,7 +17,7 @@ See also the documentation at https://docs.databricks.com/dev-tools/bundles/inde
1717
>>> [CLI] bundle validate --output json
1818
== Collecting resources into ./enable_pydabs=no
1919

20-
>>> [CLI] bundle init default-python --config-file ./input.json
20+
>>> [CLI] bundle init pydabs --config-file ./input.json
2121

2222
Welcome to the default Python template for Databricks Asset Bundles!
2323
Workspace to use (auto-detected, edit in 'my_pydabs/databricks.yml'): [DATABRICKS_URL]

acceptance/bundle/templates/pydabs/check-consistency/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ for enable_pydabs in yes no; do
33

44
enable_pydabs=$enable_pydabs envsubst < input.json.tmpl > input.json
55

6-
trace $CLI bundle init default-python --config-file ./input.json
6+
trace $CLI bundle init pydabs --config-file ./input.json
77

88
(
99
cd my_pydabs

acceptance/bundle/templates/pydabs/check-formatting/input.json.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"include_notebook": "$INCLUDE_NOTEBOOK",
44
"include_dlt": "$INCLUDE_DLT",
55
"include_python": "$INCLUDE_PYTHON",
6-
"enable_pydabs": "yes",
76
"serverless": "$SERVERLESS"
87
}

acceptance/bundle/templates/pydabs/check-formatting/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
>>> [CLI] bundle init default-python --config-file ./input.json
2+
>>> [CLI] bundle init pydabs --config-file ./input.json
33

44
Welcome to the default Python template for Databricks Asset Bundles!
55
Workspace to use (auto-detected, edit in 'my_pydabs/databricks.yml'): [DATABRICKS_URL]

acceptance/bundle/templates/pydabs/check-formatting/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
envsubst < input.json.tmpl > input.json
22

3-
trace $CLI bundle init default-python --config-file ./input.json
3+
trace $CLI bundle init pydabs --config-file ./input.json
44

55
# only keep relevant files for snapshots
66
trace find my_pydabs -mindepth 1 ! -name 'pyproject.toml' ! -regex '.*/resources.*' -delete

acceptance/bundle/templates/pydabs/deploy-classic/input.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"include_notebook": "yes",
44
"include_dlt": "yes",
55
"include_python": "yes",
6-
"serverless": "no",
7-
"enable_pydabs": "yes"
6+
"serverless": "no"
87
}

acceptance/bundle/templates/pydabs/deploy-classic/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
>>> [CLI] bundle init default-python --config-file ./input.json
2+
>>> [CLI] bundle init pydabs --config-file ./input.json
33

44
Welcome to the default Python template for Databricks Asset Bundles!
55
Workspace to use (auto-detected, edit in 'my_pydabs/databricks.yml'): [DATABRICKS_URL]

acceptance/bundle/templates/pydabs/deploy-classic/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
trace $CLI bundle init default-python --config-file ./input.json
1+
trace $CLI bundle init pydabs --config-file ./input.json
22

33
(
44
cd my_pydabs

acceptance/bundle/templates/pydabs/init-classic/input.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"include_notebook": "yes",
44
"include_dlt": "yes",
55
"include_python": "yes",
6-
"serverless": "no",
7-
"enable_pydabs": "yes"
6+
"serverless": "no"
87
}

acceptance/bundle/templates/pydabs/init-classic/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
>>> [CLI] bundle init default-python --config-file ./input.json --output-dir output
2+
>>> [CLI] bundle init pydabs --config-file ./input.json --output-dir output
33

44
Welcome to the default Python template for Databricks Asset Bundles!
55
Workspace to use (auto-detected, edit in 'my_pydabs/databricks.yml'): [DATABRICKS_URL]

0 commit comments

Comments
 (0)