Skip to content

Misc Enhancements#17

Merged
jbouder merged 13 commits intomainfrom
misc-enh
Nov 5, 2025
Merged

Misc Enhancements#17
jbouder merged 13 commits intomainfrom
misc-enh

Conversation

@jbouder
Copy link
Contributor

@jbouder jbouder commented Nov 5, 2025

Description

  • Removed user endpoints, usually using keycloak so no need
  • Added doc strings as needed
  • Added base CORS middleware
  • Added default logger and logging throughout
  • Updated for postgres, in addition to sqlite
  • Fixed JWT validation, add caching
  • Fixed entity update logic
  • Fixed page count logic

Related Issue

N/A

Motivation and Context

  • Misc enhancements for more production workloads
  • Standardize codebase
  • Enhance developer experience

How Has This Been Tested?

  • Local Testing

Screenshots (if appropriate):

Copilot AI review requested due to automatic review settings November 5, 2025 13:56
@jbouder jbouder added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Nov 5, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the user management module and introduces several production-focused enhancements including PostgreSQL support, improved logging, CORS middleware, JWT validation fixes, and comprehensive docstrings. The changes standardize the codebase and improve developer experience by adding database initialization scripts and better error handling.

Key Changes

  • Removed user endpoints and related code (models, schemas, services, router, tests) since Keycloak handles user management
  • Added PostgreSQL database support with initialization scripts alongside existing SQLite support
  • Implemented application-wide logging with configurable log levels and added logging throughout services
  • Enhanced JWT validation with better error handling, improved JWKS retrieval, and proper HTTPBearer integration

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_users.py Deleted user-related tests
tests/conftest.py Removed user router registration and formatted function parameters
app/users/* Removed entire user module (models, schemas, router, services)
scripts/init_postgres.py Added PostgreSQL initialization script with database creation and migration support
scripts/init_db.sh Added shell wrapper for database initialization
app/main.py Added logging setup and CORS middleware configuration
app/auth.py Fixed JWT validation with proper error handling and HTTPBearer integration
app/db.py Added conditional database engine configuration for SQLite vs PostgreSQL
app/config.py Added LOG_LEVEL configuration setting
app/utils.py Added logging setup function and docstrings for pagination utilities
app/*/router.py Added comprehensive docstrings to all API endpoints
app/*/services.py Added logging and docstrings throughout service functions
app/*/schemas.py Added docstrings to Pydantic models
app/*/models.py Added docstrings to SQLAlchemy models
README.md Updated documentation with PostgreSQL setup instructions

Copy link
Contributor

Copilot AI commented Nov 5, 2025

@jbouder I've opened a new pull request, #18, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

@bapplejax bapplejax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jbouder jbouder merged commit 1972f02 into main Nov 5, 2025
7 checks passed
@jbouder jbouder deleted the misc-enh branch November 5, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants