Python
Flask
Pytest
Git
GitHub
Branching
Flake8
PEP8
JSON database
In this Flask project, I focused on building a robust web application while implementing best practices such as branching, TDD (Test-Driven Development), and addressing core functionality issues.
Key Highlights:
This project exemplifies clean, tested code, robust debugging, and the implementation of features aimed at improving both user experience and system integrity.
1. Branching Strategy
The project followed a clear branching strategy with separate branches for:
This approach ensured a smooth workflow, allowing for iterative development and continuous integration without disrupting the main codebase.
2. Test-Driven Development (TDD) and Pytest
I adopted TDD to ensure the application was built with tests in mind from the beginning. Using pytest, I created both functional and integration tests, achieving a high test coverage of 99%. This was well above the 60% minimum requirement, with twice as many functional tests as integration tests. This comprehensive testing strategy ensured that both individual components and their interactions worked flawlessly.
3. Debugging and Error Handling
I implemented robust debugging tools, allowing the application to log error messages and handle exceptions gracefully. This ensured the application could recover from unexpected issues, and provided meaningful error messages to help trace the root causes of failures.
4. Pythonizing the Code
To follow Pythonic conventions, I refactored the code by changing camelCase variables to snake_case. This improved the readability and consistency of the codebase, adhering to Python’s best practices.
Issues Resolved from the Original GitHub Repository:
I addressed six major issues from the original GitHub repository:
5. JSON Database and Test Setup
The project uses a JSON database to manage data for clubs, competitions, and bookings. I also set up a dedicated tests folder, containing both functional and integration tests. This structure helped maintain clarity between different test types, with a clear distinction between unit tests for specific functions and broader integration tests that verified how the components worked together.