Second Iteration: Further Improvements
u-ways opened this issue · 1 comments
Background
Templates are great, but they quickly get out of date, and arguably you can get the same value by cloning a practical project as a template reference and then selectively pick what you care about when building a new project. On top of that, recent production usage highlighted several short comings as it didn't have a lot of features I would've expected from a "production-ready" template.
When I used this template for a recent project, a couple of boilerplate requirements were missed, for example, logging. Other things were related to testing, since this project did not interact with an external API, it didn't need to do any mocking/stubbing, and hence I had to introduce these on my own despite being a common requirement for many distributed systems.
Therefore, I am now interested to re-purpose this project to be something practical, something that allows me to showcase a production grade application, which is also well-documented so other users can easily copy. It doesn't have to be complex, but it should build towards a more complex objective than a simple FastAPI template.
Requirements
- Have some external API interactions.
- Demonstrate wiremock stubbing and other mocking techniques.
- Introduce logging with global configuration.
- Use Piny for configuration loader.
- Add test coverage reporter.
Other
- As always, CI/CD pipeline should be passing.
- Ensure new features are adequately documented.
- Could we use the
/metrics
endpoint to demonstrate some alerting as well? - When onboarding users unfamiliar with Python, hence no python 3.11 installed (Ubuntu 22.04), it was not a smooth experience, even on pychram (e.g. need to mark
src
as source,test
as test source, install missing drivers...etc) It would be nice if:- Project works out of the box in PyCharm (i.e. provide a single setup make recipe, commit then .gitignore a basic
.idea
dir, etc...) - Project works out of the box in VsCode (i.e. provide a single setup make recipe, commit then .gitignore a basic
.vscode
dir, etc...) - Works out of the box on Ubuntu 22.04.
- Works out of the box on MacOS.
- Project works out of the box in PyCharm (i.e. provide a single setup make recipe, commit then .gitignore a basic
Update: even further improvements spotted as per recently experience. This project will definitely be improved. 🙂