Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.99 KB

File metadata and controls

45 lines (33 loc) · 1.99 KB

Adding new components

See the developers guide for a description on how components can be defined and what rules are to be followed.

TOOD: Description on the idea/design-vision of the workbench (accessibility) --Best-practice on that here-- (direct input vs load-like extra component)

(Feel free to talk to Jan von Harten/the entire team to check if the visions are compatible :) )

For each component (added):

  • Follow the naming guide for the identifier
  • Use pydocs explaining your component and its inputs
  • Add a unit test of the execution
    • use a small input to keep it fast
    • See the tests unit tests for an example of this
  • Consider invalid inputs/limitations and define pre-checks for them
    • Add unit tests for each pre-check
      • Each pre-check MUST be tested
  • Add the new component to an example (python) workflow
    • And ensure the workflow runs (on your machine)

Adding new types

See the developers guide for a description on how types can be defined and what rules are to be followed.

For each type (added):

  • Follow the naming guide
  • Use pydocs explaining your type
  • Add a unit test ensuring it fulfills the following requirements (TODO: example):
    • a valid pydantic model
    • serializable and deserializable
  • Use it in an example and run the example on your machine

Note: pydantic does not support some types, such as numpy arrays, without annotated information on how to (de)serialize them. For numpy types, please use pydantic_numpy and see the MeshResults here for additional examples and here for the pydantic docs on that topic.