Skip to content

Commit 77385c7

Browse files
committed
bump project deps
1 parent b0c7722 commit 77385c7

File tree

3 files changed

+233
-198
lines changed

3 files changed

+233
-198
lines changed

Makefile

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,104 @@
1+
# Set the default goal to "help" so that running "make" without arguments will display the help message.
2+
.DEFAULT_GOAL := help
3+
4+
# ====================================================================================
5+
# HELP
6+
# ====================================================================================
7+
# This target uses a combination of egrep, sort, and awk to parse the Makefile itself
8+
# and generate a formatted help message. It looks for lines containing '##' and
9+
# uses the text that follows as the help description for the target.
110
.PHONY: help
211
help: ## Show this help
312
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
413

14+
# ====================================================================================
15+
# DOCKER COMPOSE MANAGEMENT
16+
# ====================================================================================
517
.PHONY: docker-build
6-
docker-build: ## Build project with compose
18+
docker-build: ## Build project Docker images using compose
719
docker compose build
820

921
.PHONY: docker-up
1022
docker-up: ## Run project with compose
1123
docker compose up --remove-orphans
1224

1325
.PHONY: docker-clean
14-
docker-clean: ## Clean Reset project containers and volumes with compose
26+
docker-clean: ## Clean and reset project containers and volumes
1527
docker compose down -v --remove-orphans | true
1628
docker compose rm -f | true
1729
docker volume rm panettone_postgres_data | true
1830

31+
# ====================================================================================
32+
# DATABASE MIGRATIONS
33+
# ====================================================================================
1934
.PHONY: docker-apply-db-migrations
20-
docker-apply-db-migrations: ## apply alembic migrations to database/schema
35+
docker-apply-db-migrations: ## Apply alembic migrations to the database schema
2136
docker compose run --rm api1 alembic upgrade head
2237

2338
.PHONY: docker-create-db-migration
24-
docker-create-db-migration: ## Create new alembic database migration aka database revision. Example: make docker-create-db-migration msg="add users table"
39+
docker-create-db-migration: ## Create a new alembic database migration. Example: make docker-create-db-migration msg="add users table"
2540
docker compose up -d postgres | true
2641
docker compose run --no-deps api1 alembic revision --autogenerate -m "$(msg)"
2742

43+
# ====================================================================================
44+
# TESTING
45+
# ====================================================================================
2846
.PHONY: docker-test
2947
docker-test: ## Run project tests
3048
docker compose -f compose.yml -f test-compose.yml run --rm api1 pytest tests --durations=0 -vv
3149

3250
.PHONY: docker-test-snapshot
33-
docker-test-snapshot: ## Run project tests with inline snapshot
51+
docker-test-snapshot: ## Run project tests and update snapshots
3452
docker compose -f compose.yml -f test-compose.yml run --rm api1 pytest tests --inline-snapshot=fix
3553

54+
# ====================================================================================
55+
# CODE QUALITY & LINTING
56+
# ====================================================================================
3657
.PHONY: safety
37-
safety: ## Check project and dependencies with safety https://github.com/pyupio/safety
58+
safety: ## Check for insecure dependencies
3859
docker compose run --rm api1 safety check
3960

4061
.PHONY: py-upgrade
41-
py-upgrade: ## Upgrade project py files with pyupgrade library for python version 3.10
62+
py-upgrade: ## Upgrade Python syntax to a newer version
4263
pyupgrade --py313-plus `find api1 -name "*.py"`
4364

4465
.PHONY: lint
45-
lint: ## Lint project code.
66+
lint: ## Lint and format project code
4667
uv run ruff check --fix .
4768

69+
# ====================================================================================
70+
# DOCKER IMAGE BUILDING
71+
# ====================================================================================
4872
.PHONY: slim-build
49-
slim-build: ## with power of docker-slim build smaller and safer images
73+
slim-build: ## Build smaller and more secure Docker images with docker-slim
5074
docker-slim build --compose-file docker-compose.yml --target-compose-svc api1 --dep-include-target-compose-svc-deps true --http-probe-exec api1 fastapi-sqlalchemy-asyncpg_api1:latest
5175

