-
Notifications
You must be signed in to change notification settings - Fork 32
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
run_processor / get_processor: do not pass (empty) ocrd_tool #1009
Conversation
Now also updated the tests to not pass on BTW, we should try to cover cached processor instances in the processor tests, too. |
@kba as this modifies existing API args, will necessitate a new minor – 2.48. I have scanned all ocrd_all code and have found no other use cases throwing |
@kba please prioritise. If you find any arguments against this, I can still try to find a different solution in ocrd_tesserocr, but as it stands, I don't see a reason. And since after #972, ocrd_tesserocr stopped working, this is blocking the next ocrd_all release. |
My thoughts behind my approval: I see this PR as kind of reminder to not provide |
@kba for the v2.48 changelog: Changed
|
Follow-up to premature #999: there are more places where we pass an empty
ocrd_tool
around that will never be used.Reasoning (from ocrd_tesserocr discussion):
It's also clear now, why we never used this: you need runtime information (from the CLI) for this. Either we are already on the CLI (Processor CLI decorator in all processor modules) or we have to make foreign CLI calls and parse the JSON response from the concrete Processor subclasses (which don't live in our venv, or we don't know the class name of, or are bashlib anyway).