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

--yes option doesn't do anything? #508

Closed
JohannesWiesner opened this issue Jan 27, 2023 · 2 comments · Fixed by #514
Closed

--yes option doesn't do anything? #508

JohannesWiesner opened this issue Jan 27, 2023 · 2 comments · Fixed by #514

Comments

@JohannesWiesner
Copy link

Just discovered that in our current script, the --yes option does not have any effect on the generated Dockerfile. See this issue: JohannesWiesner/csp_docker#12 (comment)

@kaczmarj
Copy link
Collaborator

hi @JohannesWiesner the --yes flag is meant for any alerts that a neurodocker template might have. for example, the fsl template alerts the user that fsl is non-free software for commercial purposes. see

alert: FSL is non-free. If you are considering commercial use of FSL, please consult the relevant license(s).

without the --yes flag, the user will be prompted to agree by typing y. with the --yes flag, the yes response is automatic.

if tmpl.alert:
# If user provides --yes flag, print message but do not ask for
# confirmation.
yes = ctx.params.get("yes")
if yes:
click.secho(tmpl.alert, fg="yellow", err=True)
else:
# TODO: add color to this to make it visible, perhaps yellow. But
# there is no color option in `click.confirm`.
click.confirm(f"{tmpl.alert} Proceed?", abort=True, err=True)

perhaps we can rename the --yes flag to clarify its purpose.

@JohannesWiesner
Copy link
Author

Aaah, interesting, then I got that totally wrong. Yup, the docs are quite sparse, maybe we should update the docs?

docker run -i --rm repronim/neurodocker:0.9.4 generate docker --help
  --yes                        Reply yes to all prompts.

sooyounga added a commit that referenced this issue Feb 22, 2023
updated to include --yes flag in the docs based on #508
- did not change the help messages in the python files, but it can be if needed?

added other missing flags, including --json flag, as well as missing options and versions, etc. from checking diff with what the `neurodocker generate docker --help` command generates currently
@sooyounga sooyounga linked a pull request Feb 23, 2023 that will close this issue
sooyounga added a commit to sooyounga/neurodocker that referenced this issue Feb 28, 2023
updated to include --yes flag in the docs based on ReproNim#508
- did not change the help messages in the python files, but it can be if needed?

added other missing flags, including --json flag, as well as missing options and versions, etc. from checking diff with what the `neurodocker generate docker --help` and `neurodocker generate singularity --help` commands generate currently
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 a pull request may close this issue.

2 participants