Open nsouedet opened 8 months ago
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.
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.
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.