Skip to content

Commit 0cf80da

Browse files
committed
Merge branch 'devel' into fix/3269-fixes-athena-refresh-mode
2 parents 6a18700 + 3bd5099 commit 0cf80da

File tree

138 files changed

+12375
-2760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+12375
-2760
lines changed

.github/workflows/build_docs.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@ jobs:
2121
with:
2222
node-version: '22'
2323

24-
- name: Setup Python
25-
uses: actions/setup-python@v5
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
2626
with:
2727
python-version: "3.11"
28+
activate-environment: true
2829

2930
- name: Install node dependencies
3031
run: cd docs/website && npm install
3132

3233
- name: Install python dependencies
33-
run: cd docs/website && pip install -r requirements.txt
34-
35-
- name: Build docs
36-
run: cd docs/website && npm run build:cloudflare
34+
run: cd docs/website && npm run build

.github/workflows/main.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ jobs:
2727

2828
# testing and linting of docs snippets is always run to catch problems in the docs
2929
# NOTE: we could splint linting and testing of docs so linter can also always run for fork PRs
30-
test_docs_snippets:
31-
name: test snippets in docs
32-
uses: ./.github/workflows/test_docs_snippets.yml
30+
test_docs:
31+
name: lint and test snippets, examples and notebooks in docs, lints tools
32+
uses: ./.github/workflows/test_docs.yml
33+
secrets: inherit
3334

3435
# NOTE: we build docs the same way as on cloudflare, so we can catch problems early
3536
build_docs:
@@ -86,12 +87,6 @@ jobs:
8687
# so we depend on authorize and forward secrets
8788
#
8889

89-
test_examples:
90-
name: test examples
91-
needs: [lint, authorize_run_from_fork]
92-
uses: ./.github/workflows/test_examples.yml
93-
secrets: inherit
94-
9590
test_destinations_remote:
9691
name: test remote destinations with secrets
9792
needs: [authorize_run_from_fork, test_common]

.github/workflows/test_docs_snippets.yml renamed to .github/workflows/test_docs.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
name: docs | snippets
2+
name: docs | lint and test tools, snippets and examples
33

44
on:
55
workflow_call:
@@ -12,6 +12,16 @@ env:
1212
# detect if the workflow is executed in a repo fork
1313
IS_FORK: ${{ github.event.pull_request.head.repo.fork }}
1414

15+
DLT_SECRETS_TOML: ${{ secrets.DLT_SECRETS_TOML }}
16+
17+
# RUNTIME__SENTRY_DSN: https://[email protected]/4504819859914752
18+
19+
# Slack hook for chess in production example
20+
RUNTIME__SLACK_INCOMING_HOOK: ${{ secrets.RUNTIME__SLACK_INCOMING_HOOK }}
21+
# Path to local qdrant database
22+
DESTINATION__QDRANT__CREDENTIALS__PATH: zendesk.qdb
23+
24+
1525
jobs:
1626

1727
run_lint:
@@ -65,24 +75,34 @@ jobs:
6575
activate-environment: true
6676
enable-cache: true
6777

78+
- name: Start weaviate
79+
run: docker compose -f "tests/load/weaviate/docker-compose.yml" up -d
80+
81+
6882
- name: Install dependencies
69-
run: uv sync --extra duckdb --extra parquet --extra postgres --extra s3 --extra workspace --group docs --group sentry-sdk --group ibis --group providers
83+
run: cd docs && make dev
7084

7185
- name: Install dlthub incl alpha releases
72-
run: uv run pip install --pre dlthub
86+
run: cd docs && uv run pip install --pre dlthub
7387

74-
- name: run docs preprocessor
75-
run: make preprocess-docs
88+
- name: lint docs
89+
run: cd docs && make lint
90+
91+
- name: lint embedded snippets
92+
run: cd docs && make lint-embedded-snippets
7693

7794
- name: Create secrets.toml for snippets
7895
run: |
7996
cp tests/.dlt/dev.secrets.toml docs/website/docs/.dlt/secrets.toml
8097
81-
- name: Run linter and tests on snippets
82-
run: make lint-and-test-snippets
98+
- name: test snippets
99+
run: cd docs && make test-snippets
83100

84-
- name: Test notebooks
85-
run: cd docs/notebooks && make test
101+
- name: create secrets.toml for examples
102+
run: pwd && echo "$DLT_SECRETS_TOML" > docs/examples/.dlt/secrets.toml
86103

87-
- name: Lint education notebooks
88-
run: make lint-notebooks
104+
- name: test examples
105+
run: cd docs && make test-examples
106+
107+
- name: run docs preprocessor
108+
run: cd docs && make preprocess-docs

Makefile

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ has-uv:
4444
uv --version
4545

4646
dev: has-uv
47-
uv sync --all-extras --group docs --group dev --group providers --group pipeline --group sources --group sentry-sdk --group ibis --group adbc --group dashboard-tests
47+
uv sync --all-extras --group dev --group providers --group pipeline --group sources --group sentry-sdk --group ibis --group adbc --group dashboard-tests
4848

4949
dev-airflow: has-uv
50-
uv sync --all-extras --group docs --group providers --group pipeline --group sources --group sentry-sdk --group ibis --group airflow
50+
uv sync --all-extras --group providers --group pipeline --group sources --group sentry-sdk --group ibis --group airflow
5151

5252
lint: lint-core lint-security lint-docstrings
5353

@@ -60,45 +60,14 @@ lint-core:
6060
# NOTE: we exclude all D lint errors (docstrings)
6161
uv run flake8 --extend-ignore=D --max-line-length=200 dlt
6262
uv run flake8 --extend-ignore=D --max-line-length=200 tests --exclude tests/reflection/module_cases,tests/common/reflection/cases/modules/
63-
uv run black dlt docs tests --check --diff --color --extend-exclude=".*syntax_error.py"
6463

6564
format:
66-
uv run black dlt docs tests --extend-exclude='.*syntax_error.py|_storage/.*'
67-
uv run black docs/education --ipynb --extend-exclude='.*syntax_error.py|_storage/.*'
68-
69-
lint-snippets:
70-
cd docs/tools && uv run python check_embedded_snippets.py full
71-
# TODO: re-enable transformation snippets tests when dlthub dep is available
72-
uv pip install docstring_parser_fork --reinstall
73-
uv run mypy --config-file mypy.ini docs/website docs/tools --exclude docs/tools/lint_setup --exclude docs/website/docs_processed --exclude docs/website/versioned_docs/
74-
uv run ruff check
75-
uv run flake8 --max-line-length=200 docs/website docs/tools --exclude docs/website/.dlt-repo,docs/website/node_modules
76-
77-
lint-and-test-snippets: lint-snippets
78-
cd docs/website/docs && uv run pytest --ignore=node_modules
79-
80-
lint-and-test-examples:
81-
uv pip install docstring_parser_fork --reinstall
82-
cd docs/tools && uv run python prepare_examples_tests.py
83-
uv run ruff check
84-
uv run flake8 --max-line-length=200 docs/examples
85-
uv run mypy --config-file mypy.ini docs/examples
86-
cd docs/examples && uv run pytest
87-
88-
test-examples:
89-
cd docs/examples && uv run pytest
65+
uv run black dlt tests --extend-exclude='.*syntax_error.py|_storage/.*'
9066

9167
lint-security:
9268
# go for ll by cleaning up eval and SQL warnings.
9369
uv run bandit -r dlt/ -n 3 -lll
9470

95-
lint-notebooks:
96-
uv run nbqa flake8 docs/education --extend-ignore=D,F704 --max-line-length=200
97-
uv run nbqa mypy docs/education \
98-
--ignore-missing-imports \
99-
--disable-error-code=no-redef \
100-
--disable-error-code=top-level-await
101-
10271
# check docstrings for all important public classes and functions
10372
lint-docstrings:
10473
uv run flake8 --count \
@@ -146,10 +115,6 @@ test-build-images: build-library
146115
docker build -f deploy/dlt/Dockerfile.airflow --build-arg=COMMIT_SHA="$(shell git log -1 --pretty=%h)" --build-arg=IMAGE_VERSION="$(shell uv version --short)" .
147116
docker build -f deploy/dlt/Dockerfile.minimal --build-arg=COMMIT_SHA="$(shell git log -1 --pretty=%h)" --build-arg=IMAGE_VERSION="$(shell uv version --short)" .
148117

149-
preprocess-docs:
150-
# run docs preprocessing to run a few checks and ensure examples can be parsed
151-
cd docs/website && npm i && npm run preprocess-docs
152-
153118
start-test-containers:
154119
docker compose -f "tests/load/dremio/docker-compose.yml" up -d
155120
docker compose -f "tests/load/postgres/docker-compose.yml" up -d

dlt/_workspace/helpers/dashboard/dlt_dashboard.py

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# /// script
2+
# [tool.marimo.display]
3+
# theme = "light"
4+
# ///
15
# flake8: noqa: F841
26
# mypy: disable-error-code=no-untyped-def
37

