This is meant to be a base for a Python package with infrastructure based on:
setuptools
for installationsetuptools_scm
for versioningtox
andpy.test
for testingflake8
for static code analysis
Clone, copy everything (but the .git
directory, of course) into your package
and make foo
anything you want!
Remember about adjusting at least:
setup.py
(name, description, dependencies and classifiers)setup.cfg
(exclude
forflake8
)tox.ini
(supported Python versions).coveragerc
(name of your package)- this
README
- cut this section out and update the rest!
Foorther description of what is foo.
Run tests on all Python versions specified in tox.ini
(2.7, 3.4 and 3.5); you
must, of course, have tox
installed.
tox
If you want to use py.test
or flake8
directly (useful for development),
install dependencies first:
pip install -e .[tests]
Note: if you use virtualenv
and have py.test
installed system-wide, you
must re-activate this virtualenv; otherwise, system-wide py.test
will be
used, which will most likely result in import errors.
Then you can e.g.
py.test -sv --cov
flake8