This repository serves as a template for creating a general Python repository using Copier. It includes a basic file structure and some common dependencies for Python projects such as poetry, nox, pylint, mypy and pre-commit.
- Install Copier:
pip install copier
- Install Poetry:
curl -sSL https://install.python-poetry.org | python -
- Run the following command to create a new project using the template:
copier https://github.com/eloymg/python-templates.git <destination_path>
- Follow the prompts to provide a name and location for the new project.
- Once the project is created, navigate to the project directory and enable virtual enviroment using poetry:
poetry shell
The project uses Poetry for dependency management. To add/update/remove a dependency:
poetry add/update/remove <dependency>
The project uses Nox to automate common tasks such as linting, testing, and building. To see the available commands, run:
nox
This template also includes Pylint, Mypy and pre-commit for linting, type checking and commit hooks respectively, you can run them with nox or by invoking them directly:
pylint <files_path>
mypy <files_path>
pre-commit run --all-files
pytest
Please feel free to submit pull requests and issues.
This project is licensed under the MIT License - see the LICENSE file for details.