Skip to content

Commit 8bf3110

Browse files
committed
chore(config): update project configuration and dependencies
- Add environment variable templates with PostgreSQL settings - Add database performance tuning variables - Add coverage configuration - Update Poetry dependencies - Update gitignore patterns for test artifacts - Add testing environment settings BREAKING CHANGE: Development environment now requires PostgreSQL configuration
1 parent b6b4b30 commit 8bf3110

File tree

4 files changed

+130
-1
lines changed

4 files changed

+130
-1
lines changed

.env.example

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PostgreSQL Configuration
2+
POSTGRES_USER=postgres
3+
POSTGRES_PASSWORD=postgres
4+
POSTGRES_DB=test_db
5+
POSTGRES_HOST=test-db
6+
POSTGRES_PORT=5432
7+
POSTGRES_EXTENSIONS=uuid-ossp,pgcrypto
8+
9+
# PostgreSQL Performance Tuning
10+
POSTGRES_MAX_CONNECTIONS=1000
11+
POSTGRES_SHARED_BUFFERS=128MB
12+
POSTGRES_FSYNC=off
13+
POSTGRES_SYNCHRONOUS_COMMIT=off
14+
POSTGRES_FULL_PAGE_WRITES=off
15+
16+
# Application Settings
17+
PYTHONPATH=/app
18+
PYTHONUNBUFFERED=1
19+
TESTING=1
20+
21+
# Coverage Settings
22+
COVERAGE_FILE=/app/coverage/.coverage
23+
COVERAGE_REPORT_HTML=/app/coverage/html/

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ htmlcov/
3030
coverage.xml
3131
.coverage.*
3232
coverage/
33+
test-results/
3334

3435
# Logs
3536
*.log
@@ -55,3 +56,8 @@ __pycache__/
5556
*.db
5657
*.sqlite
5758
*.sqlite3
59+
60+
# Environment variables
61+
.env
62+
.env.*
63+
!.env.example

poetry.lock

Lines changed: 94 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ python-multipart = "^0.0.6"
1616
structlog = "^24.1.0"
1717
prometheus-client = "^0.19.0"
1818
pydantic = {extras = ["email"], version = "^2.6.0"}
19+
pydantic-settings = "^2.1.0"
1920
passlib = {extras = ["bcrypt"], version = "^1.7.4"}
2021
sqlalchemy = "^2.0.25"
2122
bcrypt = "^4.1.2"
2223
psycopg2-binary = "^2.9.9"
2324
slowapi = "^0.1.8"
25+
alembic = "^1.14.0"
2426

2527
[tool.poetry.group.dev.dependencies]
2628
pytest = "^7.4.0"
29+
pytest-cov = "^4.1.0"
2730
black = "^24.1.0"
2831
coverage = "^7.4.0"
2932
python-semantic-release = "^9.15.0"
@@ -127,3 +130,7 @@ warn_unreachable = true
127130
strict_optional = true
128131
plugins = ["pydantic.mypy"]
129132
ignore_missing_imports = true
133+
134+
[tool.poetry.scripts]
135+
test = "pytest:main"
136+
test-cov = "coverage:main"

0 commit comments

Comments
 (0)