Skip to content

91nunocosta/template-pyproject

Repository files navigation

Template PyProject

Template PyProject

Installation

pip install template-pyproject

Usage

>>> from template_pyproject import fib
>>> fib(0)
0

For more details, read the documentation.

Development

Preparing the development environment

If you want to test or change the source code, prepare your local environment.

  1. Clone the repository.

    git clone git@github.com:91nunocosta/template-pyproject.git
  2. Open the project directory.

    cd template-pyproject
  3. Install poetry package and dependency manager. Follow the poetry installation guide. Chose the method that is more convenient to you, for example:

    curl -sSL\
         https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py \
       | python -
  4. Create a new virtual environment (managed by poetry) with the project dependencies.

    poetry install --with dev
  5. Enter the virtual environment.

    poetry shell
  6. Install pre-commit verifications.

    pre-commit install -t pre-commit -t pre-push -t commit-msg

Pre-commit

Pre-commit runs the linters and tests configured in .pre-commit-config.yaml. You can check the pre-commit phase locally:

  1. Prepare the development environment, as described in Preparing the development environment.

  2. Run pre-commit with all files.

pre-commit run --all-files

Tests

Tests are executed by tox.ini. You can check the tox phase locally:

  1. Prepare the development environment, as described in Preparing the development environment.

  2. Run tox.

tox

About

A dummy prototype package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages