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

Use coverage erase and add htmlcov to .gitignore #288

Merged
merged 2 commits into from Feb 19, 2018

Conversation

@zuphilip
Copy link
Collaborator

@zuphilip zuphilip commented Dec 27, 2017

No description provided.

@@ -10,7 +10,7 @@ except ImportError:
print('\nYou need to install the coverage module first, e.g. \n$ pip2 install coverage\n')
exit(1)"

rm -rf .coverage*
$COVERAGE erase
PATH=$PWD:$PATH $COVERAGE run -p --include=$PWD/ocropus-*,$PWD/**/* ./tests/run-unit

This comment has been minimized.

@zuphilip

zuphilip Dec 27, 2017
Author Collaborator

Currently, the problem is that the import ocrolib in ./tests/run-unit will use the files in /usr/local/lib/python2.7/dist-packages/ocrolib/ and not the local one. I guess this is different for the ocropus-* scripts, because they are one directory level up. @kba Any ideas how to fix this? Do we have to adjust the PATH variable here?

This comment has been minimized.

@QuLogic

QuLogic Dec 28, 2017
Contributor

You can set [paths] in coverage config, then run coverage combine to flatten the paths into the first canonical path.

This comment has been minimized.

@zuphilip

zuphilip Dec 28, 2017
Author Collaborator

Thank you! Yes, that seems to work. I guess that the PATH construct can be deleted then as well...

@@ -10,7 +10,7 @@ except ImportError:
print('\nYou need to install the coverage module first, e.g. \n$ pip2 install coverage\n')
exit(1)"

rm -rf .coverage*
$COVERAGE erase
PATH=$PWD:$PATH $COVERAGE run -p --include=$PWD/ocropus-*,$PWD/**/* ./tests/run-unit
PATH=$PWD:$PATH RUNNER="$COVERAGE run -p --include=$PWD/ocropus-*,$PWD/**/*" ./run-test-ci

This comment has been minimized.

@zuphilip

zuphilip Dec 27, 2017
Author Collaborator

Do we need the include here? It works also without and maybe is better not to restrict that further...?

@kba kba merged commit 614a1a9 into ocropus:master Feb 19, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zuphilip zuphilip deleted the zuphilip:coverage-erase branch Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants