-
Notifications
You must be signed in to change notification settings - Fork 33
parameter decorator: try to resolve path names as resources #969
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
Conversation
| path.mkdir(parents=True) | ||
| path = str(path / 'preset.json') | ||
| with open(path, 'w') as out: | ||
| # it would be nicer to test some existing processor which does take params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could install the processors in tests.data (temporarily) which output the parameters they were passed. That way, we could test not only the return value but also the output.
handle json/file parsing in ocrd_cli_wrap_processor (by instantiating the processor) instead of option decorator, adapt tests
|
I just tried to merge master into this locally, but git failed in detecting the src/ renames – it marked ocrd/decorators/init.py as conflicting, but did not apply/retain any of my changes. |
…rs/__init__.py
|
I tried to resolve the conflict, in a separate PR bertsky#6 not to clutter this PR here. |
update from upstream/master
|
wowsa! CI seems to fail miserably... Maybe it would be better to cherry-pick and start anew? |
|
I don't know how, but some of these failed tests (like bashlib processor) must already have been failing earlier. Others might not have surfaced (test_processor had side effects because it did not use an isolated workspace). Also, I thought it would be cleaner to refactor a little: raising an exception ResourceNotFoundError which can be handled according to taste, and exposing |
In preparation of fixing #930.
Merely adds new specific test that fails for now.
Draft for easier discussion...