Fix Flask app module-level initialization #110

Closed
opened 2026-05-04 13:49:56 +00:00 by jgroman · 0 comments
Owner

The app in its present state gets initialized when any code does import testdays or from testdays import ....
This creates tight module coupling and introduces various problems preventing selective imports, overcomplicating external consumers or testing harnesses.
The app should be refactored using Flask recommended application factory pattern which would unblock clean model reuse (for MCP server, CLI scripts etc.) and testing.

The app in its present state gets initialized when any code does `import testdays` or `from testdays import ...`. This creates tight module coupling and introduces various problems preventing selective imports, overcomplicating external consumers or testing harnesses. The app should be refactored using Flask recommended [application factory pattern](https://flask.palletsprojects.com/en/stable/patterns/appfactories/) which would unblock clean model reuse (for MCP server, CLI scripts etc.) and testing.
jgroman self-assigned this 2026-05-04 13:49:56 +00:00
jgroman added this to the Sprint 9 project 2026-05-04 13:50:53 +00:00
kparal self-assigned this 2026-05-07 15:15:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
quality/testdays-web#110
No description provided.