diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 491321a48c..8a36fdbccf 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -8,6 +8,7 @@ * Skip non-exportable objects (e.g., `MLFLOW_EXPERIMENT`) during `workspace export-dir` instead of failing ([#4081](https://github.com/databricks/cli/issues/4081)) ### Bundles +* Add `ipykernel` to the `default` template to enable Databricks Connect notebooks in Cursor/VS Code ([#4164](https://github.com/databricks/cli/pull/4164)) ### Dependency updates diff --git a/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml b/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml index ffa9337ef4..aabcdf57d3 100644 --- a/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml +++ b/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml @@ -16,6 +16,7 @@ dev = [ "pytest", "databricks-dlt", "databricks-connect>=15.4,<15.5", + "ipykernel", ] [project.scripts] diff --git a/acceptance/bundle/templates/default-python/classic/output/my_default_python/tests/conftest.py b/acceptance/bundle/templates/default-python/classic/output/my_default_python/tests/conftest.py index 4df274fd43..72ebfeb566 100644 --- a/acceptance/bundle/templates/default-python/classic/output/my_default_python/tests/conftest.py +++ b/acceptance/bundle/templates/default-python/classic/output/my_default_python/tests/conftest.py @@ -1,8 +1,4 @@ -"""This file configures pytest. - -This file is in the root since it can be used for tests in any place in this -project, including tests under resources/. -""" +"""This file configures pytest, initializes Databricks Connect, and provides fixtures for Spark and loading test data.""" import os, sys, pathlib from contextlib import contextmanager diff --git a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml index ffa9337ef4..aabcdf57d3 100644 --- a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml +++ b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml @@ -16,6 +16,7 @@ dev = [ "pytest", "databricks-dlt", "databricks-connect>=15.4,<15.5", + "ipykernel", ] [project.scripts] diff --git a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/tests/conftest.py b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/tests/conftest.py index 4df274fd43..72ebfeb566 100644 --- a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/tests/conftest.py +++ b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/tests/conftest.py @@ -1,8 +1,4 @@ -"""This file configures pytest. - -This file is in the root since it can be used for tests in any place in this -project, including tests under resources/. -""" +"""This file configures pytest, initializes Databricks Connect, and provides fixtures for Spark and loading test data.""" import os, sys, pathlib from contextlib import contextmanager diff --git a/acceptance/bundle/templates/lakeflow-pipelines/python/output/my_lakeflow_pipelines/pyproject.toml b/acceptance/bundle/templates/lakeflow-pipelines/python/output/my_lakeflow_pipelines/pyproject.toml index 80c75ecd3d..f374167ec7 100644 --- a/acceptance/bundle/templates/lakeflow-pipelines/python/output/my_lakeflow_pipelines/pyproject.toml +++ b/acceptance/bundle/templates/lakeflow-pipelines/python/output/my_lakeflow_pipelines/pyproject.toml @@ -16,6 +16,7 @@ dev = [ "pytest", "databricks-dlt", "databricks-connect>=15.4,<15.5", + "ipykernel", ] [project.scripts] diff --git a/acceptance/bundle/templates/pydabs/init-classic/output/my_pydabs/pyproject.toml b/acceptance/bundle/templates/pydabs/init-classic/output/my_pydabs/pyproject.toml index 070a22c735..61378bd72c 100644 --- a/acceptance/bundle/templates/pydabs/init-classic/output/my_pydabs/pyproject.toml +++ b/acceptance/bundle/templates/pydabs/init-classic/output/my_pydabs/pyproject.toml @@ -16,6 +16,7 @@ dev = [ "pytest", "databricks-dlt", "databricks-connect>=15.4,<15.5", + "ipykernel", "databricks-bundles==x.y.z", ] diff --git a/libs/template/templates/default/template/{{.project_name}}/pyproject.toml.tmpl b/libs/template/templates/default/template/{{.project_name}}/pyproject.toml.tmpl index 9e60f44d1e..2b1bcc88d3 100644 --- a/libs/template/templates/default/template/{{.project_name}}/pyproject.toml.tmpl +++ b/libs/template/templates/default/template/{{.project_name}}/pyproject.toml.tmpl @@ -16,6 +16,7 @@ dev = [ "pytest", "databricks-dlt", "databricks-connect{{template "conservative_db_connect_version_spec"}}", + "ipykernel", {{- if eq .enable_pydabs "yes" }} "databricks-bundles=={{template "latest_databricks_bundles_version"}}", {{- end }} diff --git a/libs/template/templates/default/template/{{.project_name}}/tests/conftest.py b/libs/template/templates/default/template/{{.project_name}}/tests/conftest.py index 4df274fd43..72ebfeb566 100644 --- a/libs/template/templates/default/template/{{.project_name}}/tests/conftest.py +++ b/libs/template/templates/default/template/{{.project_name}}/tests/conftest.py @@ -1,8 +1,4 @@ -"""This file configures pytest. - -This file is in the root since it can be used for tests in any place in this -project, including tests under resources/. -""" +"""This file configures pytest, initializes Databricks Connect, and provides fixtures for Spark and loading test data.""" import os, sys, pathlib from contextlib import contextmanager