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

improve configuration of setuptools, tox and travis #38

Merged
merged 3 commits into from
Mar 10, 2017
Merged

improve configuration of setuptools, tox and travis #38

merged 3 commits into from
Mar 10, 2017

Conversation

mbukatov
Copy link
Contributor

@mbukatov mbukatov commented Mar 2, 2017

This pull request updates tendrl-alerting based on improvements added into tendrl-commons recently.

Quick summary:

  • I moved requirements.txt into install_requires of setup.py, while keeping requirements.txt files for CI/development purposes, see https://caremad.io/posts/2013/07/setup-vs-requirement/ for explanation.
  • I updated tox.ini consolidating multiple test environments into single description
  • I updated Travis CI configuration, it runs py27-cover-{master,develop} environments now. We could enable py26 and py34 again when issues with these are fixed in tendrl-commons.

tendrl-bug-id: #37

Option install_requires in setup.py contains names of all python modules
tednrl-alerting depends on, including tendrl-alerting.

For development and CI purposes, there are requirements.txt files as
well. The main difference between them is the github branch they use to
install other tendrl components from:

* requirements.develop.txt (uses develop branch)
* requirements.master.txt (uses master branch)

So in CI or development enviroment, one can install tendrl-alerting
into virtualenv like this::

    pip install -r requirements.master.txt

Based on description from:

* https://packaging.python.org/requirements/
* https://caremad.io/posts/2013/07/setup-vs-requirement/

tendrl-bug-id: #17
tendrl-bug-id: #18
tendrl-bug-id: #37
This commit moves desctiption of all test enviroments into single
description using "conditional settings". To make this simple,
pytest-cov report is executed every time, but ``codecov`` is
installed and run only for test enviroments with "cover" factor.

Morever another "conditional setting" is used to distinguish between
testing with tendrl-commons from master or develop branch.

So Travis CI would executed environment with "cover" factor
with tendrl-commons from master branch like this::

    tox -e py27-cover-master

while developer working on a feature can locally execute test
run without executing ``codecov`` against tendrl-commons from develop
branch like this::

    tox -e py27-develop

Full test matrix would be::

    tox -e {py26,py27,py34}-{master,develop}

tendrl-bug-id: #37
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.

None yet

2 participants