What do I need to install

  • tox : virtualenv for testing
  • tox-pyenv : pyenv plugin for tox
  • pytest : testing framework
  • pipreqs : generates requirements.txt

What do I need to do

  1. Checkout cookiecutter

  2. create virtualenv using pyenv

$ pyenv install "some versions"
$ pip install tox tox-pyenv
$ pyenv local "my_env" "some versions"
  1. create src directory and change some settings

    • Why I use src/ directory?
      • Check Hynek’s post
  2. As the post says, modify setup.py

Example of executing tox

$ pyenv install 3.8.2
$ pyenv virtualenv -p Python3.8 3.8.2 my_env
$ pip install tox tox-pyenv
$ pyenv local my_env 3.8.2

write code and tests then

$ pipreqs .
$ pip install -e .
$ tox