aiida-core icon indicating copy to clipboard operation
aiida-core copied to clipboard

PortNamespace supports `serializer`

Open superstar54 opened this issue 9 months ago • 0 comments

One can pass a serializer parameter to spec.input to automatically serialize the input into AiiDA data, such as to_aiida_type. For the moment, if I pass it into spec.input_namespace, it will raise an error,

spec.input_namespace("kwargs", valid_type=Data, required=False, serializer=to_aiida_type)
TypeError: PortNamespace.__init__() got an unexpected keyword argument 'serializer

It would be great to have this feature for spec.input_namespace too.

superstar54 avatar May 22 '24 09:05 superstar54