Skip to content

Add default-minimal template - #3885

Merged
lennartkats-db merged 6 commits into
mainfrom
add-default-minimal-template
Nov 10, 2025
Merged

Add default-minimal template#3885
lennartkats-db merged 6 commits into
mainfrom
add-default-minimal-template

Conversation

@lennartkats-db

Copy link
Copy Markdown
Contributor

Changes

Adds a new default-minimal template for advanced users who want a clean slate without sample code:

  • Added default-minimal which inherits from the default template, just like default-python
  • Enhanced template renderer to preserve empty directories (necessary to avoid .gitkeep files in src/ and resources/)
  • Fixed uv run pytest error shown for projects that don't have a src/<package> directory

Why

Advanced customers and non-ETL customers (like @fjakobs) indicated they want an "empty" or "minimal" project template where they don't need to delete sample code. Rather than answering "no" to all questions in default-python, this gives them something more intentional.

Tests

  • Template acceptance tests
  • Manual uv run pytest, databricks bundle deploy, databricks bundle run on generated project

Example:

$ databricks bundle init default-minimal
Welcome to the minimal Databricks Asset Bundle template!
This template creates a minimal project structure without sample code, ideal for advanced users.
(For getting started with Python or SQL code, use the default-python or default-sql templates instead.)
Your workspace at https://e2-dogfood.staging.cloud.databricks.com is used for initialization.
(See https://docs.databricks.com/dev-tools/cli/profiles.html for how to change your profile.)
Unique name for this project [my_project]: empty
Default catalog for any tables created by this project [main]:
Use a personal schema for each user working on this project.
(This is recommended. Your personal schema will be 'main.lennart_kats'.): yes
✨ Your new project has been created in the 'empty' directory!
To get started, refer to the project README.md file and the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
$ find empty
empty
empty/resources
empty/pyproject.toml
empty/tests
empty/tests/conftest.py
empty/README.md
empty/.gitignore
empty/fixtures
empty/fixtures/.gitkeep
empty/.vscode
empty/.vscode/__builtins__.pyi
empty/.vscode/settings.json
empty/.vscode/extensions.json
empty/databricks.yml
empty/src

lennartkats-dband others added 3 commits November 5, 2025 09:27
- Add minimal template positioned after default-sql in CLI selection
- Provides only essential infrastructure: databricks.yml, pyproject.toml,
README, empty src/ and resources/ directories, and basic test setup
- Welcome message emphasizes this is for advanced users and recommends
default-python/default-sql for those getting started
- Template reuses default template structure via "template_dir": "../default"
- Equivalent to default-python when answering "no" to all sample content prompts
- Renderer improvements: preserve empty directories without needing .gitkeep files
Users need a clean starting point for building bundles from scratch without
sample code getting in the way. Advanced users know what they want to build
and don't need the training wheels of sample notebooks and pipelines.
- All template acceptance tests pass, including new default-minimal tests
- Verified template instantiation creates correct directory structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updates the default-minimal template to be fully consistent with the
default-python template structure:
- Remove project_name_short property (not used in minimal template)
- Fix property order numbering (1-10) to match default-python
- Update property descriptions to match default-python exactly
- Improve welcome message: "For getting started with Python or SQL code..."
- Add // comments to hidden properties for clarity
- Fix default_catalog to use hive_metastore fallback like default-python
These changes ensure users have a consistent experience across all
default templates while maintaining the minimal template's purpose of
providing a clean starting point without sample code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
When templates have no Python package directory (include_python=no AND no
jobs/pipelines, OR lakeflow_only=yes), hatch cannot automatically detect
what to build. This causes 'uv run pytest' to fail with build errors:
"Unable to determine which files to ship inside the wheel using the
following heuristics: <https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection>"
Add conditional [tool.hatch.build.targets.wheel] configuration with
packages = ["src"] when $has_python_package_dir is false. This matches the
same logic used in __preamble.tmpl to determine directory structure.
The fix applies to:
- default-minimal template (no sample code)
- lakeflow-pipelines templates (SQL-only, no Python packages)
This ensures 'uv run pytest' works correctly in all template variants.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator

Run: 19234356115

Env🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skip
💚​aws linux11356602
🔄​aws windows31355601
💚​aws-ucws linux11491493
💚​aws-ucws windows11492492
💚​azure linux11356601
💚​azure windows11357600
💚​azure-ucws linux11487492
💚​azure-ucws windows11488491
🔄​gcp linux411351603
🔄​gcp windows31354602
10 failing tests:
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
TestAccept💚​R🔄​f💚​R💚​R💚​R💚​R💚​R💚​R💚​R🔄​f
TestAccept/bundle/resources/pipelines/allow-duplicate-names✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p🔄​f✅​p
TestAccept/bundle/resources/pipelines/allow-duplicate-names/DATABRICKS_BUNDLE_ENGINE=direct✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p🔄​f✅​p
TestAccept/bundle/resources/pipelines/auto-approve✅​p🔄​f✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p
TestAccept/bundle/resources/pipelines/auto-approve/DATABRICKS_BUNDLE_ENGINE=terraform✅​p🔄​f✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p
TestAccept/bundle/resources/pipelines/lakeflow-pipeline✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p🔄​f
TestAccept/bundle/resources/pipelines/lakeflow-pipeline/DATABRICKS_BUNDLE_ENGINE=direct✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p🔄​f
TestAccept/bundle/run/app-with-job🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
TestAccept/bundle/templates/default-python/combinations/classic✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p🔄​f✅​p
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=no/PY=no✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p🔄​f✅​p

@pieternpietern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment threadlibs/template/templates/default/template/__preamble.tmpl
Comment threadlibs/template/renderer.go
lennartkats-db added a commit that referenced this pull request Nov 7, 2025
- Simplified PR description to be more concise
- Added changelog entry for default-minimal template (#3885)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@fjakobs

Copy link
Copy Markdown
Contributor

@lennartkats-db Love it

Comment threadlibs/template/templates/default/template/__preamble.tmpl
…n default-minimal template
Addresses PR feedback to verify that the template renderer correctly
preserves empty directories without requiring .gitkeep files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@lennartkats-db
lennartkats-db added this pull request to the merge queueNov 10, 2025
Merged via the queue into main with commit 1a8df6cNov 10, 2025
13 checks passed
@lennartkats-db
lennartkats-db deleted the add-default-minimal-template branch November 10, 2025 14:59
deco-sdk-taggingBot added a commit that referenced this pull request Nov 13, 2025
## Release v0.277.0
### Bundles
* Add `default-minimal` template for users who want a clean slate without sample code ([#3885](#3885))
* Add validation that served_models and served_entities are not used at the same time. Add client side translation logic. ([#3880](#3880))
* Filter out provided permissions, to select a single permissions level per principal (([#3904](#3904))).
lennartkats-db added a commit that referenced this pull request Nov 13, 2025
- Simplified PR description to be more concise
- Added changelog entry for default-minimal template (#3885)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
lennartkats-db added a commit that referenced this pull request Nov 13, 2025
- Simplified PR description to be more concise
- Added changelog entry for default-minimal template (#3885)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Adds a new `default-minimal` template for advanced users who want a
clean slate without sample code:
* Added `default-minimal` which inherits from the `default` template,
just like `default-python`
* Enhanced template renderer to preserve empty directories (necessary to
avoid `.gitkeep` files in `src/` and `resources/`)
* Fixed `uv run pytest` error shown for projects that don't have a
`src/<package>` directory
## Why
Advanced customers and non-ETL customers (like @fjakobs) indicated they
want an "empty" or "minimal" project template where they don't need to
delete sample code. Rather than answering "no" to all questions in
`default-python`, this gives them something more intentional.
## Tests
* Template acceptance tests
* Manual uv run pytest, databricks bundle deploy, databricks bundle run
on generated project
**Example:**
```bash
$ databricks bundle init default-minimal
Welcome to the minimal Databricks Asset Bundle template!
This template creates a minimal project structure without sample code, ideal for advanced users.
(For getting started with Python or SQL code, use the default-python or default-sql templates instead.)
Your workspace at https://e2-dogfood.staging.cloud.databricks.com is used for initialization.
(See https://docs.databricks.com/dev-tools/cli/profiles.html for how to change your profile.)
Unique name for this project [my_project]: empty
Default catalog for any tables created by this project [main]:
Use a personal schema for each user working on this project.
(This is recommended. Your personal schema will be 'main.lennart_kats'.): yes
✨ Your new project has been created in the 'empty' directory!
To get started, refer to the project README.md file and the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
```
```
$ find empty
empty
empty/resources
empty/pyproject.toml
empty/tests
empty/tests/conftest.py
empty/README.md
empty/.gitignore
empty/fixtures
empty/fixtures/.gitkeep
empty/.vscode
empty/.vscode/__builtins__.pyi
empty/.vscode/settings.json
empty/.vscode/extensions.json
empty/databricks.yml
empty/src
```
---------
Co-authored-by: Claude <noreply@anthropic.com>
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.277.0
### Bundles
* Add `default-minimal` template for users who want a clean slate without sample code ([#3885](#3885))
* Add validation that served_models and served_entities are not used at the same time. Add client side translation logic. ([#3880](#3880))
* Filter out provided permissions, to select a single permissions level per principal (([#3904](#3904))).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@lennartkats-db@eng-dev-ecosystem-bot@fjakobs@pietern