aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
7 stars 17 forks source link

ProcessInputWidget do not support namespace inputs #434

Closed unkcpz closed 1 year ago

unkcpz commented 1 year ago

The namespace input is an AttributDict which not supported by the ProcessInputWidget since it tries to show the pk of the input nodes. The workaround will be checking if the input port is the namespace the widget disables the display of the input showing. To fix this, we need to support the namespace also for the input ports. I think it make sense to show in the dropdown list the <namespace>.<embed_port>. For example, if we have inputs as following:

Inputs                PK    Type
--------------------  ----  -------------
pw
    pseudos
        Si            99    UpfData
    code              215   InstalledCode
    parallelization   220   Dict
    structure         218   StructureData
    parameters        232   Dict
clean_workdir         233   Bool
kpoints_distance      221   Float
kpoints_force_parity  222   Bool
max_iterations        223   Int

The dropdown list will having pw.pseudos.Si, pw.code etc..