Learn how to develop and structure your function code
dependabot.yml
.: This specification keeps track of GitHub actions used and will recommend updates when necessary.workflows/main.yml
: When you make a Release of your function code, this action will trigger and publish a revision to Speckle AutomateFunctionInputs
subclassing AutomateBase
from the SpecklePy Automate SDK in Python.
Defining properties of this class using Pydantic Field
objects, these can be extended to cover various UI elements in the function inputs UI. A special base object is the SecretStr
, allowing authors to define secret fields that Automate will respect and store securely.
********
). This will also cause Automate to store these as encrypted and only pass them as plain text within AutomateContext
at runtime.
dotnet SpeckleAutomateDotnetExample.dll
or python main.py run
, which is the general rule for all Automate functions, whether defined with the template projects or not.
FunctionInputs
is the class described earlier, and automate_function
is the single entry point to your business logic. You can define as many classes, external modules, and functions within your repository code, but this will be your key function.
FunctionInputs
is as we’ve described above, and AutomateFunction
will be defined as a class with a Run
method that, as with the Python example, can contain all of your business logic or be the entry point to which you can structure all of your function classes, properties, and methods as you see fit.
.csproj
for dotnet functions should be renamed to reflect your function name; make sure to adjust the workflow/main.yml
file to reflect this.