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

Merge cov-core and pytest-cov packages and other fixes #58

Merged
merged 47 commits into from Jul 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a793976
Initial relayouting.
ionelmc Jun 5, 2015
906926d
Move this.
ionelmc Jun 5, 2015
ebc6a99
More relayouting
ionelmc Jun 5, 2015
ecdf3bf
Complete project structure.
ionelmc Jun 5, 2015
f1e0bd3
More corrections.
ionelmc Jun 5, 2015
c9731ab
Update setup.py to have the new pth handling and layout support.
ionelmc Jun 5, 2015
a6c5fa6
Remove --cov-source and fix --cov without arg to activate coverage (w…
ionelmc Jun 5, 2015
ca12e6b
Fix imports.
ionelmc Jun 5, 2015
0fdd8a3
Update readme about the --cov arg.
ionelmc Jun 5, 2015
a4a0d0a
Packaging fixes.
ionelmc Jun 5, 2015
d4681d5
Add missing deps.
ionelmc Jun 5, 2015
3dd5f86
Add pth files.
ionelmc Jun 5, 2015
9489bb5
Fix config.getvalue check.
ionelmc Jun 5, 2015
742baa7
Fix heading levels and correct names.
ionelmc Jun 5, 2015
a208b92
Fix test on python 2.6.
ionelmc Jun 5, 2015
d935aa5
Remove un-necessary tox envs.
ionelmc Jun 5, 2015
d73b543
Update changelog and authorship.
ionelmc Jun 5, 2015
004c99d
Fix manifest.
ionelmc Jun 5, 2015
12b2abc
Update target version
ionelmc Jun 5, 2015
824aa4f
Use os.pathsep instead of some arbitrary string. Make things easier t…
ionelmc Jun 5, 2015
4974160
Move the multiprocessing fixups in embed.py. Fixes circular import is…
ionelmc Jun 5, 2015
d8a12d9
Update CI conf.
ionelmc Jun 5, 2015
308f61f
Add missing deps.
ionelmc Jun 6, 2015
e807665
Test coverage 4.0 too. Loosen up a bit the tests (seems that in the r…
ionelmc Jun 6, 2015
e450a1c
Update changelog.
ionelmc Jun 6, 2015
1c62766
Add .env to ignores.
ionelmc Jun 18, 2015
e6b3088
Change a bit test_central_nonspecific and the test to actually trigge…
ionelmc Jun 18, 2015
e74f7d7
Reformat.
ionelmc Jun 20, 2015
7ee700f
Change a bit the test so the external code is non-stdlib.
ionelmc Jun 20, 2015
2f9c530
Use a helper module in a different location to test that inclue paths…
ionelmc Jun 20, 2015
8c4c5b8
Use new 4.0 release.
ionelmc Jun 21, 2015
098ed9b
Test that --cov-report=term will report missing lines if .coveragerc …
ionelmc Jun 28, 2015
9841727
If `term-missing` is not specified then use `None` instead of `False`…
ionelmc Jun 28, 2015
97e4b22
Load default cov_min from `[report]fail_under` (if coverage is 4.0). …
ionelmc Jun 28, 2015
10a54f1
Rename --cov-min to --cov-fail-under.
ionelmc Jun 28, 2015
90a6e35
Update changelog. Closes #1. Closes #2.
ionelmc Jun 28, 2015
cbebaa3
Update skel a bit.
ionelmc Jun 28, 2015
076045f
Fix incorrect renaming.
ionelmc Jun 28, 2015
781a9e9
Update changelog.
ionelmc Jun 29, 2015
c25b996
Unicodes
ionelmc Jun 29, 2015
2cfebe5
Fix version.
ionelmc Jun 29, 2015
3439cf4
Bump version: 1.0.0 → 2.0.0
ionelmc Jun 29, 2015
c1f29b5
Unfork project (rename back to pytest-cov).
ionelmc Jun 30, 2015
87d77b2
Remove release date (not released yet).
ionelmc Jul 4, 2015
a2cd060
Allow overriding interpreter from env (eg: for AppVeyor where there a…
ionelmc Jul 4, 2015
8c5859b
Remove some un-necessary cruft.
ionelmc Jul 5, 2015
5b91aff
Extend the changelog with some of the changes mentioned in #28.
ionelmc Jul 5, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions .coveragerc
@@ -0,0 +1,12 @@
[paths]
source = src

[run]
branch = True
source = src
parallel = true

[report]
show_missing = true
precision = 2
omit = *migrations*
61 changes: 58 additions & 3 deletions .gitignore
@@ -1,5 +1,60 @@
.tox/
*.egg-info/
*.py[cod]

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
venv*/
pyvenv*/

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
.coverage.*
*.pyc
nosetests.xml
htmlcov

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.idea
*.iml
*.komodoproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build

.DS_Store
*~
.*.sw[po]
.build
.ve
.env
.cache
.pytest
.bootstrap
*.bak
60 changes: 24 additions & 36 deletions .travis.yml
@@ -1,45 +1,33 @@
language: python

python: 2.7

env:
- CWD=. TOX_ENV=flake8

- CWD=pytest-cov TOX_ENV=pypy COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=pypy3 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py26 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py27 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py32 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py33 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py34 COV_CORE_DEP=../cov-core

- CWD=pytest-cov TOX_ENV=pypy COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=pypy3 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py26 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py27 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py32 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py33 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py34 COV_CORE_DEP=cov-core

matrix:
allow_failures:
- env: CWD=pytest-cov TOX_ENV=pypy COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=pypy3 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py26 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py27 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py32 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py33 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py34 COV_CORE_DEP=cov-core

sudo: false

env:
global:
LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
matrix:
- TOXENV=check
- TOXENV=2.6-37
- TOXENV=2.7-37
- TOXENV=3.3-37
- TOXENV=3.4-37
- TOXENV=pypy-37
- TOXENV=2.6-40
- TOXENV=2.7-40
- TOXENV=3.3-40
- TOXENV=3.4-40
- TOXENV=pypy-40
before_install:
- python --version
- virtualenv --version
- pip --version
- uname -a
- lsb_release -a
install:
- pip install tox

script:
- cd $CWD && tox -e $TOX_ENV

- tox -v
notifications:
email:
on_success: never
on_failure: change
on_failure: always

13 changes: 13 additions & 0 deletions AUTHORS.rst
@@ -0,0 +1,13 @@
Authors
=======

* Marc Schlaich - http://www.schlamar.org/
* Rick van Hattem - http://wol.ph/
* Buck Evan - https://github.com/bukzor
* Eric Larson - http://larsoner.com/
* Marc Abramowitz - http://marc-abramowitz.com/
* Thomas Kluyver - https://github.com/takluyver
* Guillaume Ayoub - http://www.yabz.fr/
* Federico Ceratto - http://firelet.net/
* Josh Kalderimis - http://blog.cookiestack.com/
* Ionel Cristian Mărieș - http://blog.ionelmc.ro
22 changes: 22 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,22 @@
Changelog
=========

2.0.0 (??????????)
------------------

* Added ``--cov-fail-under``, akin to the new ``fail_under`` option in `coverage-4.0`
(automatically activated if there's a ``[report] fail_under = ...`` in ``.coveragerc``).
* Changed ``--cov-report=term`` to automatically upgrade to ``--cov-report=term-missing``
if there's ``[run] show_missing = True`` in ``.coveragerc``.
* Changed ``--cov`` so it can be used with no path argument (in wich case the source
settings from ``.coveragerc`` will be used instead).
* Fixed `.pth` installation to work in all cases (install, easy_install, wheels, develop etc).
* Fixed `.pth` uninstallation to work for wheel installs.
* Support for coverage 4.0.
* Data file suffixing changed to use coverage's ``data_suffix=True`` option (instead of the
custom suffixing).

1.8.2 (2014-11-06)
------------------

* N/A
89 changes: 89 additions & 0 deletions CONTRIBUTING.rst
@@ -0,0 +1,89 @@
============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

Bug reports
===========

When `reporting a bug <https://github.com/schlamar/pytest-cov/issues>`_ please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Documentation improvements
==========================

pytest-cov could always use more documentation, whether as part of the
official pytest-cov docs, in docstrings, or even on the web in blog posts,
articles, and such.

Feature requests and feedback
=============================

The best way to send feedback is to file an issue at https://github.com/schlamar/pytest-cov/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions are welcome :)

Development
===========

To set up `pytest-cov` for local development:

1. `Fork pytest-cov on GitHub <https://github.com/schlamar/pytest-cov/fork>`_.
2. Clone your fork locally::

git clone git@github.com:your_name_here/pytest-cov.git

3. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.org/en/latest/install.html>`_ one command::

tox

5. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature

6. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------

If you need some code review or feedback while you're developing the code just make the pull request.

For merging, you should:

1. Include passing tests (run ``tox``) [1]_.
2. Update documentation when there's new API, functionality etc.
3. Add a note to ``CHANGELOG.rst`` about the changes.
4. Add yourself to ``AUTHORS.rst``.

.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
`run the tests <https://travis-ci.org/schlamar/pytest-cov/pull_requests>`_ for each change you add in the pull request.

It will be slower though ...

Tips
----

To run a subset of tests::

tox -e envname -- py.test -k test_myfeature

To run all the test environments in *parallel* (you need to ``pip install detox``)::

detox
File renamed without changes.
21 changes: 21 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,21 @@
graft docs
graft example
graft src
graft ci
graft tests

include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .isort.cfg
include .pylintrc

include AUTHORS.rst
include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst

include tox.ini .travis.yml appveyor.yml

global-exclude *.py[cod] __pycache__ *.so