Skip to content

Commit 44cf7f3

Browse files
committed
chore(release): bump to version v0.5.0
1 parent 9ec7054 commit 44cf7f3

File tree

5 files changed

+1487
-1133
lines changed

5 files changed

+1487
-1133
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
strategy:
9595
fail-fast: true
9696
matrix:
97-
python-version: ["3.9", "3.10", "3.11", "3.12"]
97+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9898
timeout-minutes: 30
9999
steps:
100100
- name: Check out repository

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: "3"
33
repos:
44
- repo: https://github.com/compilerla/conventional-pre-commit
5-
rev: v3.6.0
5+
rev: v4.2.0
66
hooks:
77
- id: conventional-pre-commit
88
stages: [commit-msg]
@@ -17,19 +17,19 @@ repos:
1717
- id: mixed-line-ending
1818
- id: trailing-whitespace
1919
- repo: https://github.com/charliermarsh/ruff-pre-commit
20-
rev: "v0.8.1"
20+
rev: "v0.11.13"
2121
hooks:
2222
- id: ruff
2323
args: ["--fix"]
2424
- id: ruff-format
2525
- repo: https://github.com/codespell-project/codespell
26-
rev: v2.3.0
26+
rev: v2.4.1
2727
hooks:
2828
- id: codespell
2929
additional_dependencies:
3030
- tomli
3131
- repo: https://github.com/python-formate/flake8-dunder-all
32-
rev: v0.4.1
32+
rev: v0.5.0
3333
hooks:
3434
- id: ensure-dunder-all
3535
exclude: "test*|tools"

Makefile

Lines changed: 162 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,217 @@
11
SHELL := /bin/bash
2+
23
# =============================================================================
3-
# Variables
4+
# Configuration and Environment Variables
45
# =============================================================================
56

67
.DEFAULT_GOAL:=help
78
.ONESHELL:
89
.EXPORT_ALL_VARIABLES:
10+
MAKEFLAGS += --no-print-directory
11+
12+
# -----------------------------------------------------------------------------
13+
# Display Formatting and Colors
14+
# -----------------------------------------------------------------------------
15+
BLUE := $(shell printf "\033[1;34m")
16+
GREEN := $(shell printf "\033[1;32m")
17+
RED := $(shell printf "\033[1;31m")
18+
YELLOW := $(shell printf "\033[1;33m")
19+
NC := $(shell printf "\033[0m")
20+
INFO := $(shell printf "$(BLUE)$(NC)")
21+
OK := $(shell printf "$(GREEN)$(NC)")
22+
WARN := $(shell printf "$(YELLOW)$(NC)")
23+
ERROR := $(shell printf "$(RED)$(NC)")
924

25+
# =============================================================================
26+
# Help and Documentation
27+
# =============================================================================
1028

1129
.PHONY: help
12-
help: ## Display this help text for Makefile
30+
help: ## Display this help text for Makefile
1331
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
1432

15-
.PHONY: upgrade
16-
upgrade: ## Upgrade all dependencies to the latest stable versions
17-
@echo "=> Updating all dependencies"
18-
@uv lock --upgrade
19-
@echo "=> Dependencies Updated"
20-
@uv run pre-commit autoupdate
21-
@echo "=> Updated Pre-commit"
22-
2333
# =============================================================================
24-
# Developer Utils
34+
# Installation and Environment Setup
2535
# =============================================================================
36+
2637
.PHONY: install-uv
27-
install-uv: ## Install latest version of uv
28-
@curl -LsSf https://astral.sh/uv/install.sh | sh
38+
install-uv: ## Install latest version of uv
39+
@echo "${INFO} Installing uv..."
40+
@curl -LsSf https://astral.sh/uv/install.sh | sh >/dev/null 2>&1
41+
@uv tool install nodeenv >/dev/null 2>&1
42+
@echo "${OK} UV installed successfully"
2943

