Skip to content

Conversation

@lennartkats-db
Copy link
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-db and 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@eng-dev-ecosystem-bot
Copy link
Collaborator

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

Run: 19234356115

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip
💚​ aws linux 1 1 356 602
🔄​ aws windows 3 1 355 601
💚​ aws-ucws linux 1 1 491 493
💚​ aws-ucws windows 1 1 492 492
💚​ azure linux 1 1 356 601
💚​ azure windows 1 1 357 600
💚​ azure-ucws linux 1 1 487 492
💚​ azure-ucws windows 1 1 488 491
🔄​ gcp linux 4 1 1 351 603
🔄​ gcp windows 3 1 354 602
10 failing tests:
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp 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

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

🚀

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 <[email protected]>
@fjakobs
Copy link
Contributor

fjakobs commented Nov 10, 2025

@lennartkats-db Love it

…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 <[email protected]>
@lennartkats-db lennartkats-db added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit 1a8df6c Nov 10, 2025
13 checks passed
@lennartkats-db lennartkats-db deleted the add-default-minimal-template branch November 10, 2025 14:59
Sign up for free to 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.

5 participants