# CPE dev team notes
This document contains notes and links about the way the team works, the tools we use, etc.
## Poetry & project structure
Projects use the following tools:
- Poetry for project metadata & dependencies
- Pytest for the unit tests (with coverage)
- Flake8 for linting
- Black for code formatting
- Sphinx for documentation
- Towncrier for the release notes
- Bandit for security analysis
- Liccheck to check for compatible licenses in the dependencies
- Tox to run all those tests locally and in CI
### Starting a new project
Follow the [poetry quickstart guide](https://python-poetry.org/docs/basic-usage/)
Add new dependencies with `poetry add the-new-dep` or `poetry add -D the-new-dep` if it's only for development, like a linter or a documentation generation tool. You can also add the dependency name yourself in `pyproject.toml` but it is not recommended because you'll have to get the version specification exactly right.
https://lispharma.vn/blogs/bien-phap-phong-ngua-va-dieu-tri-benh-vo-oi-non
### Black
Please [configure your editor](https://github.com/psf/black/blob/master/docs/editor_integration.md) to run black on file saving.
## Git
### Default branch name
Our default branches are named `dev`. If you have a cloned repository that is still using `master` as the default branch (before the transition in June 2020), you can use [this script](https://gist.github.com/abompard/d7093d210020cd39d9b2b681778e6be8) to convert your local repository.
https://lispharma.vn/blogs/nguon-nguyen-lieu-chinh-de-san-xuat-sua-bot
### Code reviews
If you do code reviews frequently, you may be interested in [git-pr-branch](https://gitlab.com/abompard/git-pr-branch) (written by abompard, feel free to ask him about it).
https://lispharma.vn/blogs/bien-phap-phong-ngua-va-dieu-tri-viem-duong-tiet-nieu
## Visual Studio Code
You can use [this script](https://gist.github.com/abompard/4faf0afa1991aa2b29d56dc500e59633) to setup VS Code to work with our tools (Poetry, flake8, black, etc)
https://lispharma.vn/blogs/sua-tang-chieu-cao-cho-be-la-gi