-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
if (params.olahd_username) | ||
save_to_olahd(params.mets, ocrd_cis_ocropy_binarize.out, params.olahd_endpoint, params.olahd_username, params.olahd_password) |
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.
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.
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.
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.
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.
|
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.