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

investigate diff-cover #251

Closed
mr-c opened this issue Dec 26, 2013 · 13 comments
Closed

investigate diff-cover #251

mr-c opened this issue Dec 26, 2013 · 13 comments

Comments

@mr-c
Copy link
Contributor

mr-c commented Dec 26, 2013

"Now you can measure code coverage (& pep8+pylint) one commit at a time: diff-cover!
http://engineering.edx.org/2013/12/diff-cover-test-coverage-for-git-commits/

http://twitter.com/nedbat/status/415239902088155136"

@mr-c mr-c modified the milestones: 1.1+ Release, 1.0 release Apr 2, 2014
@mr-c
Copy link
Contributor Author

mr-c commented May 27, 2014

See #333 which needs adding to the docs

@ctb
Copy link
Member

ctb commented May 29, 2014

je ne comprens pas -- what does this have to do with #333, specifically?

@mr-c
Copy link
Contributor Author

mr-c commented May 29, 2014

I documented how to use a tool similiar to diff-cover in #333 (comment).

@mr-c
Copy link
Contributor Author

mr-c commented May 29, 2014

To use diff cover:

pip install diff_cover
make clean coverage-debug coverage-gcovr.xml .coverage
diff-cover coverage.xml coverage-gcovr.xml
# or
diff-cover coverage.xml coverage-gcovr.xml --html-report diff-cover-report.html

@ctb
Copy link
Member

ctb commented May 30, 2014

NB -- On athyra, the 'make' command produced nosetests.xml, not coverage.xml.

@ctb
Copy link
Member

ctb commented May 30, 2014

OK, I'm clearly unclear on some of the details :). I'm guessing I need to produce two coverage XML files from different branches, first.

@mr-c
Copy link
Contributor Author

mr-c commented May 30, 2014

@ctb The new 'diff-cover' target should clear up any problems.

@mr-c mr-c modified the milestones: v1.0.2, 1.0.3+ Release Jun 11, 2014
@ctb
Copy link
Member

ctb commented Jun 13, 2014

@mr-c everything seems to work, but I still don't understand how to use the 'diff-cover' target; this will need documenting somewhere, which will be part of #440, I'm guessing. Anything else to be done on this issue?

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

Does make diff-cover and make diff-cover.html not work for you?

@ctb
Copy link
Member

ctb commented Jun 13, 2014

On Fri, Jun 13, 2014 at 10:55:40AM -0700, Michael R. Crusoe wrote:

Does make diff-cover and make diff-cover.html not work for you?

It does but I'm not sure what it's supposed to be diffing against.
The master branch, maybe?

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

The diff-cover target calculates test coverage metrics for the entire
project and then only reports those source lines who lack coverage and have
been modified between the current git branch and origin/master.

On Fri, Jun 13, 2014 at 1:57 PM, C. Titus Brown notifications@github.com
wrote:

On Fri, Jun 13, 2014 at 10:55:40AM -0700, Michael R. Crusoe wrote:

Does make diff-cover and make diff-cover.html not work for you?

It does but I'm not sure what it's supposed to be diffing against.
The master branch, maybe?


Reply to this email directly or view it on GitHub
#251 (comment).

@ctb
Copy link
Member

ctb commented Jun 13, 2014

On Fri, Jun 13, 2014 at 11:01:35AM -0700, Michael R. Crusoe wrote:

The diff-cover target calculates test coverage metrics for the entire
project and then only reports those source lines who lack coverage and have
been modified between the current git branch and origin/master.

Hey, look, documentation! thanks, I'll take another. Do we need to run
anything on origin/master first, or is that automagically updated somehow?
If there's more to the workflow than a 'make diff-cover' please let me
know.

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

You are welcome.

make diff-cover is sufficient for almost every circumstance as it uses
the local repository's knowledge of origin. We could add an automatic git fetch origin to the Makefile target.

On Fri, Jun 13, 2014 at 2:04 PM, C. Titus Brown notifications@github.com
wrote:

On Fri, Jun 13, 2014 at 11:01:35AM -0700, Michael R. Crusoe wrote:

The diff-cover target calculates test coverage metrics for the entire
project and then only reports those source lines who lack coverage and
have
been modified between the current git branch and origin/master.

Hey, look, documentation! thanks, I'll take another. Do we need to run
anything on origin/master first, or is that automagically updated somehow?
If there's more to the workflow than a 'make diff-cover' please let me
know.


Reply to this email directly or view it on GitHub
#251 (comment).

@ctb ctb closed this as completed Jun 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants