Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setup/install/test boilerplate #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamezpolley
Copy link

  • Use pbr, which allows for a declarative config in setup.cfg instead of programmatic in setup.py
  • Use tox and testr for running tests
  • Auto-generate travis config from tox

As a result, a developer can now simply run "tox" on the local machine and test in as many python versions as they have available - and Travis will run the same tests.

pbr reads install_requires from requirements.txt, so we can add argparse and funcsigs there (protected by environment markers so that they're only installed if required)

When pbr runs it will, by default, try to autogenerate an AUTHORS file and a CHANGELOG from the git logs. This can be disabled by exporting SKIP_GENERATE_AUTHORS=1 and SKIP_WRITE_GIT_CHANGELOG=1 before running setup.py

I'm not sure if the Requirements section of the docs is really required;
but assuming that it is, I've added a couple of words to make it clear
that the mentioned dependencies are only installed if required.
Begins removes lots of argparse boilerplate; pbr removes lots of
setup.py boilerplate.
This enables easier testing across multiple versions of python.

Using this, I've been able to confirm that 117 tests pass on py26 and
py27, with 122 passing on py3.3 and py3.4 (I don't have py3.3 available)

Travis config is now done mostly automatically via tox-travis
@jamezpolley
Copy link
Author

This is quite a substantial change - and pbr and tox aren't exactly easy to wrap one's head around. My apologies for the braindump!

@jamezpolley
Copy link
Author

This removes the coverage testing, which is presumably not what we want to do.

http://lists.idyll.org/pipermail/testing-in-python/2014-November/006224.html suggests a way to restore the coverage testing - and still get the benefits of tox (eg, easily testing on multiple versions of python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant