Skip to content

Commit d923e95

Browse files
committed
always render secrets section
add gitignore template file
1 parent dc540e1 commit d923e95

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

dlt_init_openapi/renderer/default/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ def _build_meta_files(self) -> None:
8787
encoding=FILE_ENCODING,
8888
)
8989

90+
gitignore_template = self.env.get_template("gitignore.j2")
91+
gitignore_path = self.config.project_dir / ".gitignore"
92+
gitignore_path.write_text(
93+
gitignore_template.render(),
94+
encoding=FILE_ENCODING,
95+
)
96+
9097
def _create_package(self) -> None:
9198
self.config.project_dir.mkdir(exist_ok=True, parents=True)
9299
self.package_dir.mkdir(exist_ok=True)
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
{% if credentials %}
21
[sources.{{project_name}}]
2+
# secrets for your {{project_name}} source
3+
{% if credentials %}
34
{% for secret in credentials.detected_secret_names %}
45
{{ secret }} = "FILL ME OUT" # TODO: fill in your credentials
56
{% endfor %}
7+
{% else %}
8+
# example_api_key = "example value"
69
{% endif %}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# local duckdb files
2+
*.duckdb
3+
# pipeline secrets
4+
secrets.toml

0 commit comments

Comments
 (0)