-
Notifications
You must be signed in to change notification settings - Fork 6
Poetry --> UV (+ Makefile Added) #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
627aaf3
chore: update lint-staged configuration and pyproject.toml
KLonge f6b96ae
chore: remove poetry.lock file
KLonge 4a185e6
chore: simplify dagster-dev command in Makefile
KLonge 5333eca
chore: update CI workflow to use uv for dependency management
KLonge f4bb22a
chore: enhance development setup with Makefile commands
KLonge e7c58bd
Update pyproject.toml
duragdatadude 8afb846
Update package.json
duragdatadude f9e8b79
chore: streamline Makefile for consistent Python command usage
KLonge 4139566
chore: update pyproject.toml and console.py for linter integration
KLonge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"**/*.py": [ | ||
"poetry run ruff check --fix --force-exclude", | ||
"uv run ruff check --fix --force-exclude", | ||
"pnpm pyright" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# System detection | ||
UNAME := "$(shell uname)" | ||
PYTHON_VENV_NAME := ".venv" | ||
|
||
# Python virtual environment settings | ||
VENV_NAME := .venv | ||
PYTHON := python | ||
|
||
# Check if we're on Windows | ||
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 \ | ||
echo "Creating virtual environment with Python 3.12..."; \ | ||
uv venv --python 3.12 $(PYTHON_VENV_NAME); \ | ||
fi | ||
|
||
install-python-deps: | ||
uv sync --all-extras | ||
|
||
upgrade-python-deps: | ||
uv lock --upgrade | ||
make install-python-deps | ||
|
||
install-node-deps: | ||
pnpm install | ||
|
||
upgrade-node-deps: | ||
pnpm update | ||
|
||
# Base commands | ||
init: init-python install-python-deps check-pnpm install-node-deps | ||
|
||
clean: | ||
find . \( -type d -name "__pycache__" -o -type f -name "*.pyc" -o -type d -name ".pytest_cache" -o -type d -name "*.egg-info" \) -print0 | xargs -0 rm -rf | ||
|
||
# Testing commands | ||
test: | ||
$(PYTHON_CMD) -m pytest -vv --log-cli-level=INFO $(filter-out $@,$(MAKECMDGOALS)) | ||
|
||
pyright: | ||
pnpm pyright | ||
|
||
# Sample project commands | ||
|
||
dagster-dev: clean-dagster | ||
DAGSTER_HOME=$(CURDIR)/sample/dagster_project $(PYTHON_CMD) -m dagster dev -h 0.0.0.0 -w | ||
|
||
dev: dagster-dev # Alias for dagster-dev | ||
|
||
dagster-materialize: | ||
$(PYTHON_CMD) -m dagster asset materialize -f sample/dagster_project/definitions.py --select '*' | ||
|
||
.PHONY: init init-python install-python-deps upgrade-python-deps clean test mypy check-pnpm install-node-deps upgrade-node-deps sample-dev dagster-dev dagster-materialize clean-dagster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.