Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d3080c3
chore: update project configuration and clean up files
KLonge Mar 21, 2025
bfa2bea
refactor: improve type hints and clean up imports in conftest.py
KLonge Mar 21, 2025
a7c0086
chore: simplify Makefile by removing OS-specific checks
KLonge Mar 21, 2025
587844e
refactor(test): improve assertion readability in test_restating_models
KLonge Mar 21, 2025
64e118d
refactor: remove unused test and fixture files + add new tests
KLonge Mar 22, 2025
2321abf
feat(tests): add permanent SQLMesh project fixture and update tests
KLonge Mar 23, 2025
dbe64ee
Resolve merge conflict by deleting conftest.py
KLonge Mar 24, 2025
ecdb4d4
refactor(sql): update SQL query and improve test context
KLonge Mar 24, 2025
577b308
refactor(sql): update full model SQL and enhance test cases
KLonge Mar 25, 2025
8b52ddb
fix(tests): update test_model_code_change.py for clarity and context
KLonge Mar 25, 2025
57f9313
test(tests): enhance model change test with timestamp validation
KLonge Mar 25, 2025
14cb896
refactor(tests): remove obsolete test files and clean up codebase
KLonge Mar 25, 2025
ac3c906
chore(dependencies): add pandas-stubs to development dependencies
KLonge Mar 25, 2025
6e2d482
refactor(tests): simplify test parameters and improve clarity
KLonge Mar 25, 2025
c30776c
refactor(tests): improve query formatting for clarity in test cases
KLonge Mar 25, 2025
e48fa25
refactor(tests): streamline print statements for query results
KLonge Mar 25, 2025
e5af7c2
chore(build): update Makefile for Windows compatibility and modify uv…
KLonge Apr 5, 2025
096505e
chore(dependencies): update package versions and improve scripts
KLonge Apr 5, 2025
cef6ce8
chore(lint): add pyright check to linting configuration
KLonge Apr 5, 2025
ae1b8b7
feat(tests): enhance testing capabilities with new Dagster context
KLonge Apr 5, 2025
b084e9a
refactor(tests): enhance project fixture setup and command execution
KLonge Apr 5, 2025
d3202d3
refactor(command): improve command execution with real-time output st…
KLonge Apr 6, 2025
93cfd09
feat(debug): implement debug state saving and directory management
KLonge Apr 6, 2025
4bd5ba0
refactor(tests): enhance command execution in DagsterTestContext
KLonge Apr 6, 2025
9e4d084
refactor(tests): streamline output handling in DagsterTestContext
KLonge Apr 6, 2025
f5eb759
refactor(tests): improve command execution and output handling in Dag…
KLonge Apr 6, 2025
7d1cb49
refactor(tests): enhance model chain test with run options and logging
KLonge Apr 7, 2025
468461b
refactor(makefile): rename materialization command and remove obsolet…
KLonge May 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ sample/dagster_project/storage/
sample/dagster_project/logs/
sample/dagster_project/history/
sample/dagster_project/schedules/
tests/temp/

debug_runs/
27 changes: 19 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ PYTHON_VENV_NAME := ".venv"
VENV_NAME := .venv
PYTHON := python

PYTHON_CMD := $(CURDIR)/$(VENV_NAME)/bin/python
SQLMESH_CMD := $(CURDIR)/$(VENV_NAME)/bin/sqlmesh
UV_CMD := uv
ACTIVATE := source $(CURDIR)/$(VENV_NAME)/bin/activate
DEACTIVATE := deactivate
ifeq ($(OS),Windows_NT)
PYTHON_CMD := $(CURDIR)/$(VENV_NAME)/Scripts/python
SQLMESH_CMD := $(CURDIR)/$(VENV_NAME)/Scripts/sqlmesh
UV_CMD := "$(subst \,/,$(USERPROFILE))/.local/bin/uv.exe"
ACTIVATE := source $(CURDIR)/$(VENV_NAME)/Scripts/activate
DEACTIVATE := source $(CURDIR)/$(VENV_NAME)/Scripts/deactivate
else
PYTHON_CMD := $(CURDIR)/$(VENV_NAME)/bin/python
SQLMESH_CMD := $(CURDIR)/$(VENV_NAME)/bin/sqlmesh
UV_CMD := uv
ACTIVATE := source $(CURDIR)/$(VENV_NAME)/bin/activate
DEACTIVATE := deactivate
endif

init-python:
@if [ ! -d "$(PYTHON_VENV_NAME)" ]; then \
Expand Down Expand Up @@ -49,15 +57,18 @@ clean-dagster:
rm -rf sample/dagster_project/storage sample/dagster_project/logs sample/dagster_project/history

clean-db:
$(PYTHON_CMD) -c "import duckdb; conn = duckdb.connect('db.db'); [conn.execute(cmd[0]) for cmd in conn.execute(\"\"\"SELECT 'DROP TABLE ' || table_schema || '.' || table_name || ' CASCADE;' as drop_cmd FROM information_schema.tables WHERE table_schema != 'sources' AND table_schema != 'information_schema' AND table_type = 'BASE TABLE'\"\"\").fetchall()]; [conn.execute(cmd[0]) for cmd in conn.execute(\"\"\"SELECT 'DROP VIEW ' || table_schema || '.' || table_name || ' CASCADE;' as drop_cmd FROM information_schema.tables WHERE table_schema != 'sources' AND table_schema != 'information_schema' AND table_type = 'VIEW'\"\"\").fetchall()]; conn.close()"
"$(PYTHON_CMD)" -c "import duckdb; conn = duckdb.connect('db.db'); [conn.execute(cmd[0]) for cmd in conn.execute(\"\"\"SELECT 'DROP TABLE ' || table_schema || '.' || table_name || ' CASCADE;' as drop_cmd FROM information_schema.tables WHERE table_schema != 'sources' AND table_schema != 'information_schema' AND table_type = 'BASE TABLE'\"\"").fetchall()]; [conn.execute(cmd[0]) for cmd in conn.execute(\"\"\"SELECT 'DROP VIEW ' || table_schema || '.' || table_name || ' CASCADE;' as drop_cmd FROM information_schema.tables WHERE table_schema != 'sources' AND table_schema != 'information_schema' AND table_type = 'VIEW'\"\"").fetchall()]; conn.close()"

dagster-dev: clean-dagster
@DAGSTER_HOME="$(subst \,/,$(CURDIR))/sample/dagster_project" "$(PYTHON_CMD)" -m dagster dev -f sample/dagster_project/definitions.py -h 0.0.0.0

dev: dagster-dev # Alias for dagster-dev

dagster-materialize:
$(PYTHON_CMD) -m dagster asset materialize -f sample/dagster_project/definitions.py --select '*'
mat-test-source:
"$(PYTHON_CMD)" -m dagster asset materialize \
-f "$(CURDIR)/sample/dagster_project/definitions.py" \
--select "test_source" \
--config-json '{"resources": {"sqlmesh": {"config": {"config": {"gateway": "local", "path": "C:\\\\Users\\\\kevin\\\\git_repos\\\\dagster-sqlmesh - Copy\\\\sample\\\\sqlmesh_project"}, "plan_options_override": {"skip_backfill": false}}}}}'

sqlmesh-plan:
cd sample/sqlmesh_project && $(SQLMESH_CMD) plan
Expand Down
Loading