-
Notifications
You must be signed in to change notification settings - Fork 5
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
Web api #222
Conversation
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.
Mostly formulations, but some issues too.
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
That's a valid argument for having the callback feature. I will update the spec with this. |
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
…ion below the Process Queue section.
@bertsky could you resolve those conversations which are "done"? 😃 I know that it's still missing a section to describe the standalone REST processors, but I'll add it later, since I don't want to make this PR bigger (it's already big... 😅 ). |
Done. Three points remain open for me, hopefully we can still work these through. |
Sorry, but I only found 2 (the arrow direction and the sync between producers & consumers). What do I miss? 😅 |
the one about an optional |
I will update the |
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
Regarding https://github.com/OCR-D/spec/pull/222/files/ad6fe9eb018a40b823161331876f4afaad1827b3..3b2dee9d7c043f61ce04d3369b941f20ec78af2f – I do think sub-grouping is possible. It's been done in core in various places (e.g. ocrd-tool sub-group), too. |
@kba said that it's really complicated to implement sub-command in the |
I don't see it. It's just commands inside of groups inside of commands. A good example is ocrd-tool group. Implementation is easy. I could understand if the argument is that it's more complicated to document (esp. in the CLI). But then again, multiple related, interdependent options are also not easy not explain... |
The problem is that we generate the click interface programmatically, so that processor developers only need @click.command()
@ocrd_cli_options
def cli(*args, **kwargs):
return ocrd_cli_wrap_processor(MyProcessor, *args, **kwargs) Now, we either require processors to change that to @click.group()
@ocrd_cli_options
def cli(...):
return ocrd_cli_wrap_processor(...)
@cli.command('server')
def worker_cli(...):
return ocrd_cli_worker_subcommand_wrap(MyProcessor) or find a way to wrap this as a single annotation. It's possible but tricky. Whereas, for the |
This is my first attempt for the Web API documentation. Comments are welcome.