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

ocrd.processor.base: add property zip_input_files #635

Merged
merged 10 commits into from
Nov 3, 2020

Conversation

bertsky
Copy link
Collaborator

@bertsky bertsky commented Oct 23, 2020

AFAICS this would already be useful for:

Most of these recently broke with the ocrd_mets.find_files generator change.

Copy link
Member

@kba kba left a comment

Choose a reason for hiding this comment

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

Nice, thanks. I'll test it some more and merge.

ocrd/ocrd/processor/base.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Oct 26, 2020

Codecov Report

Merging #635 into master will decrease coverage by 0.41%.
The diff coverage is 67.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #635      +/-   ##
==========================================
- Coverage   84.45%   84.03%   -0.42%     
==========================================
  Files          52       52              
  Lines        2997     3075      +78     
  Branches      585      627      +42     
==========================================
+ Hits         2531     2584      +53     
- Misses        348      363      +15     
- Partials      118      128      +10     
Impacted Files Coverage Δ
ocrd/ocrd/workspace.py 64.63% <0.00%> (-0.76%) ⬇️
ocrd/ocrd/processor/base.py 81.60% <71.05%> (-14.48%) ⬇️

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 9c5bbba...625547c. Read the comment docs.

@kba kba force-pushed the processor.zip_input_files branch from fa31678 to 5f6b5af Compare October 26, 2020 12:39
ocrd/ocrd/processor/base.py Outdated Show resolved Hide resolved
kba and others added 7 commits October 26, 2020 17:27
…handling…

- allow different kinds of error handling
  for the multi-match case (single page,
  multiple files): `on_error`
  - `skip`: None
  - `first`: first match
  - `last`: last match
  - `abort`: raise an exception
- if `mimetype` is inactive, support default OCR-D
  PAGE-image fallback semantics;
  - if no PAGE but multiple other files,
    then delegate to general error handling above
  - if multiple PAGE files, then raise an exception
(raise an exception if no input fileGrp was set)
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.

5 participants