From 303cafc8b947932fb73d44209deeb03ffe706c3c Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Tue, 3 Oct 2023 14:18:22 +0200 Subject: [PATCH 1/2] Minor template tweaks --- .../templates/default-python/databricks_template_schema.json | 2 +- libs/template/templates/default-python/template/__preamble.tmpl | 1 + .../template/{{.project_name}}/src/dlt_pipeline.ipynb.tmpl | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/template/templates/default-python/databricks_template_schema.json b/libs/template/templates/default-python/databricks_template_schema.json index 8784841ebf..59697a6159 100644 --- a/libs/template/templates/default-python/databricks_template_schema.json +++ b/libs/template/templates/default-python/databricks_template_schema.json @@ -26,7 +26,7 @@ "type": "string", "default": "yes", "enum": ["yes", "no"], - "description": "Include a stub (sample) Python package 'my_project/src'", + "description": "Include a stub (sample) Python package in '{{.project_name}}/src'", "order": 4 } } diff --git a/libs/template/templates/default-python/template/__preamble.tmpl b/libs/template/templates/default-python/template/__preamble.tmpl index 5473249320..a919a269c9 100644 --- a/libs/template/templates/default-python/template/__preamble.tmpl +++ b/libs/template/templates/default-python/template/__preamble.tmpl @@ -13,6 +13,7 @@ This file only template directives; it is skipped for the actual output. {{skip "{{.project_name}}/tests/main_test.py"}} {{skip "{{.project_name}}/setup.py"}} {{skip "{{.project_name}}/pytest.ini"}} + {{skip "{{.project_name}}/requirements-dev.txt"}} {{end}} {{if $notDLT}} diff --git a/libs/template/templates/default-python/template/{{.project_name}}/src/dlt_pipeline.ipynb.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/src/dlt_pipeline.ipynb.tmpl index 4f50294f6a..8c85e97ef6 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/src/dlt_pipeline.ipynb.tmpl +++ b/libs/template/templates/default-python/template/{{.project_name}}/src/dlt_pipeline.ipynb.tmpl @@ -35,7 +35,6 @@ "# Import DLT and src/{{.project_name}}\n", "import dlt\n", "import sys\n", - "sys.path.append(spark.conf.get(\"bundle.sourcePath\", \".\"))\n", "from pyspark.sql.functions import expr\n", "from {{.project_name}} import main" {{else}} From d55e3c95234dabce562cd1c57fcd6bf055ec46dd Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Wed, 4 Oct 2023 13:54:27 +0200 Subject: [PATCH 2/2] Remove setting --- .../resources/{{.project_name}}_pipeline.yml.tmpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}_pipeline.yml.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}_pipeline.yml.tmpl index 4b8f74d173..498604f6b6 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}_pipeline.yml.tmpl +++ b/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}_pipeline.yml.tmpl @@ -7,6 +7,3 @@ resources: libraries: - notebook: path: ../src/dlt_pipeline.ipynb - - configuration: - bundle.sourcePath: /Workspace/${workspace.file_path}/src