-
Notifications
You must be signed in to change notification settings - Fork 43
Project updates #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project updates #91
Conversation
There was a problem hiding this 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 pull request refactors the database initialization logic to simplify and standardize how the SQLAlchemy database is configured across the Flask application. The main changes streamline the database setup by removing the custom init_db wrapper functions and using direct SQLAlchemy initialization patterns instead.
- Removed custom database initialization wrapper functions and replaced with direct SQLAlchemy patterns
- Updated development environment to use Python-specific dev container with enhanced tooling
- Added Playwright auto-installation to frontend test script
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| server/utils/seed_database.py | Replaced init_db call with direct SQLAlchemy configuration and initialization |
| server/utils/database.py | Removed init_db function, simplified to expose only get_connection_string |
| server/tests/test_games.py | Updated test setup to use direct db.init_app instead of custom wrapper |
| server/models/init.py | Removed init_db function from models module |
| server/app.py | Replaced init_db call with direct SQLAlchemy configuration in main app |
| client/package.json | Added Playwright installation to e2e test script |
| .vscode/settings.json | Added spelling dictionary entries for new tooling |
| .github/dependabot.yml | Added devcontainers dependency management |
| .devcontainer/devcontainer.json | Switched to Python-specific container with Node.js, Playwright, and TypeScript features |
Files not reviewed (1)
- client/package-lock.json: Language not supported
|
|
||
| # Initialize in-memory database for testing | ||
| init_db(self.app, testing=True) | ||
| db.init_app(self.app) |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test setup is missing proper database teardown. According to the testing guidelines, tests should use db.engine.dispose() to properly close the database connection. Consider adding a tearDown method that calls db.engine.dispose() to ensure proper cleanup.
peckjon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
This pull request makes several improvements to the development environment and refactors the database initialization logic in the Python server codebase. The most significant changes are the switch to a Python-specific dev container with added features, updates to dependency management, and a simplification of how the database is configured and initialized.
Dev container and configuration improvements:
.devcontainer/devcontainer.jsonfrom a universal image to a Python 3.12 image, and added features for Node.js, Playwright, and TypeScript. Also updated port forwarding and removed the .NET feature. [1] [2].github/dependabot.ymlby introducing a weekly update schedule for the devcontainers ecosystem..vscode/settings.jsonto include additional devcontainer-related keywords and extensions for improved development experience.Database initialization refactor:
server/app.pyandserver/utils/seed_database.pyto use a newget_connection_stringhelper and directdb.init_appcalls, removing the custominit_dblogic. Also ensures tables are created on startup. [1] [2]init_dbfunction fromserver/models/__init__.pyandserver/utils/database.py, consolidating connection string logic intoget_connection_string. Adjusted tests inserver/tests/test_games.pyto use the new initialization pattern. [1] [2] [3] [4]Client dependency updates:
devalueandvitedependencies inclient/package-lock.jsonto newer versions for improved stability and security. [1] [2]test:e2escript inclient/package.jsonto ensure Playwright is installed before running tests, improving reliability of end-to-end testing.