Skip to content

Conversation

@kba
Copy link
Member

@kba kba commented Dec 19, 2019

Cannot push to https://github.com/bertsky/core/tree/validate-coords PR is just for CI.

Robert Sachunsky and others added 5 commits December 19, 2019 09:52
- improve recursive validation of multi-level textequiv consistency:
  * regions (e.g. Table) may contain regions (e.g. Text)
  * 'fix' recursively by going bottom-up
  * better reports, more logging
  * simplify
- add recursive validation of multi-level coordinate consistency:
  * add all region types, also consider Baseline
  * introduce 2 more error cases into ValidationReport:
    - CoordinateValidityException (self-intersecting, non-contiguous,
      too short or negative path)
    - CoordinateConsistencyException (child extends beyond parent)
  * introduce 2 new parameters:
    - check_coords (valid paths and consistent child/parent relations
      within the normal hierarchy)
    - check_baseline (the same only for TextLine.Coords vs Baseline)
  * expose them as 1 new CLI parameter `--page-discipline` (analoguous to
    `--page-strictness` for text) as enum:
    - poly (only check_coords)
    - baseline (only check_baseline)
    - both
    - off
  * use shapely.geometry for checks
  * handle PAGE ideosyncrasies (no Coords or ID at PageType / Baseline)
  * try to be efficient (re-use Polygon objects)
- remove unnecessary/redundant instantiation and method from PageValidator
@codecov-io
Copy link

codecov-io commented Dec 19, 2019

Codecov Report

Merging #375 into master will increase coverage by 0.16%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #375      +/-   ##
==========================================
+ Coverage   84.75%   84.91%   +0.16%     
==========================================
  Files          30       31       +1     
  Lines        1764     1856      +92     
  Branches      341      356      +15     
==========================================
+ Hits         1495     1576      +81     
- Misses        218      222       +4     
- Partials       51       58       +7
Impacted Files Coverage Δ
ocrd_utils/ocrd_utils/logging.py 100% <100%> (ø) ⬆️
ocrd_utils/ocrd_utils/__init__.py 66.66% <100%> (+0.13%) ⬆️
..._validators/ocrd_validators/workspace_validator.py 80.29% <83.33%> (-0.39%) ⬇️
ocrd_utils/ocrd_utils/deprecate.py 87.5% <87.5%> (ø)
ocrd_validators/ocrd_validators/page_validator.py 96.57% <95.19%> (-3.43%) ⬇️
ocrd_models/ocrd_models/ocrd_exif.py 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d20bbe5...9c14a43. Read the comment docs.

@kba kba closed this Dec 27, 2019
@kba kba deleted the validate-coords branch December 27, 2019 12:56
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.

2 participants