Skip to content

Commit

Permalink
chore(config): update project configuration and dependencies
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
gsinghjay committed Jan 3, 2025
1 parent b6b4b30 commit 8bf3110
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PostgreSQL Configuration
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=test_db
POSTGRES_HOST=test-db
POSTGRES_PORT=5432
POSTGRES_EXTENSIONS=uuid-ossp,pgcrypto

# PostgreSQL Performance Tuning
POSTGRES_MAX_CONNECTIONS=1000
POSTGRES_SHARED_BUFFERS=128MB
POSTGRES_FSYNC=off
POSTGRES_SYNCHRONOUS_COMMIT=off
POSTGRES_FULL_PAGE_WRITES=off

# Application Settings
PYTHONPATH=/app
PYTHONUNBUFFERED=1
TESTING=1

# Coverage Settings
COVERAGE_FILE=/app/coverage/.coverage
COVERAGE_REPORT_HTML=/app/coverage/html/
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ htmlcov/
coverage.xml
.coverage.*
coverage/
test-results/

# Logs
*.log
Expand All @@ -55,3 +56,8 @@ __pycache__/
*.db
*.sqlite
*.sqlite3

# Environment variables
.env
.env.*
!.env.example
95 changes: 94 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ python-multipart = "^0.0.6"
structlog = "^24.1.0"
prometheus-client = "^0.19.0"
pydantic = {extras = ["email"], version = "^2.6.0"}
pydantic-settings = "^2.1.0"
passlib = {extras = ["bcrypt"], version = "^1.7.4"}
sqlalchemy = "^2.0.25"
bcrypt = "^4.1.2"
psycopg2-binary = "^2.9.9"
slowapi = "^0.1.8"
alembic = "^1.14.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
black = "^24.1.0"
coverage = "^7.4.0"
python-semantic-release = "^9.15.0"
Expand Down Expand Up @@ -127,3 +130,7 @@ warn_unreachable = true
strict_optional = true
plugins = ["pydantic.mypy"]
ignore_missing_imports = true

[tool.poetry.scripts]
test = "pytest:main"
test-cov = "coverage:main"

0 comments on commit 8bf3110

Please sign in to comment.