fix schema generation, rename automate sdk to automation context

This commit is contained in:
Gergő Jedlicska
2023-09-18 13:42:58 +02:00
parent 08c189d247
commit 558f3cabfa
5 changed files with 5 additions and 18 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ jobs:
- name: Extract functionInputSchema
id: extract_schema
run: |
echo $(python schema_generation.py) > ${HOME}/${{ env.FUNCTION_SCHEMA_FILE_NAME }}
python main.py generate_schema ${HOME}/${{ env.FUNCTION_SCHEMA_FILE_NAME }}
- name: Speckle Automate Function - Build and Publish
uses: specklesystems/speckle-automate-github-composite-action@0.4.2
with:
@@ -36,4 +36,4 @@ jobs:
speckle_token: ${{ secrets.SPECKLE_FUNCTION_TOKEN }}
speckle_function_id: ${{ secrets.SPECKLE_FUNCTION_ID }}
speckle_function_input_schema_file_path: ${{ env.FUNCTION_SCHEMA_FILE_NAME }}
speckle_function_command: 'python main.py'
speckle_function_command: 'python main.py run'
+2 -5
View File
@@ -1,11 +1,8 @@
"""This module contains the business logic of the function.
Make sure that this module exposes a `FunctionInputs` class
and an `automate_function` function definition.
use the automation_context module to wrap your function in an Autamate context helper
"""
from specklepy.objects.geometry import Mesh
from automate_sdk import (
from automation_context import (
AutomateBase,
AutomationContext,
execute_automate_function,
-10
View File
@@ -1,10 +0,0 @@
from automate_sdk import AutomationResult, ObjectResult, ObjectResultLevel
res = AutomationResult()
res.object_results["foobar"].append(
ObjectResult(level=ObjectResultLevel.ERROR, status_message="foobar")
)
print(res.model_dump(by_alias=True))
+1 -1
View File
@@ -11,7 +11,7 @@ from specklepy.api.client import SpeckleClient
from specklepy.objects.base import Base
from specklepy.transports.server import ServerTransport
from automate_sdk import (
from automation_context import (
AutomationContext,
AutomationRunData,
AutomationStatus,