Generic Python template for new projects.
- Pylint: A static code analyzer that helps enforce a coding standard and find programming errors, helping to maintain code quality.
- Black: An uncompromising code formatter that ensures code consistency by automatically formatting Python code to conform to the PEP 8 style guide.
- MyPy: A static type checker that checks the type annotations in your Python code, helping catch type-related errors early in the development process.
- Pytest: A powerful testing framework that makes it easy to write simple and scalable test cases, facilitating robust test coverage and quick feedback on code changes.
- Pre-commit: A framework for managing and maintaining multi-language pre-commit hooks, ensuring that code quality checks are performed automatically before every commit.
- editorconfig: A configuration file that helps maintain consistent coding styles across different editors and IDEs.
-
git clone
this repository. -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
-
Install the pre-commit hooks:
pre-commit install
-
Lint: Run Pylint to check for code quality issues:
pylint src/
-
Format: Run Black to format the code according to the PEP 8 style guide:
black src/
-
Type Check: Run MyPy to check for type-related errors:
mypy src/
-
Test: Run Pytest to execute the test cases:
pytest