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

Integrate OPERANDI with OLA-HDS #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joschrew
Copy link
Collaborator

This is a draft pull request to show how the ocrd_olahd_client-processor could be used in operandi.

It is still open how to provide the password to nextflow. Currently it is hard-coded, this is ok for the beta-release but I think the credentials should not be hard-coded if we had a productive instance. They should neither be stored in the workflow script because this files are readable. So I think it would be best to store them in a config file and/or environment variable and read them from operandi on demand.
Because of that I didn't write them in the nextflow-script but into nextflow.py for now to be replaced later.

Comment on lines 91 to 92
if (params.olahd_username)
save_to_olahd(params.mets, ocrd_cis_ocropy_binarize.out, params.olahd_endpoint, params.olahd_username, params.olahd_password)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here, we should check if all olahd parameters were set. Not just the username.

Also, we should consider parameter validation as a first step of the workflow. Imagine a scenario where we run a workflow for some time and then the workflow fails in the last processor because not all required parameters were set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a check for all 3 parameter. Validation of parameter beforehand is still missing. I have try to think about how to do that. But it should be possible to just try to authenticate to olahd.

src/service_broker/service_broker/nextflow.py Outdated Show resolved Hide resolved
src/service_broker/service_broker/nextflow.py Outdated Show resolved Hide resolved
@MehmedGIT
Copy link
Collaborator

Because of that I didn't write them in the nextflow-script but into nextflow.py for now to be replaced later.

Right, we should avoid hard-coding variables inside the Nextflow script and pass the values with arguments. That's the way you did it, good.

How should authentication and preserving credentials happen?
Is an important general question we should address soon?

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.

2 participants