3044
.PHONY: install
31-
install: clean ## Install the project, dependencies, and pre-commit for local development
45+
install: destroy clean ## Install the project, dependencies, and pre-commit
46+
@echo "${INFO} Starting fresh installation..."
47+
@uv python pin 3.12 >/dev/null 2>&1
48+
@uv venv >/dev/null 2>&1
3249
@uv sync --all-extras --dev
33-
@echo "=> Install complete!"
34-
35-
.PHONY: clean
36-
clean: ## Cleanup temporary build artifacts
37-
@echo "=> Cleaning working directory"
38-
@rm -rf .pytest_cache .ruff_cache .hypothesis build/ -rf dist/ .eggs/
39-
@find . -name '*.egg-info' -exec rm -rf {} +
40-
@find . -type f -name '*.egg' -exec rm -f {} +
41-
@find . -name '*.pyc' -exec rm -f {} +
42-
@find . -name '*.pyo' -exec rm -f {} +
43-
@find . -name '*~' -exec rm -f {} +
44-
@find . -name '__pycache__' -exec rm -rf {} +
45-
@find . -name '.ipynb_checkpoints' -exec rm -rf {} +
46-
@rm -rf .coverage coverage.xml coverage.json htmlcov/ .pytest_cache tests/.pytest_cache tests/**/.pytest_cache .mypy_cache
47-
$(MAKE) docs-clean
50+
@echo "${OK} Installation complete! 🎉"
4851

4952
.PHONY: destroy
50-
destroy: ## Destroy the virtual environment
53+
destroy: ## Destroy the virtual environment
54+
@echo "${INFO} Destroying virtual environment... 🗑️"
55+
@uv run pre-commit clean >/dev/null 2>&1
5156
@rm -rf .venv
57+
@echo "${OK} Virtual environment destroyed 🗑️"
5258

53-
.PHONY: lock
54-
lock: ## Rebuild lockfiles from scratch, updating all dependencies
59+
# =============================================================================
60+
# Dependency Management
61+
# =============================================================================
62+
63+
.PHONY: upgrade
64+
upgrade: ## Upgrade all dependencies to latest stable versions
65+
@echo "${INFO} Updating all dependencies... 🔄"
5566
@uv lock --upgrade
67+
@echo "${OK} Dependencies updated 🔄"
68+
@uv run pre-commit autoupdate
69+
@echo "${OK} Updated Pre-commit hooks 🔄"
70+
71+
.PHONY: lock
72+
lock: ## Rebuild lockfiles from scratch
73+
@echo "${INFO} Rebuilding lockfiles... 🔄"
74+
@uv lock --upgrade >/dev/null 2>&1
75+
@echo "${OK} Lockfiles updated"
76+
77+
# =============================================================================
78+
# Build and Release
79+
# =============================================================================
80+
81+
.PHONY: build
82+
build: ## Build the package
83+
@echo "${INFO} Building package... 📦"
84+
@uv build >/dev/null 2>&1
85+
@echo "${OK} Package build complete"
86+
87+
.PHONY: release
88+
release: ## Bump version and create release tag
89+
@echo "${INFO} Preparing for release... 📦"
90+
@make docs
91+
@make clean
92+
@make build
93+
@uv lock --upgrade-package advanced-alchemy >/dev/null 2>&1
94+
@uv run bump-my-version bump $(bump)
95+
@echo "${OK} Release complete 🎉"
5696

