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

Add Input/Output parameter support to avoid the need of artificial fields #322

Open
nsouedet opened this issue Nov 13, 2023 · 2 comments
Open

Comments

@nsouedet
Copy link
Collaborator

It should be possible to mark Process Fields for both Input and Output (and not exlcusively one or other).
This should allow to avoid the need to create artificial fields to deal with dependencies in such cases.
For example, this should be particularly useful for processes that have to fill a part of an already existing file.

@sapetnioc
Copy link
Collaborator

For file content the read + write definition is already possible using field(type_=File, read=True, write=True). I don't think we ever tested it so we should add a test for this. However, it is true that parameters values (the path for File type) cannot be both input and output. It would be possible to change that but this may requires to adapt all internal pipeline management to get rid of the assumption that all that is not an output is an input. Another difficulty would be the pipeline GUI that create two separate boxes for inputs and outputs.

@denisri
Copy link
Collaborator

denisri commented Nov 16, 2023

In many many places we use logics like "if field.is_output(): ... ; else: ..." which will break if a field is both an input and an output. We would need to review every occurrence of this kind of test and think about what should happen in an I+O case (which is not always obvious)... So I guess such a process will not work at all in a pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
capsul v3
  
Awaiting triage
Development

No branches or pull requests

3 participants