Python package project template.
-
Clone this project and rename.
git clone git@github.com:takelushi/py-pkg-template.git mv py-pkg-template <YOUR_REPOSITORY_NAME>
-
Setup repository.
# Create pyproject.toml bash setup.bash pyproject vi pyproject.toml # Name project. bash setup.bash name # Install packages vi dev-requirements.txt vi requirements.txt bash setup.bash package # Clean repository. bash setup.bash clean rm setup.bash
-
Integrate to CircleCI. (If you want)
- Requirements: poetry, pyenv
# Setup
poetry install
# Lint & Test
mkdir -p report
poetry run flake8 --format=html --htmldir=report/flake-report .
mypy src/ tests/ --html-report report/mypy
poetry run pytest \
--html=report/pytest/index.html\
--cov-report html:report/coverage
# Build and publish
poetry build
poetry publish