- Includes personal selection of code quality tools and pre-commit hooks
- Uses line length of 120 for formatters and linters
- Rename
mypackage
directory - Update
pyproject.toml
with correct metadata - Create
CHANGELOG.md
according to KeepAChangelog.com and start updating version in__version__.py
python3.11 -m venv venv
source venv/bin/activate.fish
make initdev
make initdev
- install dev dependenciesmake test
- run testsmake lint
- run lintersmake format
- run formatters (runs in pre-commit hook)
Extra extensions: ruff, mypy, black, pytest
Make sure they are running "fromEnvironment"
Setting that I like to have that integrate VSCode with code quality tools
{
"files.autoSave": "onFocusChange",
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.defaultFormatter": "ms-python.black-formatter",
},
"editor.rulers": [
120
],
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"mypy-type-checker.importStrategy": "fromEnvironment",
"black-formatter.importStrategy": "fromEnvironment",
}
See GitHub Actions for details
TODO