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

Mandatory vs Optional components in pybids_inputs #293

Open
pvandyken opened this issue May 16, 2023 · 2 comments
Open

Mandatory vs Optional components in pybids_inputs #293

pvandyken opened this issue May 16, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@pvandyken
Copy link
Contributor

Currently if an input is missing, we just print a warning saying no inputs are found and continue with the workflow. If that component is actually needed, you'll typically end up with a key error at some point downstream.

I'd like a way to control this behaviour. Two basic means come to mind:

  • Allow an optional or mandatory attribute which causes missing items to error out immediately or silently continue
  • Have a missing attribute that takes either error, warn, silent
@pvandyken pvandyken added the enhancement New feature or request label May 16, 2023
@tkkuehn
Copy link
Contributor

tkkuehn commented May 26, 2023

I'm in favour of the former approach I think, I can't imagine off the top of my head a lot of situations in which you'd want a warning in the case where there's a missing component but still want to continue.

@pvandyken
Copy link
Contributor Author

Yeah, the only thing I can think of is if you have an optional component of your workflow that's triggered by having files present. But that's a fairly rickety way to enable-disable features... if it's something worth alerting the user about, you probably want a CLI flag

@tkkuehn tkkuehn added this to To do in v1.0 via automation Jun 2, 2023
@tkkuehn tkkuehn self-assigned this Jun 2, 2023
@tkkuehn tkkuehn moved this from To do to In progress in v1.0 Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
v1.0
In progress
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants