Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add project scaffolding option #5

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

gwenwindflower
Copy link
Owner

To make tbd a true alternative to dbt init, it needs to optionally be able to scaffold a baseline dbt project. It can now do this! If you choose this option your files will be generated inside the staging folder of the scaffolded project.

It also adds an important guard that prevents users choosing an existing, populated directory to build into. Rather than deal with how to handle overwrites, I think it's much better to just error out and ask users to either specify a new directory or choose an empty one.

`tbd` now functions as a drop-in replacement for `dbt init` by adding features which optionally scaffold a dbt project.
This commit adds an intentional error if the target folder exists and is not empty. It also adds .gitkeep files in all the empty scaffolded folders to allow the directories to be tracked if there's an inital commit of the generated project.
Adds tests that folders are created, gitignore is matching, and dbt_project.yml is templated correctly based on ConnectionDetails.
@gwenwindflower gwenwindflower merged commit 70fe71f into main Apr 16, 2024
1 check passed
@gwenwindflower gwenwindflower deleted the feat/scaffold-project branch April 16, 2024 17:38
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.

1 participant