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

Catch inadvertent attrs.NOTHING file outputs and raise error #749

Open
tclose opened this issue Apr 10, 2024 · 1 comment
Open

Catch inadvertent attrs.NOTHING file outputs and raise error #749

tclose opened this issue Apr 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tclose
Copy link
Contributor

tclose commented Apr 10, 2024

What would you like changed/added and why?
Currently, if there is an issue with file output handling by a task and a file path is not set correctly, it is implicitly converted to attrs.NOTHING. While this is useful behaviour for optional outputs, for mistakenly set paths it can be extremely confusing to the user as it appears that the downstream nodes haven't had their inputs set despite them being connected to lzout fields.

We should specify when a file field is truly optional, and perhaps return None instead of attrs.NOTHING so it is obvious to the downstream node that the file hasn't been generated by the upstream node, instead of just not set at all

What would be the benefit? Does the change make something easier to use?

Easier to debug workflows

@tclose tclose added the enhancement New feature or request label Apr 10, 2024
@tclose
Copy link
Contributor Author

tclose commented Apr 16, 2024

We should also do this for inputs at execution time too. Using the File | None union type should coerce properly

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
None yet
Development

No branches or pull requests

1 participant