5797
# =============================================================================
58-
# Tests, Linting, Coverage
98+
# Cleaning and Maintenance
5999
# =============================================================================
100+
101+
.PHONY: clean
102+
clean: ## Cleanup temporary build artifacts
103+
@echo "${INFO} Cleaning working directory... 🧹"
104+
@rm -rf .pytest_cache .ruff_cache .hypothesis build/ dist/ .eggs/ .coverage coverage.xml coverage.json htmlcov/ .pytest_cache tests/.pytest_cache tests/**/.pytest_cache .mypy_cache .unasyncd_cache/ .auto_pytabs_cache node_modules >/dev/null 2>&1
105+
@find . -name '*.egg-info' -exec rm -rf {} + >/dev/null 2>&1
106+
@find . -type f -name '*.egg' -exec rm -f {} + >/dev/null 2>&1
107+
@find . -name '*.pyc' -exec rm -f {} + >/dev/null 2>&1
108+
@find . -name '*.pyo' -exec rm -f {} + >/dev/null 2>&1
109+
@find . -name '*~' -exec rm -f {} + >/dev/null 2>&1
110+
@find . -name '__pycache__' -exec rm -rf {} + >/dev/null 2>&1
111+
@find . -name '.ipynb_checkpoints' -exec rm -rf {} + >/dev/null 2>&1
112+
@echo "${OK} Working directory cleaned"
113+
$(MAKE) docs-clean
114+
115+
# =============================================================================
116+
# Testing and Quality Checks
117+
# =============================================================================
118+
119+
.PHONY: test
120+
test: ## Run the tests
121+
@echo "${INFO} Running test cases... 🧪"
122+
@uv run pytest -n 2 --quiet
123+
@echo "${OK} Tests passed ✨"
124+
125+
.PHONY: coverage
126+
coverage: ## Run tests with coverage report
127+
@echo "${INFO} Running tests with coverage... 📊"
128+
@uv run pytest --cov -n auto --quiet
129+
@uv run coverage html >/dev/null 2>&1
130+
@uv run coverage xml >/dev/null 2>&1
131+
@echo "${OK} Coverage report generated ✨"
132+
133+
# -----------------------------------------------------------------------------
134+
# Type Checking
135+
# -----------------------------------------------------------------------------
136+
60137
.PHONY: mypy
61-
mypy: ## Run mypy
62-
@echo "=> Running mypy"
138+
mypy: ## Run mypy
139+
@echo "${INFO} Running mypy... 🔍"
63140
@uv run dmypy run
64-
@echo "=> mypy complete"
141+
@echo "${OK} Mypy checks passed ✨"
65142

66143
.PHONY: mypy-nocache
67-
mypy-nocache: ## Run Mypy without cache
68-
@echo "=> Running mypy without a cache"
144+
mypy-nocache: ## Run Mypy without cache
145+
@echo "${INFO} Running mypy without cache... 🔍"
69146
@uv run mypy
70-
@echo "=> mypy complete"
147+
@echo "${OK} Mypy checks passed ✨"
71148

72149
.PHONY: pyright
73-
pyright: ## Run pyright
74-
@echo "=> Running pyright"
150+
pyright: ## Run pyright
151+
@echo "${INFO} Running pyright... 🔍"
75152
@uv run pyright
76-
@echo "=> pyright complete"
153+
@echo "${OK} Pyright checks passed ✨"
77154

78155
.PHONY: type-check
79-
type-check: mypy pyright ## Run all type checking
156+
type-check: mypy pyright ## Run all type checking
157+
158+
# -----------------------------------------------------------------------------
159+
# Linting and Formatting
160+
# -----------------------------------------------------------------------------
80161

81162
.PHONY: pre-commit
82-
pre-commit: ## Runs pre-commit hooks; includes ruff formatting and linting, codespell
83-
@echo "=> Running pre-commit process"
84-
@uv run pre-commit run --all-files
85-
@echo "=> Pre-commit complete"
163+
pre-commit: ## Run pre-commit hooks
164+
@echo "${INFO} Running pre-commit checks... 🔎"
165+
@NODE_OPTIONS="--no-deprecation --disable-warning=ExperimentalWarning" uv run pre-commit run --color=always --all-files
166+
@echo "${OK} Pre-commit checks passed ✨"
86167

87168
.PHONY: slotscheck
88-
slotscheck: ## Run slotscheck
89-
@echo "=> Running slotscheck"
90-
@uv run slotscheck litestar_htmx/
91-
@echo "=> slotscheck complete"
92-
93-
.PHONY: lint
94-
lint: pre-commit type-check slotscheck ## Run all linting
169+
slotscheck: ## Run slotscheck
170+
@echo "${INFO} Running slots check... 🔍"
171+
@uv run slotscheck
172+
@echo "${OK} Slots check passed ✨"
95173

96-
.PHONY: coverage
97-
coverage: ## Run the tests and generate coverage report
98-
@echo "=> Running tests with coverage"
99-
@uv run pytest tests --cov -n auto
100-
@uv run coverage html
101-
@uv run coverage xml
102-
@echo "=> Coverage report generated"
174+
.PHONY: fix
175+
fix: ## Run code formatters
176+
@echo "${INFO} Running code formatters... 🔧"
177+
@uv run ruff check --fix --unsafe-fixes
178+
@echo "${OK} Code formatting complete ✨"
103179

104-
.PHONY: test
105-
test: ## Run the tests
106-
@echo "=> Running test cases"
107-
@uv run pytest tests
108-
@echo "=> Tests complete"
109-
110-
.PHONY: test-examples
111-
test-examples: ## Run the examples tests
112-
@uv run pytest docs/examples
113-
114-
.PHONY: test-all
115-
test-all: test test-examples ## Run all tests
180+
.PHONY: lint
181+
lint: pre-commit type-check slotscheck ## Run all linting checks
116182

117183
.PHONY: check-all
118-
check-all: lint test-all coverage ## Run all linting, tests, and coverage checks
119-
184+
check-all: lint test coverage ## Run all checks (lint, test, coverage)
120185

121186
# =============================================================================
122-
# Docs
187+
# Documentation
123188
# =============================================================================
124-
docs-clean: ## Dump the existing built docs
125-
@echo "=> Cleaning documentation build assets"
126-
@rm -rf docs/_build
127-
@echo "=> Removed existing documentation build assets"
128189

129-
docs-serve: docs-clean ## Serve the docs locally
130-
@echo "=> Serving documentation"
131-
uv run sphinx-autobuild docs docs/_build/ -j auto --watch litestar_htmx --watch docs --watch tests --watch CONTRIBUTING.rst --port 8002
190+
.PHONY: docs-clean
191+
docs-clean: ## Clean documentation build
192+
@echo "${INFO} Cleaning documentation build assets... 🧹"
193+
@rm -rf docs/_build >/dev/null 2>&1
194+
@echo "${OK} Documentation assets cleaned"
195+
196+
.PHONY: docs-serve
197+
docs-serve: docs-clean ## Serve documentation locally
198+
@echo "${INFO} Starting documentation server... 📚"
199+
@uv run sphinx-autobuild docs docs/_build/ -j auto --watch litestar_htmx --watch docs --watch tests --watch CONTRIBUTING.rst --port 8002
132200

133-
docs: docs-clean ## Dump the existing built docs and rebuild them
134-
@echo "=> Building documentation"
135-
@uv run sphinx-build -M html docs docs/_build/ -E -a -j auto -W --keep-going
201+
.PHONY: docs
202+
docs: docs-clean ## Build documentation
203+
@echo "${INFO} Building documentation... 📝"
204+
@uv run sphinx-build -M html docs docs/_build/ -E -a -j auto -W --keep-going >/dev/null 2>&1
205+
@echo "${OK} Documentation built successfully"
136206

137207
.PHONY: docs-linkcheck
138-
docs-linkcheck: ## Run the link check on the docs
208+
docs-linkcheck: ## Check documentation links
209+
@echo "${INFO} Checking documentation links... 🔗"
139210
@uv run sphinx-build -b linkcheck ./docs ./docs/_build -D linkcheck_ignore='http://.*','https://.*'
211+
@echo "${OK} Link check complete"
140212

141213
.PHONY: docs-linkcheck-full
142-
docs-linkcheck-full: ## Run the full link check on the docs
214+
docs-linkcheck-full: ## Run full documentation link check
215+
@echo "${INFO} Running full link check... 🔗"
143216
@uv run sphinx-build -b linkcheck ./docs ./docs/_build -D linkcheck_anchors=0
217+
@echo "${OK} Full link check complete"

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,18 @@ classifiers = [
1818
"Topic :: Software Development :: Libraries :: Python Modules",
1919
]
2020
dependencies = []
21-
description = "HTMX Integration for Litesstar"
21+
description = "HTMX Integration for Litestar"
2222
license = { text = "MIT" }
2323
maintainers = [
2424
{ name = "Litestar Developers", email = "[email protected]" },
2525
{ name = "Cody Fincher", email = "[email protected]" },
2626
{ name = "Jacob Coffee", email = "[email protected]" },
27-
{ name = "Janek Nouvertné", email = "[email protected]" },
28-
{ name = "Visakh Unnikrishnan", email = "[email protected]" },
29-
{ name = "Alc", email = "[email protected]" },
27+
{ name = "Janek Nouvertné", email = "[email protected]" },
3028
]
3129
name = "litestar-htmx"
3230
readme = "README.md"
33-
requires-python = ">=3.8, <4.0"
34-
version = "0.4.1"
31+
requires-python = ">=3.9, <4.0"
32+
version = "0.5.0"
3533

3634
[build-system]
3735
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)