(Note) Tox workflow
(Note) Tox workflow
What do I need to install
tox: virtualenv for testingtox-pyenv:pyenvplugin fortoxpytest: testing frameworkpipreqs: generatesrequirements.txt
What do I need to do
Checkout
cookiecuttercreate virtualenv using pyenv
1
2
3
$ pyenv install "some versions"
$ pip install tox tox-pyenv
$ pyenv local "my_env" "some versions"
create
srcdirectory and change some settings- Why I use
src/directory?- Check Hynek’s post
- Why I use
As the post says, modify
setup.py
Example of executing tox
1
2
3
4
$ 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
1
2
3
$ pipreqs .
$ pip install -e .
$ tox
This post is licensed under CC BY 4.0 by the author.