fix schema generation, rename automate sdk to automation context
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
@@ -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))
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user