Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Use coverage erase and add htmlcov to .gitignore - #288

Merged
kba merged 2 commits into
ocropus-archive:masterfrom
zuphilip:coverage-erase
Feb 19, 2018
Merged

Use coverage erase and add htmlcov to .gitignore#288
kba merged 2 commits into
ocropus-archive:masterfrom
zuphilip:coverage-erase

Conversation

@zuphilip

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread run-coverage Outdated

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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...

Comment thread run-coverage Outdated
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants