NaaVRE / NaaVRE-containerizer-service

NaaVRE containerizer service
Apache License 2.0
0 stars 0 forks source link

Align `Cell` model with the catalogue #10

Open gpelouze opened 6 days ago

gpelouze commented 6 days ago

In the catalogue, we tweaked a couple of things about the cell model (see implementation and sample serialization).

@skoulouzis, does it make sense to modify the model used in the containerizer service to match the one in the catalogue?

If we keep the current model in the containerizer service, we will need to translate the cell representation to match the catalogue's model in the frontend (after receiving the response from NaaVRE-containerizer-service/containerize and posting the cell to NaaVRE-catalogue-service/workflow-cells/). This is doable, but we might create confusion by having two formulations of the cell model across different services.


Notable changes:

{
  ...
  "inputs": [
    "test_input"
  ],
  "types": {
    "test_input": "float"
  },
}

becomes

{
  ...
  "inputs": [
    {
      "name": "test_input",
      "type": "float"
    }
  ]
}
{
  ...
  "params": [
    "param_test"
  ],
  "types": {
    "param_test": "str"
  },
  "param_values": {
    "param_test": "foo"
}

becomes

{
  ...
  "params": [
    {
      "name": "param_test",
      "type": "str",
      "default_value": "\"foo\""
    }
  ],
}
skoulouzis commented 5 days ago

@gpelouze yes, that makes sense. We should align all models with the one in the catalogue