Skip to content

Commit 5780e1e

Browse files
committed
Enhance Makefile and VSCode settings for improved development workflow
1 parent 9f8f7fd commit 5780e1e

2 files changed

Lines changed: 55 additions & 14 deletions

File tree

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,20 @@
110110
"cmd": "SKIP=pyright,prettier uv run pre-commit run --files \"${file}\""
111111
}
112112
]
113+
},
114+
115+
"makefile.extensionOutputFolder": "./.vscode",
116+
"makefile.launchConfigurations": [],
117+
"makefile.loggingLevel": "Normal",
118+
"makefile.buildLog": "",
119+
"makefile.configurationCachePath": ".vscode/configurationCache.log",
120+
"makefile.dryrunSwitches": ["--dry-run", "--print-data-base"],
121+
"makefile.makefilePath": "./Makefile",
122+
"makefile.makePath": "make",
123+
"makefile.preConfigureScript": "",
124+
"makefile.panel.visibility": {
125+
"debug": true,
126+
"build": true,
127+
"run": true
113128
}
114129
}

Makefile

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Mark all the commands that don't have a target
2+
.PHONY: help test lint fix format install type-check build clean build-docs serve-docs
3+
.DEFAULT_GOAL := help
4+
15
#
26
# Colors
37
#
@@ -66,6 +70,42 @@ PYTHON := python -W ignore -m
6670
# Commands
6771
#
6872

73+
help: ## Show this help. Example: make help
74+
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
75+
76+
install: ## Install dependencies with uv
77+
$(call banner, ⚙️ Installing dependencies ⚙️ )
78+
uv sync --all-extras
79+
80+
test: ## Run tests with coverage
81+
$(call banner, 🧪 Running tests 🧪)
82+
uv run pytest --cov -sv
83+
84+
lint: ## Check code with ruff
85+
$(call banner, 🛡️ Linting code 🛡️ )
86+
uv run ruff check
87+
88+
format: ## Format code with ruff
89+
$(call banner, 🎨 Formatting code 🎨 )
90+
uv run ruff format
91+
92+
fix: ## Auto-fix linting issues
93+
$(call banner, 🔧 Auto-fixing issues 🔧)
94+
@uv run ruff check --fix
95+
96+
type-check: ## Verify static typing with pyright
97+
$(call banner, 🔍 Verifying static typing 🔍)
98+
uv run pyright
99+
100+
build: ## Build distribution packages
101+
$(call banner, 📦 Building distribution packages 📦)
102+
uv build --sdist --wheel
103+
104+
clean: ## Remove build artifacts
105+
$(call banner, 🧹 Cleaning build artifacts 🧹)
106+
rm -rf dist/ build/ *.egg-info .pytest_cache .ruff_cache
107+
find . -type d -name __pycache__ -exec rm -rf {} +
108+
69109
build-docs: ## Build the docs
70110
$(call banner, 📚 Building docs 📚)
71111
@rm -rf _build/
@@ -77,17 +117,3 @@ serve-docs: ## Test the site
77117
@rm -rf _build/
78118
@rm -rf docs/_build
79119
@cd docs && $(UV) make livehtml
80-
81-
#
82-
# Extras
83-
#
84-
85-
86-
help: ## Show this help. Example: make help
87-
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
88-
89-
90-
# Mark all the commands that don't have a target
91-
.PHONY: help \
92-
format \
93-
serve

0 commit comments

Comments
 (0)