# Tandero Review
Consider the following comments:
* Descriptive documentation on `README.md` or `docs/`:
* Should contain a general description of the project.
* Should contain a step-by-step guide for first-setup.
* Should contain a step-by-step guide for testing.
* Should contain collaboration instructions and license.
* Focus on reproducibility:
* Use environment variables to set up the project!
* Application secrets and other variables can be placed in a `.env` file. You can load the `.env` with `export $(cat .env | xargs)`.
* Avoid hard-coding sensible data into the application! (`SECRET_KEY`, database-passwords, etc)
* Consider which other variables can be defined using environment variables (e.g. `DEBUG=true`).
* Leverage python virtual-environments!
* Use python virtualenv to isolate the dependencies (standalone python application): https://virtualenv.pypa.io/en/latest/
* Create a `requirements.txt` file with all the dependencies (libraries + versions).
* First-setup should reference these resources.
* Use a version control system (github).
* Use development environments: `dev`, `stg`, `prd`.
* Spin off branches from `dev` to implement new features.
* Stick to a "feature per branch".
* A complete feature should be testable!
* Use PRs to merge from the feature-brach back to the `dev` branch.
* Periodic PRs from `dev -> stg` and from `stg -> prd`.
* (optional) Dockerize the application!
* Use docker to encapsulate dependencies.
* Define a docker-image for the Django project.
* Use docker-compose to manage external services (e.g., databases)
* Idiomatic Django/python
* Remember that methods defined in a python class should contain a `self` as the first argument: `def method_name(self, arg1, arg2, ...)`
* To create static-methods use the `@staticmethod` decorator.
* Each Django application contains a `test.py` file to do unit-testing.
* Configure the logging module! https://docs.djangoproject.com/en/2.2/topics/logging/
* Follow the PEP8 style guide: https://www.python.org/dev/peps/pep-0008/
* Note that python is usually written with the snake-case convention instead of camel-case.
* Distribute python tasks!
* Consider using `celery` to distribute python tasks:
* Standalone: http://www.celeryproject.org/
* Django + Celery: https://docs.celeryproject.org/en/latest/django/first-steps-with-django.html
* Redis brocker is recommended (you can add this service in the docker-compose file).