From 5f23d02fcbcd97c0df336e349cbe68d2c8bcde53 Mon Sep 17 00:00:00 2001 From: Stijnvandenbroek Date: Wed, 4 Mar 2026 10:17:20 +0000 Subject: [PATCH] fix: linting and ci issues --- .github/workflows/ci.yml | 2 +- .prettierignore | 1 + .sqlfluff | 3 ++- Makefile | 6 +++--- README.md | 20 +++++++++---------- data_platform/__init__.py | 4 +--- .../staging/stg_funda_price_history.sql | 8 ++++---- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df785a0..b60aff0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: - name: Prettier check run: | prettier --check \ - "**/*.yml" "**/*.yaml" "**/*.json" "**/*.md" \ + "**/*.yml" "**/*.yaml" "**/*.md" \ --ignore-path .prettierignore # ── Tests ──────────────────────────────────────────────────────────────── diff --git a/.prettierignore b/.prettierignore index 3132ec1..2b8b6b9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,6 +4,7 @@ dbt/dbt_packages/ .venv/ dist/ *.egg-info/ +.pytest_cache/ # Dagster storage dagster_home/storage/ diff --git a/.sqlfluff b/.sqlfluff index bfff6bb..de49250 100644 --- a/.sqlfluff +++ b/.sqlfluff @@ -3,7 +3,8 @@ templater = jinja dialect = postgres max_line_length = 100 # Exclude generated/vendor paths -exclude_rules = RF05 # don't require quoted identifiers +# Don't require quoted identifiers +exclude_rules = RF05 output_line_length = 120 [sqlfluff:templater:jinja] diff --git a/Makefile b/Makefile index 804395b..17b9f77 100644 --- a/Makefile +++ b/Makefile @@ -95,15 +95,15 @@ lint-python: ## Ruff lint + format check lint-sql: ## SQLFluff lint on dbt/models uv run sqlfluff lint dbt/models --dialect postgres -lint-format: ## Prettier check (YAML / JSON / Markdown) - npx --yes prettier --check "**/*.yml" "**/*.yaml" "**/*.json" "**/*.md" \ +lint-format: ## Prettier check (YAML / Markdown) + npx --yes prettier --check "**/*.yml" "**/*.yaml" "**/*.md" \ --ignore-path .prettierignore lint-fix: ## Auto-fix all linters (ruff + sqlfluff + prettier) uv run ruff check --fix . uv run ruff format . uv run sqlfluff fix dbt/models --dialect postgres - npx --yes prettier --write "**/*.yml" "**/*.yaml" "**/*.json" "**/*.md" \ + npx --yes prettier --write "**/*.yml" "**/*.yaml" "**/*.md" \ --ignore-path .prettierignore ## —— Pre-commit ──────────────────────────────────────────────── diff --git a/README.md b/README.md index 73a2a1c..fde2137 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ # data-platform -A [Dagster](https://dagster.io/) + [dbt](https://www.getdbt.com/) data platform, -managed with [uv](https://github.com/astral-sh/uv) and deployed via Docker Compose. +A [Dagster](https://dagster.io/) + [dbt](https://www.getdbt.com/) data platform, managed with +[uv](https://github.com/astral-sh/uv) and deployed via Docker Compose. ## Stack -| Layer | Tool | -|---|---| -| Orchestration | Dagster (webserver + daemon) | -| Transformation | dbt-core + dbt-postgres | -| Storage | PostgreSQL 16 | -| Package/venv | uv | -| Secrets | `.env` file | +| Layer | Tool | +| -------------- | ---------------------------- | +| Orchestration | Dagster (webserver + daemon) | +| Transformation | dbt-core + dbt-postgres | +| Storage | PostgreSQL 16 | +| Package/venv | uv | +| Secrets | `.env` file | ## Project layout @@ -60,4 +60,4 @@ source .venv/bin/activate # Run the Dagster UI locally DAGSTER_HOME=$PWD/dagster_home dagster dev -``` \ No newline at end of file +``` diff --git a/data_platform/__init__.py b/data_platform/__init__.py index 592d06a..5a82a90 100644 --- a/data_platform/__init__.py +++ b/data_platform/__init__.py @@ -1,3 +1 @@ -from data_platform.definitions import defs - -__all__ = ["defs"] +"""data_platform – Dagster + dbt data platform.""" diff --git a/dbt/models/staging/stg_funda_price_history.sql b/dbt/models/staging/stg_funda_price_history.sql index 71f69ce..a59e274 100644 --- a/dbt/models/staging/stg_funda_price_history.sql +++ b/dbt/models/staging/stg_funda_price_history.sql @@ -9,10 +9,10 @@ staged as ( global_id, price, human_price, - date as price_date, - timestamp as price_timestamp, - source as price_source, - status as price_status, + date as price_date, + timestamp as price_timestamp, + source as price_source, + status as price_status, ingested_at from source )