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

No description provided.

run-coverage Outdated
@@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

run-coverage Outdated
@@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-archive:master Feb 19, 2018
@zuphilip zuphilip deleted the coverage-erase branch February 19, 2018 22:18
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.

3 participants