Skip to content

Commit 251596d

Browse files
committed
Update tests
1 parent a0b0f66 commit 251596d

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Workspace to use (auto-detected, edit in 'my_pydabs/databricks.yml'): [DATABRICK
99
Please refer to the README.md file for "getting started" instructions.
1010
See also the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
1111

12-
>>> find output/my_pydabs -mindepth 1 ! -name pyproject.toml ! -regex .*/resources.* -delete
12+
>>> find output/my_pydabs -mindepth 1 ! -name databricks.yml ! -name pyproject.toml ! -regex .*/resources.* -delete
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This is a Databricks asset bundle definition for my_pydabs.
2+
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
3+
bundle:
4+
name: my_pydabs
5+
uuid: [UUID]
6+
7+
python:
8+
# Activate virtual environment before loading resources defined in Python.
9+
# If disabled, defaults to using the Python interpreter available in the current shell.
10+
venv_path: .venv
11+
# Functions called to load resources defined in Python. See resources/__init__.py
12+
resources:
13+
- "resources:load_resources"
14+
15+
artifacts:
16+
python_artifact:
17+
type: whl
18+
build: uv build --wheel
19+
20+
include:
21+
- resources/*.yml
22+
- resources/*/*.yml
23+
24+
targets:
25+
dev:
26+
# The default target uses 'mode: development' to create a development copy.
27+
# - Deployed resources get prefixed with '[dev my_user_name]'
28+
# - Any job schedules and triggers are paused by default.
29+
# See also https://docs.databricks.com/dev-tools/bundles/deployment-modes.html.
30+
mode: development
31+
default: true
32+
workspace:
33+
host: [DATABRICKS_URL]
34+
35+
presets:
36+
# Set dynamic_version: true on all artifacts of type "whl".
37+
# This makes "bundle deploy" add a timestamp to wheel's version before uploading,
38+
# new wheel takes over the previous installation even if actual wheel version is unchanged.
39+
# See https://docs.databricks.com/aws/en/dev-tools/bundles/settings
40+
artifacts_dynamic_version: true
41+
42+
prod:
43+
mode: production
44+
workspace:
45+
host: [DATABRICKS_URL]
46+
# We explicitly deploy to /Workspace/Users/[USERNAME] to make sure we only have a single copy.
47+
root_path: /Workspace/Users/[USERNAME]/.bundle/${bundle.name}/${bundle.target}
48+
permissions:
49+
- user_name: [USERNAME]
50+
level: CAN_MANAGE
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
trace $CLI bundle init pydabs --config-file ./input.json --output-dir output
22

33
# only keep relevant files for snapshots
4-
trace find output/my_pydabs -mindepth 1 ! -name 'pyproject.toml' ! -regex '.*/resources.*' -delete
4+
trace find output/my_pydabs -mindepth 1 ! -name 'databricks.yml' ! -name 'pyproject.toml' ! -regex '.*/resources.*' -delete

libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ bundle:
77
name: {{.project_name}}
88
uuid: {{bundle_uuid}}
99
{{- if $with_pydabs }}
10+
1011
python:
1112
# Activate virtual environment before loading resources defined in Python.
1213
# If disabled, defaults to using the Python interpreter available in the current shell.

0 commit comments

Comments
 (0)