11. Flow
With practice you will gradually memorize and automate many of the mechanisms or tests that you should always perform. Nevertheless, to smooth out the difficulty curve and help you speed up the process, I offer you a good workflow when facing the declaration of a new Endpoint. A guideline that nobody taught me at the time and that I would have been extremely grateful for.
- Document the Endpoints.
- Create test (It will fail)
- Define model.
- Define the view.
- Define Serializer.
- Register routes.
- Run test (It will pass successfully).
- Configure Admin.
If you work in a team, everything changes (just a little bit). You must incorporate Git and continuous integration, creating a solid and productive flow to kill bugs before they are born.
- You create a branch from develop with the name of the task.
- Document the Endpoints. We like Notion.
- Create test (It will fail). We work with Pytest.
- Define model.
- Configure the view.
- Define the Serializer.
- Register routes.
- Run a linter. We love Black.
- Run test (It will pass successfully).
- Configure Admin.
- Merge Request: Push the changes to the repository, creating a Merge Request and assigning a random teammate to review it.
- CI/CD: Automatically, CI/CD will check for conflicts, run the linter and tests again. If everything is fine, the changes will be deployed to the Staging (beta) server. Otherwise, the code is reviewed to see what failed. Gitlab is a blessing for this stage. The author of the Merge Request will automatically be notified by chat that their change has been integrated. Like many, we rely on Slack.
I hope you find it useful.
This work is under a Attribution-NonCommercial-NoDerivatives 4.0 International license.
Desafíos de programación atemporales y multiparadigmáticos
Te encuentras ante un librillo de actividades, divididas en 2 niveles de dificultad. Te enfrentarás a los casos más comunes que te puedes encontrar en pruebas técnicas o aprender conceptos elementales de programación.
Buy the bookWill you buy me a coffee?
This is how I keep writing without ads or paywalls.
Sure, it's on me!
Comments
There are no comments yet.