76+
# ====================================================================================
77+
# DATABASE SEEDING
78+
# ====================================================================================
5279
.PHONY: docker-feed-database
53-
docker-feed-database: ## create database objects and insert data
80+
docker-feed-database: ## Create database objects and insert seed data
5481
docker compose exec postgres psql devdb devdb -f /home/gx/code/shakespeare_work.sql | true
5582
docker compose exec postgres psql devdb devdb -f /home/gx/code/shakespeare_chapter.sql | true
5683
docker compose exec postgres psql devdb devdb -f /home/gx/code/shakespeare_wordform.sql | true
5784
docker compose exec postgres psql devdb devdb -f /home/gx/code/shakespeare_character.sql | true
5885
docker compose exec postgres psql devdb devdb -f /home/gx/code/shakespeare_paragraph.sql | true
5986
docker compose exec postgres psql devdb devdb -f /home/gx/code/shakespeare_character_work.sql
6087

88+
# ====================================================================================
89+
# MODEL GENERATION
90+
# ====================================================================================
6191
.PHONY: model-generate
62-
model-generate: ## generate sqlalchemy models from database
92+
model-generate: ## Generate SQLAlchemy models from the database schema
6393
poetry run sqlacodegen --generator declarative postgresql://devdb:[email protected]/devdb --outfile models.py --schemas shakespeare --options nobidi
6494

95+
# ====================================================================================
96+
# ALTERNATIVE RUNTIMES
97+
# ====================================================================================
6598
.PHONY: docker-up-granian
66-
docker-up-granian: ## Run project with compose and granian
99+
docker-up-granian: ## Run project with compose and the Granian web server
67100
docker compose -f granian-compose.yml up --remove-orphans
68101

69102
.PHONY: docker-up-valkey
70-
docker-up-valkey: ## Run project with compose and valkey
103+
docker-up-valkey: ## Run project with compose and Valkey
71104
docker compose -f valkey-compose.yml up --remove-orphans

pyproject.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
[project]
22
name = "fastapi-sqlalchemy-asyncpg"
3-
version = "0.20.0"
3+
version = "0.21.0"
44
description = "A modern FastAPI application with SQLAlchemy 2.0 and AsyncPG for high-performance async database operations. Features include JWT authentication with Redis token storage, password hashing, connection pooling, data processing with Polars, Rich logging, task scheduling with APScheduler, and Shakespeare datasets integration."
55
readme = "README.md"
66
requires-python = ">=3.13"
77
dependencies = [
8-
"fastapi[all]>=0.116.1",
8+
"fastapi[all]>=0.116.2",
99
"pydantic[email]>=2.12.0a1",
1010
"pydantic-settings>=2.10.1",
1111
"sqlalchemy>=2.0.43",
12-
"uvicorn[standard]>=0.35.0",
12+
"uvicorn[standard]>=0.36.0",
1313
"asyncpg>=0.30.0",
14-
"alembic>=1.16.4",
14+
"alembic>=1.16.5",
1515
"httpx>=0.28.1",
16-
"pytest>=8.4.1",
17-
"pytest-cov>=6.2.1",
16+
"pytest>=8.4.2",
17+
"pytest-cov>=7.0.0",
1818
"uvloop>=0.21.0",
1919
"httptools>=0.6.4",
2020
"rich>=14.1.0",
2121
"pyjwt>=2.10.1",
2222
"redis>=6.4.0",
2323
"bcrypt>=4.3.0",
24-
"polars>=1.32.3",
24+
"polars>=1.33.1",
2525
"python-multipart>=0.0.20",
26-
"fastexcel>=0.14.0",
27-
"inline-snapshot>=0.27.2",
28-
"dirty-equals>=0.9.0",
26+
"fastexcel>=0.15.1",
27+
"inline-snapshot>=0.29.0",
28+
"dirty-equals>=0.10.0",
2929
"polyfactory>=2.22.2",
30-
"granian>=2.5.0",
30+
"granian>=2.5.4",
3131
"apscheduler[redis,sqlalchemy]>=4.0.0a6",
3232
"rotoger",
3333
]
3434

3535
[tool.uv]
3636
dev-dependencies = [
37-
"ruff>=0.12.10",
37+
"ruff>=0.13.1",
3838
"devtools[pygments]>=0.12.2",
3939
"pyupgrade>=3.20.0",
40-
"ipython>=9.4.0",
41-
"sqlacodegen<=3.1.0",
40+
"ipython>=9.5.0",
41+
"sqlacodegen<=3.1.1",
4242
"tryceratops>=2.4.1",
43-
"locust>=2.39.0"
43+
"locust>=2.40.5"
4444

4545
]
4646

0 commit comments

Comments
 (0)