@@ -103,20 +107,32 @@ def home(
103107
else:
104108
_buttons: List[Any] = []
105109
_buttons.append(dlt_refresh_button)
110+
_pipeline_execution_exception: List[Any] = []
111+
_pipeline_execution_summary: mo.Html = None
112+
_last_load_packages_info: mo.Html = None
106113
if dlt_pipeline:
107114
_buttons.append(
108115
mo.ui.button(
109116
label="<small>Open pipeline working dir</small>",
110117
on_click=lambda _: utils.open_local_folder(dlt_pipeline.working_dir),
111118
)
112119
)
113-
if dlt_pipeline and (local_dir := utils.get_local_data_path(dlt_pipeline)):
114-
_buttons.append(
115-
mo.ui.button(
116-
label="<small>Open local data location</small>",
117-
on_click=lambda _: utils.open_local_folder(local_dir),
120+
if local_dir := utils.get_local_data_path(dlt_pipeline):
121+
_buttons.append(
122+
mo.ui.button(
123+
label="<small>Open local data location</small>",
124+
on_click=lambda _: utils.open_local_folder(local_dir),
125+
)
118126
)
119-
)
127+
if trace := dlt_pipeline.last_trace:
128+
_pipeline_execution_summary = utils.build_pipeline_execution_visualization(trace)
129+
_last_load_packages_info = mo.vstack(
130+
[
131+
mo.md(f"<small>{strings.view_load_packages_text}</small>"),
132+
utils.load_package_status_labels(trace),
133+
]
134+
)
135+
_pipeline_execution_exception = utils.build_exception_section(dlt_pipeline)
120136
_stack = [
121137
mo.vstack(
122138
[
@@ -182,10 +198,16 @@ def home(
182198
],
183199
justify="space-between",
184200
),
185-
mo.hstack(_buttons, justify="start"),
186201
]
187-
)
202+
),
203+
mo.hstack(_buttons, justify="start"),
188204
]
205+
if _pipeline_execution_summary:
206+
_stack.append(_pipeline_execution_summary)
207+
if _last_load_packages_info:
208+
_stack.append(_last_load_packages_info)
209+
if _pipeline_execution_exception:
210+
_stack.extend(_pipeline_execution_exception)
189211
if not dlt_pipeline and dlt_pipeline_name:
190212
_stack.append(
191213
mo.callout(
@@ -195,7 +217,6 @@ def home(
195217
kind="warn",
196218
)
197219
)
198-
199220
mo.vstack(_stack)
200221
return (dlt_pipeline,)
201222

@@ -221,8 +242,6 @@ def section_overview(
221242
)
222243

223244
if dlt_pipeline and dlt_section_overview_switch.value:
224-
if _exception_section := utils.build_exception_section(dlt_pipeline):
225-
_result.extend(_exception_section)
226245
_result += [
227246
mo.ui.table(
228247
utils.pipeline_details(dlt_config, dlt_pipeline, dlt_pipelines_dir),

dlt/_workspace/helpers/dashboard/dlt_dashboard_styles.css

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,22 @@
77
--dlt-color-lime: #c6d300;
88
--dlt-color-aqua: #59c1d5;
99
--dlt-color-purple: #191937;
10+
--dlt-color-pink: #EE746D;
1011

1112
/* background colors */
1213
--dlt-color-lime-background: #c6d30006;
1314
--dlt-color-aqua-background: #59c1d503;
1415
--dlt-color-purple-background: #19193706;
1516

17+
/* badge colors */
18+
--grey-bg: #E0E0E0;
19+
--grey-text: #555555;
20+
--yellow-bg: #F2D6A2;
21+
--yellow-text: #AD7F37;
22+
--green-bg: #a8e4ac;
23+
--green-text: #468A47;
24+
--red-bg: #D47672;
25+
--red-text: #FBE8E8;
1626
}
1727

1828
/* Make headings bold */
@@ -87,8 +97,82 @@
8797
margin-top: 0.5rem;
8898
}
8999

90-
91100
marimo-callout-output .border {
92101
margin-top: 0.5rem;
93102
margin-bottom: 0.5rem;
103+
}
104+
105+
/* Pipeline execution visualization styles */
106+
.pipeline-execution-container {
107+
padding-top: 16px;
108+
padding-bottom: 10px;
109+
}
110+
111+
.pipeline-execution-layout {
112+
display: flex;
113+
flex-direction: row;
114+
justify-content: space-between;
115+
align-items: center;
116+
gap: 16px;
117+
}
118+
119+
.pipeline-execution-info {
120+
display: flex;
121+
flex-direction: column;
122+
}
123+
124+
.pipeline-execution-timeline {
125+
display: flex;
126+
flex-direction: column;
127+
justify-content: space-between;
128+
flex: 0 0 40%;
129+
}
130+
131+
.pipeline-execution-timeline-bar {
132+
display: flex;
133+
flex-direction: row;
134+
justify-content: center;
135+
height: 16px;
136+
}
137+
138+
/* Note: .pipeline-execution-timeline-segment uses inline styles for dynamic width, color, and border-radius */
139+
140+
.pipeline-execution-labels {
141+
display: flex;
142+
flex-direction: row;
143+
justify-content: space-between;
144+
}
145+
146+
.pipeline-execution-badges {
147+
display: flex;
148+
flex-direction: row;
149+
justify-content: space-between;
150+
gap: 16px;
151+
}
152+
153+
/* Status badge styles */
154+
.status-badge {
155+
padding: 6px 16px;
156+
border-radius: 6px;
157+
display: inline-block;
158+
}
159+
160+
.status-badge-yellow {
161+
background-color: var(--yellow-bg);
162+
color: var(--yellow-text);
163+
}
164+
165+
.status-badge-green {
166+
background-color: var(--green-bg);
167+
color: var(--green-text);
168+
}
169+
170+
.status-badge-red {
171+
background-color: var(--red-bg);
172+
color: var(--red-text);
173+
}
174+
175+
.status-badge-grey {
176+
background-color: var(--grey-bg);
177+
color: var(--grey-text);
94178
}

dlt/_workspace/helpers/dashboard/strings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@
9090
## Pipeline `{}`
9191
"""
9292

93+
view_load_packages_text = "Status of load packages from last execution"
94+
95+
9396
#
9497
# Overview section
9598
#

0 commit comments

Comments
 (0)