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

Use the same logic for handling --mets/--mets-basename/--working-dir in processors and "ocrd workspace" CLI #696

Merged
merged 9 commits into from Feb 1, 2022

Conversation

kba
Copy link
Member

@kba kba commented Jun 22, 2021

See #693 . This PR factors the resolving logic for the CLI options of ocrd workspace out to resolve_mets_arguments and reuses that in the processor wrapper, so they should follow the same logic sans the --mets-basename which is not part of the processor CLI spec (should it be?).

@kba kba requested a review from bertsky June 22, 2021 15:31
ocrd_utils/ocrd_utils/os.py Outdated Show resolved Hide resolved
ocrd/ocrd/cli/workspace.py Outdated Show resolved Hide resolved
ocrd/ocrd/cli/workspace.py Outdated Show resolved Hide resolved
ocrd_utils/ocrd_utils/os.py Outdated Show resolved Hide resolved
ocrd_utils/ocrd_utils/os.py Outdated Show resolved Hide resolved
ocrd_utils/ocrd_utils/os.py Outdated Show resolved Hide resolved
@paulpestov paulpestov added this to Ideas in coordinate_all Aug 30, 2021
@paulpestov paulpestov removed this from Ideas in coordinate_all Aug 30, 2021
@paulpestov paulpestov added this to Open in coordinate_all_pr Sep 15, 2021
@krvoigt krvoigt added the bug label Dec 7, 2021
@kba
Copy link
Member Author

kba commented Dec 20, 2021

I'd prefer if the exception / check could remain in place. Why don't you simply do the abspath thing to the processor decorator's --mets option as well?

(cannot reply directly to comments on outdated code apparently) Can you have another look at the code pls? I think I have cleaned up the logic properly now. The reason we cannot easily do abspath(--mets) is because --mets might be a proper URL not a filename.

@kba kba linked an issue Jan 30, 2022 that may be closed by this pull request
@kba kba merged commit 4d21ec8 into master Feb 1, 2022
coordinate_all_pr automation moved this from Open to Merged Feb 1, 2022
@kba kba deleted the decorator-working-dir branch February 1, 2022 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

processor decorator: working-dir not honoured
3 participants