-
Notifications
You must be signed in to change notification settings - Fork 5
New node validation checklist
The following verification tests must be completed before a MAX new node may be officially added to the node-red-contrib-model-asset-exchange
module:
-
Verify that the new node is listed under the Model Asset eXchange category
-
Select the node and verify that the expected information (as defined in the model's README and API spec) is listed under the Node Help:
- Overview (description of what the model does)
- Every endpoint listed in the API spec (e.g. metadata, predict) is mapped to a "method"
- Inputs and outputs are properly defined for each method
-
Add the node to the workspace. Verify the following:
- The service drop down only contains one entry: Add new ....
- Add a service. (Don't enter any information.)
- The default value for Host is the correct URL for the hosted demo service instance.
- The default name is
cloud
.
- The method drop-down displays the predict method by default.
- The method drop-down contains an entry for every endpoint that the model-serving microservice exposes.
- Each model exposes at least two endpoints:
metadata
andpredict
. (Strings are defined in/locales/
)Note: by default the code generator uses
get_metadata
as method name. Customization is required. - If a method supports optional parameters (as defined by the API spec), a value can be provided.
-
Add an appropriate input node and a debug node to the flow. Deploy the flow.
-
Verify that every method returns the expected results:
-
metadata method returns the expected data structures
- MSG.PAYLOAD (
id
,name
,description
, andlicense
properties):
{"id":"...", "name":"...", "description":"...", "license":"..."}
- COMPLETE MSG OBJECT (
payload
,_msgid
,statusCode
,headers
,responseUrl
, anddetails
properties):
{ "payload": {"id":"...", "name":"...", "description":"...", "license":"..."}, "_msgid":"...", "statusCode":200, "headers":{"date":"...","content-type":"...","content-length":"...","connection":"..."}, "responseUrl":"...", "details":{"id":"...","name":"...","description":"...","license":"..."}} }
- MSG.PAYLOAD (
-
predict method returns the expected data structures
- MSG.PAYLOAD (typically a string)
- COMPLETE MSG OBJECT (
payload
,_msgid
,statusCode
,headers
,responseUrl
, anddetails
properties):The
details
property value is a model-specific data structure.
-
... method returns the expected data structures
-
-
Verify that mocha tests have been defined for each method (and complete successfully)
-
Verify that the README was updated
-
Verify that a new example flow was added to the
examples
directory -
Verify that the README in the
examples
directory was updated -
Verify that the example flow was also published on https://flows.nodered.org