Update to Automate docs from the Notion pages (#239)

* Update to Automate docs from the Notion pages

* Nav fix

* Grammar
This commit is contained in:
Jonathon Broughton 2024-07-23 19:56:54 +01:00 коммит произвёл GitHub
Родитель 8505f39895
Коммит 9b334e931a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
51 изменённых файлов: 896 добавлений и 310 удалений

Просмотреть файл

@ -1,11 +1,11 @@
const { description } = require("../package");
const { description } = require('../package');
module.exports = {
markdown: {
lineNumbers: true,
extendMarkdown: (md) => {
// use more markdown-it plugins!
md.use(require("markdown-it-html5-embed"), {
md.use(require('markdown-it-html5-embed'), {
html5embed: {
useImageSyntax: true, // Enables video/audio embed with ![]() syntax (default)
useLinkSyntax: true, // Enables video/audio embed with []() syntax
@ -13,27 +13,27 @@ module.exports = {
});
},
},
base: "/",
title: "Speckle Docs",
base: '/',
title: 'Speckle Docs',
description: description,
head: [
["meta", { name: "theme-color", content: "#0480FB" }],
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
['meta', { name: 'theme-color', content: '#0480FB' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
[
"meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" },
'meta',
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
],
[
"script",
'script',
{
src: "/scripts/scroll-to-hash.js",
src: '/scripts/scroll-to-hash.js',
},
],
[
"script",
'script',
{
src: "https://identity.netlify.com/v1/netlify-identity-widget.js",
src: 'https://identity.netlify.com/v1/netlify-identity-widget.js',
},
],
],
@ -43,312 +43,329 @@ module.exports = {
* refhttps://v1.vuepress.vuejs.org/theme/default-theme-config.html
*/
themeConfig: {
repo: "specklesystems/speckle-docs/",
docsBranch: "main",
repo: 'specklesystems/speckle-docs/',
docsBranch: 'main',
editLinks: true,
editLinkText: "Edit this page",
docsDir: "",
editLinkText: 'Edit this page',
docsDir: '',
sidebarDepth: 2,
activeHeaderLinks: false,
lastUpdated: true,
logo: "/assets/logo-docs.png",
logo: '/assets/logo-docs.png',
algolia: {
appId: "XOL51LKXOA",
apiKey: "595b9c5533a46cfa0f999033d4e4ba28",
indexName: "speckle",
appId: 'XOL51LKXOA',
apiKey: '595b9c5533a46cfa0f999033d4e4ba28',
indexName: 'speckle',
},
nav: [
{
text: "User Guide",
link: "/",
text: 'User Guide',
link: '/',
},
{
text: "Developer Docs",
link: "/dev/",
text: 'Developer Docs',
link: '/dev/',
},
{
text: "Automate Guide",
link: "/automate/",
text: 'Automate',
link: '/automate/',
},
{
text: "3D Viewer",
link: "/viewer/",
text: '3D Viewer',
link: '/viewer/',
},
{
text: "Speckle Website",
link: "https://speckle.systems",
text: 'Speckle Website',
link: 'https://speckle.systems',
},
//this button has custom style in index.styl under `.nav-item:last-child a`
{
text: "Get Started",
link: "https://speckle.systems/getstarted/",
text: 'Get Started',
link: 'https://speckle.systems/getstarted/',
},
],
sidebar: {
"/user/": [
'/user/': [
{
title: "User Guide 🤷",
title: 'User Guide 🤷',
collapsable: false,
children: ["", "concepts", "concepts-advanced", "installing","FAQs"],
children: ['', 'concepts', 'concepts-advanced', 'installing', 'FAQs'],
},
{
title: "Connectors 🔌",
title: 'Connectors 🔌',
collapsable: false,
children: [
"connectors",
"manager",
"ui2",
'connectors',
'manager',
'ui2',
{
title: "Revit",
title: 'Revit',
collapsable: true,
children: [
"./revit/intro",
"./revit/installing-updating-the-connector",
"./revit/sending-models",
"./revit/receiving-models",
"./revit/advanced-settings",
"./revit/features",
"./revit/support-table",
"./revit/faq",
'./revit/intro',
'./revit/installing-updating-the-connector',
'./revit/sending-models',
'./revit/receiving-models',
'./revit/advanced-settings',
'./revit/features',
'./revit/support-table',
'./revit/faq',
],
},
"rhino",
"autocadcivil",
"grasshopper",
"dynamo",
"unity",
"unreal",
"blender",
"excel",
"csi",
'rhino',
'autocadcivil',
'grasshopper',
'dynamo',
'unity',
'unreal',
'blender',
'excel',
'csi',
{
title: "SketchUp",
title: 'SketchUp',
collapsable: true,
children: [
"./sketchup/introduction",
"./sketchup/installation",
"./sketchup/basic-usage",
"./sketchup/advanced-settings",
"./sketchup/manual-installation",
'./sketchup/introduction',
'./sketchup/installation',
'./sketchup/basic-usage',
'./sketchup/advanced-settings',
'./sketchup/manual-installation',
],
},
"qgis",
"arcgis",
'qgis',
'arcgis',
{
title: "Power BI",
title: 'Power BI',
collapsable: true,
children: [
"./powerbi/introduction",
"./powerbi/installation",
"./powerbi/configuration",
"./powerbi/accessing-private-streams",
"./powerbi/uninstallation",
"./powerbi/using-powerbi-connector",
"./powerbi/working-with-records",
'./powerbi/introduction',
'./powerbi/installation',
'./powerbi/configuration',
'./powerbi/accessing-private-streams',
'./powerbi/uninstallation',
'./powerbi/using-powerbi-connector',
'./powerbi/working-with-records',
],
},
{
title: "Power BI 3D Viewer",
title: 'Power BI 3D Viewer',
collapsable: true,
children: [
"./powerbi-visual/introduction",
"./powerbi-visual/installation",
"./powerbi-visual/basic-usage",
"./powerbi-visual/coloring",
"./powerbi-visual/object-tooltip",
"./powerbi-visual/visual-settings",
"./powerbi-visual/general-settings",
'./powerbi-visual/introduction',
'./powerbi-visual/installation',
'./powerbi-visual/basic-usage',
'./powerbi-visual/coloring',
'./powerbi-visual/object-tooltip',
'./powerbi-visual/visual-settings',
'./powerbi-visual/general-settings',
],
},
"bentley",
"teklastructures",
"archicad",
"navisworks",
"ifc",
"mapping-tool",
"support-tables",
'bentley',
'teklastructures',
'archicad',
'navisworks',
'ifc',
'mapping-tool',
'support-tables',
],
},
{
title: "Tutorials ⚡",
title: 'Tutorials ⚡',
collapsable: false,
children: ["tutorials"],
children: ['tutorials'],
},
],
"/dev/": [
'/dev/': [
{
title: "Developer Docs 👩‍💻",
title: 'Developer Docs 👩‍💻',
collapsable: false,
children: ["", "architecture"],
children: ['', 'architecture'],
},
{
title: "Core Concepts",
title: 'Core Concepts',
collapsable: false,
children: [
"base",
"decomposition",
"kits",
"transports",
"apps-auth",
'base',
'decomposition',
'kits',
'transports',
'apps-auth',
],
},
{
title: "Advanced Concepts",
title: 'Advanced Concepts',
collapsable: false,
children: [],
},
{
title: ".NET SDK",
title: '.NET SDK',
collapsable: false,
children: [
"dotnet",
"FilteringData",
"traversal",
"objects",
"connectors-dev",
"kits-dev",
"transports-dev",
'dotnet',
'FilteringData',
'traversal',
'objects',
'connectors-dev',
'kits-dev',
'transports-dev',
],
},
{
title: "Python SDK",
title: 'Python SDK',
collapsable: false,
children: ["python", "py-examples", "py-sample"],
children: ['python', 'py-examples', 'py-sample'],
},
{
title: "Javascript SDK",
title: 'Javascript SDK',
collapsable: false,
children: ["js", "viewer", "js-app-script"],
children: ['js', 'viewer', 'js-app-script'],
},
{
title: "Server API & Apps",
title: 'Server API & Apps',
collapsable: false,
children: [
"server-api",
"server-graphql-api",
"server-rest-api",
"server-stream-previews",
"server-webhooks",
"server-setup-k8s",
"server-manualsetup",
"server-local-dev",
"server-database-migration",
"tokens",
"apps",
"server-setup",
'server-api',
'server-graphql-api',
'server-rest-api',
'server-stream-previews',
'server-webhooks',
'server-setup-k8s',
'server-manualsetup',
'server-local-dev',
'server-database-migration',
'tokens',
'apps',
'server-setup',
],
},
],
"/automate/": [
'/automate/': [
{
title: "Automate Docs 👩‍💻",
collapsable: false,
children: [""],
},
{
title: "Working with Automations",
title: 'Automate Docs 👩‍💻',
collapsable: false,
children: [
"create-automation",
"update-automation",
"frequently-asked-questions"
],
},
{
title: "Developing Functions",
collapsable: false,
children: [
"create-function",
"release-function-version",
"register-existing-function-repository",
"function-specification"
],
},
],
"/viewer/":[
{
title: "Viewer Docs 👩‍💻",
collapsable: false,
children: [""],
},
{
title: "Quickstart 🚀",
collapsable: false,
children: [
"installation",
"basic-setup",
"advanced-setup"],
},
{
title: "Viewer Concepts",
collapsable: false,
children: [
"overview",
"viewer-data",
"viewer-rendering",
"loaders"
],
},
{
title: "API Reference",
collapsable: false,
children: [
"migration-guide",
'',
'getting-started',
'important-caveats',
{
title: "Viewer Core",
title: 'Core Functionalities',
collapsable: true,
children: [
"acceleration-structure-api",
"batch-api",
"batch-object-api",
"geometry-converter-api",
"input-api",
"intersections-api",
"loader-api",
"queries-api",
"render-view-api",
"render-tree-api",
"speckle-material-api",
"speckle-renderer-api",
"top-level-acceleration-structure-api",
"viewer-api",
"world-tree-api",
],
},
{
title: "Extensions",
collapsable: true,
children: [
"extension-api",
"camera-controller-api",
"diff-extension-api",
"filtering-extension-api",
"measurements-tool-api",
"selection-extension-api",
"section-tool-api",
"section-tool-outlines-api",
"speckle-controls-api",
"smooth-orbit-controls-api"
'for-automate-composers',
'viewing-results',
'for-function-authors',
],
},
],
},
{
title: "Examples",
title: 'Working with Automations',
collapsable: false,
children: [
"basic-example",
"more-extensions-example",
"filtering-example",
"loading-example",
"object-manipulation-example",
"box-selection-example",
"categorize-example"
]
}
]
'create-automation',
'update-automation',
],
},
{
title: 'Developing Functions',
collapsable: false,
children: [
'create-function',
'making-your-function',
'function-testing',
'documenting',
'release-function-version',
'register-existing-function-repository',
],
},
{
title: 'Resources',
collapsable: false,
children: [
'demos',
'frequently-asked-questions',
'feedback',
'roadmap',
'troubleshooting',
'known-issues',
],
},
],
'/viewer/': [
{
title: 'Viewer Docs 👩‍💻',
collapsable: false,
children: [''],
},
{
title: 'Quickstart 🚀',
collapsable: false,
children: ['installation', 'basic-setup', 'advanced-setup'],
},
{
title: 'Viewer Concepts',
collapsable: false,
children: ['overview', 'viewer-data', 'viewer-rendering', 'loaders'],
},
{
title: 'API Reference',
collapsable: false,
children: [
'migration-guide',
{
title: 'Viewer Core',
collapsable: true,
children: [
'acceleration-structure-api',
'batch-api',
'batch-object-api',
'geometry-converter-api',
'input-api',
'intersections-api',
'loader-api',
'queries-api',
'render-view-api',
'render-tree-api',
'speckle-material-api',
'speckle-renderer-api',
'top-level-acceleration-structure-api',
'viewer-api',
'world-tree-api',
],
},
{
title: 'Extensions',
collapsable: true,
children: [
'extension-api',
'camera-controller-api',
'diff-extension-api',
'filtering-extension-api',
'measurements-tool-api',
'selection-extension-api',
'section-tool-api',
'section-tool-outlines-api',
'speckle-controls-api',
'smooth-orbit-controls-api',
],
},
],
},
{
title: 'Examples',
collapsable: false,
children: [
'basic-example',
'more-extensions-example',
'filtering-example',
'loading-example',
'object-manipulation-example',
'box-selection-example',
'categorize-example',
],
},
],
},
},
@ -356,14 +373,14 @@ module.exports = {
* Apply pluginsrefhttps://v1.vuepress.vuejs.org/zh/plugin/
*/
plugins: [
"@vuepress/plugin-back-to-top",
"@vuepress/plugin-medium-zoom",
"@vuepress/html-redirect",
'@vuepress/plugin-back-to-top',
'@vuepress/plugin-medium-zoom',
'@vuepress/html-redirect',
[
"vuepress-plugin-matomo",
'vuepress-plugin-matomo',
{
siteId: 5,
trackerUrl: "https://speckle.matomo.cloud/",
trackerUrl: 'https://speckle.matomo.cloud/',
},
],
],

Просмотреть файл

@ -1,5 +1,10 @@
# Introduction
# Speckle Automate Beta
::: tip 🚧 NOTE
Speckle Automate is in an accessible beta phase and restricted to the Speckle development server. These docs are a work in progress and are updated regularly.
::: tip IMPORTANT 🙌
We are in the process of updating these docs, for now, you can find a more up-to-date version [here]([https://speckle.systems/getstarted/](https://speckle.notion.site/Speckle-Automate-Beta-Docs-5003846ac66e44639a0691894e1dc1e3)).
:::
This mini documentation is designed to assist beta testers of Speckle Automate, focusing on the **Function Author** and **Automation Composer** personas. Your feedback is essential in refining these roles within the platform, enhancing functionality, and ensuring a user-friendly experience.
We will continuously improve these documentation details as things develop; there may be occasions when development outpaces the documentation. If you have any questions, please reach out to us on the [Speckle Community Forum: Automate](https://speckle.community/c/making-speckle/insiders-automate/27).

Просмотреть файл

@ -1,16 +1,55 @@
# Creating Automations
## What is an Automation?
## **What is an Automation?**
Automations allow you to achieve a wide variety of tasks. Automations are what applies a function to a [Speckle model](../user/concepts.md). Automations are used to configure a function to suit your particular requirements.
- Automations allow you to achieve a wide variety of tasks.
- Automations are what apply a function to a Speckle model.
- Automations are used to configure a function to suit your particular requirements.
For example, there may be a function which can render a photograph-quality image of any given model. An Automation would allow you to specify the camera position, lighting, and other settings to achieve the desired result, and then command the function to render an image of your particular Speckle model.
For example, a function may render a photograph-quality image of any given model. An automation allows you to specify the camera position, lighting, and other settings to achieve the desired result, and then command the function to render an image of your particular Speckle model.
## Creating an Automation
## **Creating an Automation**
<!-- TODO insert animated gif here -->
Automations are created from two contexts:
1. Select a function from the [Function Library](../function-library/README.md) and click the `Create Automation` button.
1. Provide your automation with a name and description.
1. Provide the requested required and optional inputs to configure the automation.
1. Click `Create Automation`.
1. 1. In the context of a project, found under the Automations tab.
![the automations tab](./img/automations-tab.png)
2. From the functions library
![alt text](./img/function-library-card.png)
The resulting modal dialog will present you with four or five prompt screens:
1. If you started from an automations list, **select a function to use** and click Next.
![create automation](./img/create-automation.png)
![selected function](./img/selected-function.png)
2. If you start from the Functions library or a Function page, you will go directly to step 3.
3. If the function has defined inputs to configure it, **set parameters** now.
![parameter configuration](./img/configuration.png)
4. **Add Automation Details**
1. If you started the automation from the project page, this is already selected for you; otherwise, you will need to choose which Speckle project and model will trigger your automation.
![set parameters](./img/set-parameters.png)
2. **Choose a Speckle Model from the current project**
![choose a model](./img/choose-model.png)
3. **Name your automation**. This is for your reference; ideally, make it meaningful, but it doesnt need to be unique.
![alt text](./img/automation-name.png)
5. Create your Automation
![create!](./img/create-button.png)
6. **Success**! 🥳 You can now view your automation.

Просмотреть файл

@ -1,21 +1,62 @@
# Create a Function
# Creating Functions
## What is a Function?
If you have your verified account on latest.speckle.systems, navigate to [latest.speckle.systems/functions](https://latest.speckle.systems/functions).
Functions are the building blocks of Automate. Functions are small pieces of code which perform a specific task. Functions can be made of virtually any language or any existing software, though we only provide templates for a few languages at this time.
You will now see above the Functions Library. In the top right, there is a new function button:
## Creating a Function
![new function button](./img/new-function-button.png)
> If you already have a GitHub repository for a Function, and wish to register that with Automate please refer to our instructions for [registering an existing Function](./register-existing-function-repository.md).
This will launch the function creation wizard
<!-- TODO insert animated gif here -->
1. Click the `Create Function` button adjacent to the Function Library.
1. Authorize Speckle's GitHub App to access your GitHub account; this allows Speckle to create a new repository for your Function.
1. Select the template you wish to use for your Function. If you wish to work in a different language, please select any template and you can modify it later.
1. Give your Function a name and description, select tags, and choose the source of the data it best works with (e.g. Revit, Rhino, etc.).
1. Create your Function.
1. You can now open your code in a GitHub CodeSpace, or browse the code repository for your Function. GitHub provides instructions for how to clone your repository to your local workstation if you prefer to work locally.
1. Functions will not appear in the Function library until there is at least one published version. Please refer to our instructions for [releasing a new version](./release-function-version.md) of your Function.
If you wish to create a Function which is not based on one of our templates, please refer to the [specification to which a Function must comply](./function-specification.md).
1. **Authorise GitHub:** Required only the first time.
![authorise github](./img/authorise-github.png)
::: tip 💡 Authorized OAuth Apps
You will find Speckle Automate in your Github account Authorized OAuth Apps. Access can be revoked at any time, but will be necessary to publish new functions.
![alt text](./img/authorised-applications.png)
:::
2. **Choose a template**: We are launching with Python and C# templates. These reflect our best-supported Speckle SDKs, **speckle-sharp** and **specklepy**. Each of our main SDKs includes the Automate SDK for that language.
3. **Define your function.** (Some of these details can be edited later)
1. **Choose an avatar/logo/icon** [optional]: This will be displayed in the functions list
2. **Choose a Name** [required]: This doesnt need to be unique, but all functions will be a single list during the beta stages. The search filter will use the function name alone; it could be helpful if it identifies you as an author/company and the name/function intent. *e.g. SolarFarmLayout by Solarcorp*
3. **Add a description** [required]: This will be the short description used in the function list. The description supports basic Markdown if you wish to add markup.
4. **Identify source application data supported** [optional]: This may be helpful when defining Automations
5. **Add Tags** [optional]: A list of terms to categorise your function further. Multi-word tags should use _ or - characters. *e.g. Solar_Panels*
6. **~~Select a Github Organization** [optional]: This is only relevant if you want to publish as an organization and are a member of one.~~
7. **Click Next**: All being well, the wizard will create your function project on GitHub.
::: tip 🧙‍♂️ Wizard Actions
You will see that the wizard handles a lot of scaffolding for you. You can navigate to GitHub and see that the template project has been cloned under your repositories:
![alt text](./img/repo-title.png)
A GitHub action has been created for you; the specification for it is defined in `.github/workflows/**main.yml**`
![alt text](./img/build-and-deploy.png)
It also has injected two environmental variables as repository secrets for the interaction with the Automate API `SPECKLE_FUNCTION_ID` and `SPECKLE_FUNCTION_TOKEN`:
![alt text](./img/repo-secrets.png)
:::
::: tip 💡 Note
Choose whatever Project restrictions you wish, but it must be Public for now.
:::
</aside>
4. Your function has been created! 🥳 At this point, the template can be edited and amended to suit your own business logic.
![alt text](./img/function-created.png)
5. You can follow the links provided to:
1. **Open the repo:** this is a link to the project on GitHub
2. **Open in codespace:** You can get coding immediately in a virtual machine operating in a container at GitHub. Remember that any changes you make must be pushed to your project.
3. **Go to function**: This will navigate you to your functions page within Speckle Automate.
6. Your function will only appear in the [functions list](https://automate.speckle.dev/functions) once a first Release has been made.

16
automate/demos.md Normal file
Просмотреть файл

@ -0,0 +1,16 @@
# Demos and Presentations
### SpeckleCon 2023 Announcement
[Introducing Speckle Automate 🤖 - SpeckleCon 2023](https://youtu.be/6_rXXGpnfb4)
### Our mission for Automate blog post
[Automate with Speckle](https://speckle.systems/blog/automate-with-speckle/)
### Function Demonstrations from SpeckleCon 2023
[Speckle Automate DEMOS 🔥 - SpeckleCon 2023](https://youtu.be/BuyUvIVUO2g)
### Demo functions for use in Automate
All our demo functions are listed as featured functions in the functions library. Most have been updated with the changes to the SDKs behind the scenes since SpeckleCo but we're working on this and also adding new functions all the time.
[All Functions - Speckle Automate](https://latest.speckle.systems/functions)

10
automate/documenting.md Normal file
Просмотреть файл

@ -0,0 +1,10 @@
# Documenting your function
Your functions `README.md` will be published to its dedicated Automate page. This is your opportunity to communicate the key functionality, limitations, and detailed instructions for the functions inputs to automation composers.
Later, this will be your opportunity to market why your function is the go-to solution for quality control, solar farm layouts, or Pokemon detection for Speckle. It is also a great way to seek collaborators.
You can choose how detailed you would want to document the functional logic, so long as it is abundantly clear what it results in given what source data.
Speckle Automates function listing will display with full Markdown support, including relevant imagery, etc.
![Example of the Readme as displayed in a function listing.](./img/readme.png)
Example of the Readme as displayed in a function listing.

19
automate/feedback.md Normal file
Просмотреть файл

@ -0,0 +1,19 @@
# Providing Feedback
You have been invited to join the Automate closed beta on the understanding that Speckle provides the infrastructure and compute resources and that you provide feedback on:
- The developer experience.
- The automation experience.
- The integration of the automation results in the Speckle viewer.
- How would you see Automate as a paid product?
We, Speckle, will also endeavour to give you the same level of support via the [speckle.community](https://speckle.community/c/making-speckle/insiders-automate/27) forum as we already do for all other Speckle activities. In addition to the invitation to the Speckle Automate platform, you are also invited to join the private channel on the forum dedicated to Automate.
We look forward to a lively discussion, peer support, ideas sharing, best practices, and reusable code snippets so that you can all progress swiftly toward some success.
We will also send feedback questionnaires to capture specific areas where we want to develop the Automate product to be a first-class experience for function authors, automation composers and project leaders.
## Rewards
If successful function development wasnt rewarding enough, Speckle may award incentives or rewards for active participation or for finding significant bugs. In turn authors of significantly popular functions may be supported in their contribution to the public function library.
We also encourage Beta participants are free to showcase their successes not only on the community forum but as far and wide as their personal brand can carry.

Просмотреть файл

@ -0,0 +1,33 @@
# For Automation Composers
### Designing Automation Workflows
- **Automation Workflows**: Automations are triggered by new versions published to a given model within a project. An automation will execute a function and pass the published data and any configuration parameters to it.
- **Creating Workflows**: Step-by-step guide on assembling workflows using pre-built and custom functions.
### Viewing Automation Runs
From your automation list, you can see each automation you have composed by name, what function it is deploying to, and which project and model it is in. If an automation has been disabled, it will be shown with a Paused icon.
![A registered automation](./img/paused-status.png)
If a model no longer exists, the automation will automatically be disabled, and a notification banner will be visible under the details header.
![model removed error](./img/model-error.png)
Below are all the runs of each automation, their status, the model version they ran on, when they started, how long they ran, and a link to view the log output of each run. This will show the current or evential status of the run: pending, running, success, or failure.
![automation run indicating success](./img/run-success.png)
Clicking on the details header will bring up the Automation page, where you can manage more.
### Managing Automation Configurations
- **Editing details**: Clicking edit will allow you to rename a function and toggle its enabled state.
- **Enable and Disable**: Once defined, automations will always run on a new version of the selected model. If this is no longer needed, you can disable it. You can re-enable it at any time.
- **Amend Function:** Clicking on the function card allows you to select a different function version and alter its configuration details. The function card will indicate if it is set to the latest revision.
- **Trigger Automation**: If the model exists, you can manually trigger it even if the automation is disabled. This will use the latest version as the source.
- **Review Runs**: The same runs review is available in an automation page focussed on just that automation.
- **Version Control**: Automation is defined to run on a specific model for a specific project. When a function is selected, by default, you are selecting the latest version of that function. This is the best option. As parts get revisions, you will be alerted that your automation is not using the newest revision. You can choose to edit the automation to do this or not. While supported by the underlying API, there is no current means of auditing what version of an automation was live at a specific time.
- **Collaboration**:
- Functions, by their open-source nature during the closed beta, may be authored by anyone with access to the function repository once created. This could be automatic among an organisation or enabled by the original function author, where the repo is tied to that author's GitHub account.
- Automations, are tied to the composer's account who must have the owner role for the project.

Просмотреть файл

@ -0,0 +1,10 @@
# For Function Authors
- **[Creating functions](./create-function.html):** Follow our detailed instructions for publishing your first function using the Automate wizard.
- **[Updating functions](./release-function-version.html):** After your code's initial release completes your function's publishing, subsequent releases will automatically set the function listing to show the latest revision. Automations already using your function must be edited to point to specific modifications.
- **APIs and Data Access**: Functions can make external calls or even calls to other Speckle Models using REST via whatever library you choose. Speckle SDKs include a subset of methods specifically to handle Automate data. More details about this are below.
- **Runtime**: Automate functions run once per trigger; there is a generous execution time for all functions to cope with even intensive computation. This is not intended to allow for deliberately long-running executions with RTC or sockets, etc.
- **Rate-limits:** Functions CAN cause other functions to run. This could cause infinite execution loops. Speckle has implemented rate limiting as a bulwark against this during beta testing. When Speckle Automate moves to a paid compute, Speckle will have other methods of detecting such loops, but you could still incur an expensive compute cost.
- **Best Practices**: Do test, test and test your code. Deploying code to Automate the testing on every model version sent is possible but will become tedious. Look into modularising your function so that business logic can be tested locally. Test suites can be executed as part of the GitHub automation for quality CI/CD.

Просмотреть файл

@ -1,94 +1,93 @@
# Frequently Asked Questions
## How can I get started with Automate?
### **How much does it cost? Is Automate included in my enterprise subscription?**
1. Simply create an account on [latest.speckle.systems](http://latest.speckle.systems), if you dont have one already.
1. Join our [beta testing group](https://forms.gle/15NHa9h8sYvUHG2e6).
1. Wait patiently!
1. Once you receive an early access invitation, you can log in to Automate at [automate.speckle.dev](http://automate.speckle.dev) using a [latest.speckle.systems](http://latest.speckle.systems) account (latest.speckle.systems is our beta platform, separate from app.speckle.systems).
1. Check out [our guide](https://speckle.guide/automate/) for more information on how to get started!
- We want Automate to make a lot of the tedious tasks in your workflow easier, so we are working hard to make it as accessible as possible.
- Automate will be free as long as its in beta. Were working on our future pricing plans and hope to announce them to you soon.
- It is anticipated that our paid Speckle server tiers will include some level of Automate usage, but where the balance lies we are still working out.
- We will be looking for feedback from our beta testers to help us shape this.
## How much does it cost? Is Automate included in my subscription?
### **I use my favourite desktop tool for clash detection. What is the difference between running clash detection in Speckle?**
At the present moment Automate is available only as a private beta. You can join the waiting list [here](https://forms.gle/15NHa9h8sYvUHG2e6). While we are developing Automate it is not open source; we will review this decision in due course.
- The main difference is that clash detection with Automate runs in the background and on as many models as you wish. It runs on models from any of our integrations, such as Blender, Sketchup, Grasshopper, Revit, TopSolid etc.. So you only have to work with Automate to get similar results across all your software. That saves you much time opening your favourite desktop tool, loading models, running the clash detection and waiting for the results.
- The results from the Clash Detection running in Automate are viewable directly in your web browser. You can enable sharing for your Speckle Model, send that link to your colleagues and clients, or embed our viewer in SharePoint, Notion or a web page. You can view the clash detection results on Mobile, Desktop, or the application of your choice.
- The results can then be retrieved from Speckle into any of our [**Connectors (opens new window)**](https://speckle.systems/features/connectors/), whether Revit, Excel, PowerBI, etc. Speckle makes using the most appropriate and familiar software easy to get the best from your work.
- Automate results have an API, and reporting tools could be built to integrate with external reporting workflows such as PowerBI or Jupyter Notebooks out of the gate.
## I use my favourite desktop tool for clash detection. What is the difference of running clash detection in Speckle?
### **Is Automate faster than my desktop workflow?**
The main difference is that clash detection with Automate runs on the background and on as many models you wish. It runs on models from any of our integrations, such as Blender, Sketchup, Grasshopper, Revit, TopSolid etc. - so you only have to work with Automate to get similar results across all your software. That saves you lot of time opening your favourite desktop tool, loading models, running the clash detection and waiting for the results.
- This is hard to tell as it depends on the complexity of your models, hardware, etc. However, Automate Function is triggered without human interaction every time you upload a new model version; this alone might result in a faster response. Automate runs in the background, saving you time to focus on more critical tasks. It runs on dedicated hardware hosted in the cloud and doesnt slow down your computer if you try to get other things done while it runs.
- Automations you define to run on models others contribute to will not require them to notify you, for you to retrieve their data, for you to take the results and turn them into a report; this can happen while you are at lunch, at sleep or climbing a mountain.
The results from the Clash Detection running in Automate are viewable directly in your web browser. You can enable sharing for your Speckle model, and send that link to your colleagues and clients; or embed our viewer in SharePoint, Notion or a web page. You can view the clash detection results on Mobile, Desktop, or the application of your choice.
### What languages are supported?
The results can then be retrieved from Speckle into any of our [Connectors](https://speckle.systems/features/connectors/) whether that is Revit, Excel, PowerBI etc. Speckle makes it easy for you to use the most appropriate and familiar software to allow you to get the best from your work.
- C# and Python are currently supported as first-class extensions to the existing Speckle SDKs; we plan to add Jupyter Notebooks soon and JavaScript/Typescript later. In terms of support, we offer a template repository, software development kit, documentation, an active forum, and a large community of like-minded contributors.
- You could extend our specklepy Automate template to execute your analysis with custom C++ or Rust libraries.
- Automate can run any language, framework, or off-the-shelf software - please refer to the Function specification for more details. While this is technically possible, and we can point you to documentation to do this, you may find a different level of support in terms of SDKs, documentation, or community to support you if you choose to take this path.
- Windows and MacOS runtimes are not currently available.
- In short, if you can execute a function from a command line, you can run it in Automate.
## Is Automate faster than my desktop workflow?
### **Is Automate part of the Speckle Server? How do I install the service?**
This is really hard to tell as it depends on complexity of your models, your hardware and so on. However, Automate function is triggered without human interaction every time you upload a new model version; this alone might result in a faster response. Automate runs in the background, saving you time to focus on more important tasks. It runs on dedicated hardware hosted in the cloud and doesnt slow down your computer if you are trying to get other things done while it runs.
- No, Automate is a separate service but relies on the Speckle Server that is already available.
- We will be working hard during the lifetime of the beta testing to integrate Automate into the Speckle web application more tightly; the Automate backend will be separate.
- Speckle Server is freely available and can be installed on your own infrastructure. While in beta, Automate is not currently installable or open source.
## What languages are supported?
C#, Python are supported at the moment and we plan to add JavaScript in the future. In terms of support, we offer a template repository, software development kit, documentation, an active forum, and a large community of like-minded contributors.
However, Automate can run any language, any framework, or any off-the-shelf software - please refer to the [Function specification for more details](./function-specification). While this is technically possible, and we can point you to documentation to do this, you may not find the same level of support in terms of SDKs, documentation, or community to support you if you choose to take this path.
## Is Automate part of the Speckle Server? How do I install the service?
No, Automate is a separate service but it relies on Speckle Server already being available.
Speckle Server is freely available and can be installed on your own infrastructure. While in beta, Automate is not currently installable and is not open source. We may reconsider this at some time in the future.
## What else do I need for Speckle Automation?
### **What else do I need for Speckle Automation?**
A mindset that automation is the future!
## How does Automate compare to Hypar, Viktor, or ShapeDiver?
### **How does Automate compare to Hypar, Viktor, or ShapeDiver?**
We love every product delivering new technology to push the AEC industry forward, and we believe Automate has a complementary role beside them. Here are some of the differences:
- The intention is different:
- Automate is **not** intended for real-time parametric modeling in immediate, millisecond response to user adjustments in an application window. This type of activity is better suited for Hypar, NodePen, Viktor, Dynamo, Grasshopper, etc..
- Automate is intended to automate tedious or difficult tasks. It is intended to run at lower frequency; whenever you send a new version of your model to Speckle. It is designed to run computations that last for many seconds or minutes, allowing for complex (and time-consuming) automations.
- Automate is **not** intended for real-time parametric modelling in immediate, millisecond response to user adjustments in an application window. This type of activity is better suited for Hypar, NodePen, Viktor, Dynamo, Grasshopper, etc..
- Automate is intended to automate tedious or complex tasks. It is designed to run at a lower frequency whenever you send a new version of your model to Speckle. It is designed to run computations for many seconds or minutes, allowing for complex (and time-consuming) automations.
- Integrations:
- Automate builds on top of Speckle therefore it allows you to integrate with the software you know and love, whether that is SketchUp, Revit, Rhino, Grasshopper, Archicad, Blender, PowerBI, Unity etc. [The list](https://speckle.systems/features/connectors/) is long and growing! Thanks to these Speckle [connectors](https://speckle.systems/features/connectors/) and other integrations, you can send your model directly from your software of choice, and it will automatically start an Automation on Automate. Once the Automation is complete, you can retrieve the results and view them in your application of choice. This doesnt have to be the application you sent the original data from; you could, for example, send data from Revit and view the results in Power BI.
- Other cloud-based applications do allow data to be saved in files and exported to your software, and some have limited integrations with other applications. However, they do not build upon existing deep integrations with your favorite software, as Speckle does!
- Automate results can be viewed in the browser, and the viewer can be embedded in many web pages and applications. The Speckle viewer also has an API which allows for extensions and customisation.
- Automate builds on top of Speckle; therefore, it allows you to integrate with the software you know and love, whether SketchUp, Revit, Rhino, Grasshopper, ArchiCAD, Blender, PowerBI, Unity, etc. [The list 🔗i](https://speckle.systems/features/connectors/)s long and growing! Thanks to these Speckle [Connectors 🔗a](https://speckle.systems/features/connectors/)nd other integrations, you can send your model directly from your software of choice, and it will automatically start an Automation on Automate. Once the Automation is complete, you can retrieve the results and view them in your application. This doesnt have to be the application you sent the original data from; you could, for example, send data from Revit and view the results in Power BI.
- Other cloud-based applications allow data to be saved in files and exported to your software, and some have limited integrations with other applications. However, they do not build upon existing deep integrations with your favourite software, as Speckle does!
- Automate results can be viewed in the browser, and the viewer can be embedded in many web pages and applications. The Speckle viewer also has an API which allows for extensions and customisation.
- Languages and existing software:
- Automate can run any language, framework, and existing software (see our [Function specification](./function-specification)). We provide helpful SDKs and documentation for commonly used languages, e.g. C# and Python, but it is not necessary to limit yourself to just those.
- Automate can run any language, framework, and existing software (see our [**Function specification**](https://deploy-preview-190--speckle-docs.netlify.app/automate/function-specification)). We provide helpful SDKs and documentation for commonly used languages, e.g. C# and Python, but limiting yourself to just those is unnecessary.
## Who can create Functions?
### **Who can create Functions?**
Anyone in your team with coding skills or a third party developer can write Automate Functions for your projects. We provide easy-to-use templates, complete examples, documentation, and developer-friendly software development kits to get you started. See our [guide](./create-function) for more details.
- Anyone on your team with coding skills or a third-party developer can write Automate Functions for your projects. We provide easy-to-use templates, complete examples, documentation, and developer-friendly software development kits to get you started. See our [**guide**](https://speckle.guide/automate/create-function) for more details.
## How do I use Automate in my project?
### **How do I use Automate in my project?**
Select an existing Function from the library, and simply create an Automation from it! See our [guide](./create-automation) for more details.
- Please select an existing Function from the library and create an Automation from it! See our [**guide**](https://speckle.guide/automate/create-automation) for more details.
## How can I create a Speckle Function? Do I upload my Functions to Speckle?
### **How can I create a Speckle Function? Do I upload my Functions to Speckle?**
You can start with our Function template or an example and expand on these to develop your own. Automate is integrated with GitHub and you can simply commit your code to your repository. Your Function then appears in the library, where you can assign it to a model or the whole project. See our [guide](./create-function) for more details.
- You can start with our Function template or an example and expand on these to develop your own. Automate is integrated with GitHub, and you can commit your code to your repository. Your Function appears in the library, where you can assign it to a model or the whole project. See our [**guide**](https://speckle.guide/automate/create-function) for more details.
## Who can access my automated workflows?
### **Who can access my automated workflows?**
Speckle Server and Automate have permission controls that prevent any unauthorised access and your intellectual property stays in your organisation. You can read more on Speckles [security in this article](https://speckle.systems/security/).
- Speckle Server and Automate have permission controls that prevent unauthorised access, and your intellectual property stays in your organisation. You can read more on Speckles [**security in this article](https://speckle.systems/security/).** Automations are private to an individual account; anyone with access to the project can see the results of all automation run on the models belonging to it.
## Are there public Functions? Can I share Functions outside my organisation? Can I limit who can use a Function?
### **Are there public Functions? Can I share Functions outside my organisation? Can I limit who can use a Function?**
All Functions are public on [automate.speckle.dev](http://automate.speckle.dev) and available to view in the Function Library. They are shared with all users of Automate. We wish to encourage an open-source ethos and community of collaborators to create outstanding Functions.
- All Functions are public on [**latest.speckle.systems/functions**](https://latest.speckle.systems/functions/) and available to view in the functions list. They are shared with all users of Automate. We wish to encourage an open-source ethos and community of collaborators to create outstanding functions. We will be actively developing additional features to the functions list as we integrate them into the Speckle web application, and we welcome your insights. e.g. organisational lists and user ratings.
We may consider private Enterprise libraries in the future if there is sufficient demand.
### **Where can I find help?**
## Where can I find help?
- If you get stuck, our team will be happy to help you. Head to our [Community Forum](https://speckle.community/invites/Fbk5j1wbRW) and post any issues with Automate in the dedicated channel. We will publish a dedicated section on our tutorials page where you can find more tips and tricks when getting started.
If you get stuck our team will be happy to help you. Simply head to our [Community Forum](https://speckle.community/invites/Fbk5j1wbRW) and post any issues you have with Automate. There is a dedicated section on our tutorials page where you can find more tips and tricks when getting started.
### **Is there a way to un-publish the already-used functions?**
## Is there a way to un-publish already used Function?
- We wish to retain any function used in automation to ensure that the automation will always be able to be run. However, we are considering ways to archive Functions that are no longer in use to keep the library tidy.
We wish to retain any Function that has been used in an Automation, to ensure that the Automation will always be able to be run. However, we are considering a way to archive Functions that are no longer in use, to keep the library tidy.
### **Can we use third-party libraries? Can I send data to another service?**
## Can we use third-party libraries?
- If the third-party library's licensing terms are compatible with being run on a cloud platform such as Automate, then yes. The library and function must also comply with Speckle's Terms of Service. You are free to link to any other web-accessible API. If you need to use authentication tokens, ensure not to include them in your function code but define a field to allow automation to provide them.
Provided the licensing terms of the third party library is compatible with being run on a cloud-platform such as Automate, then yes. The library and Function must also comply with Speckle's Terms of Service.
### **Is it a Function author's responsibility to describe all limitations, e.g. what host application/object types will be accepted for the function?**
## Is it a Function author's responsibility to describe all limitations, e.g. what host application/object types will be accepted for the Function
- The function author is best suited to understand what their function can handle and has been tested against. We expect them to label their function accordingly to set expectations for automation composers.
The Function Author is best suited to understand what their Function is capable of handling and has been tested against. We expect them to label their Function accordingly to set expectations for Automation composers.
### Are functions checked for malicious activity? How can I trust a function wont steal my project data?
- We will be monitoring data egress but only ad-hoc reviewing some codes as a matter of policy. We hope youll agree that functions as open-source are much less of a black box than other services you might be uploading project data to. Other Automatons and Specklers can review a function if you have specific questions. If you are not confident you can review the code, do not commit to using a function with project data until you are.
- All automations are tied to the revision of a function that was current at the time they were made. The automation list will indicate if newer versions are available, and you can review the changes to the function before updating your automation. It will not be possible for a function to change its operation or what it does with your data without you knowing.

Просмотреть файл

@ -0,0 +1,101 @@
# Testing Your Functions
Functions can be tested using your preferred local testing library. We have also introduced the ability to create special “test automations” that provide you with the ability to test:
1. how a functions business logic executes its intended checks against a real Speckle project, and
2. how it produces the desired function results.
A test automation is a sandbox environment that allows you to connect your local development environment for testing purposes. It enables you to run your code against project data and submit results directly to the connected test automation.
Unlike regular automations, test automations are not triggered by changes to project data. They cannot be started by pushing a new version to a model. Consequently, test automations do not execute published functions.
### How to create test automations
1. Visit the new Automations tab on the project page
![alt text](./img/automations-tab.png)
2. Click the New Automation button
![alt text](./img/new-automation-button.png)
3. Click Create test automation in the bottom left.
![alt text](./img/create-test-automation.png)
4. Follow the instructions to configure your test automation
![alt text](./img/configure-test.png)
5. Congratulations! You now have a test automation against which you can run your automated functions. Uploading new versions of the projects model(s) will provide you with new data against which to test your functions.
![alt text](./img/my-test-automation.png)
### How to use test automations
Both the [C# SDK](https://github.com/specklesystems/speckle-sharp/tree/main/Automate/Speckle.Automate.Sdk) and [Python SDK](https://github.com/specklesystems/specklepy/tree/main/src/speckle_automate) provide utilities for interacting with your test automations from local code environments. We also provide an example function in each supported language:
- [C# example function](https://github.com/specklesystems/SpeckleAutomateDotnetExample)
- [Python example](https://github.com/specklesystems/specklepy)
In either language, the tests can be successfully run once a `.env` file ([in python](https://github.com/specklesystems/speckle_automate_python_example/blob/main/.env.example)) or an `appsettings.json` ([in C#](https://github.com/specklesystems/SpeckleAutomateDotnetExample/blob/main/TestAutomateFunction/appsettings.example.json)) file is configured with the following values:
- `SPECKLE_TOKEN` - See [Creating Personal Access Tokens](https://speckle.guide/dev/tokens.html)
- `SPECKLE_SERVER_URL` - The literal url of your Speckle Server, like [`https://latest.speckle.systems/`](https://latest.speckle.systems/)
- `SPECKLE_PROJECT_ID` - The id for the project with your test automation
- `SPECKLE_AUTOMATION_ID` - The id of your test automation
Both the project id and the automation id can be found in the url of your automations page in the form of `/projects/[project-id]/automations/[automation-id]`.
Once your environment variables are configured in this way, you can write your test cases and use the test setup utilities provided by your languages SDK. Happy hacking!
### Limitations
To set up a sandbox automation you will need:
- a Speckle project you are an owner of
- a function youve published to the Automate marketplace.
- the function needs to have minimum 1 release (its a tech limitation for now)
Note: We do not currently enforce that test results in a test automation are coming from the author of that function. In the future, we are likely to introduce further restrictions on how and when test automations can be used like requiring the test automation owner to be the same user as the author of the function being tested.
::: tip Notes
To create an easy to use yet meaningful testing setup for function authors, weve developed a workflow specifically geared towards providing an easy to use yet robust setup.
When testing the correctness of an automate function, we want to test:
1. how a functions business logic executes its intended checks against a real Speckle project, and
2. how it produces the desired function results.
For this reason we allow the creation of test automations aka automation sandboxes in the automation creation wizard. Test automations may be created on any project, where you are eligible for creating automations.
At its core a test automation is a special type of automation, that does not run, even if the trigger conditions are met (not even manual triggers are allowed). What this means in the background we do not associate the automation with any resource in the Automate Execution engine.
When creating a sandbox automation, we do not ask for function inputs in the wizard, those are better provided in the development environment.
When executing a test run, the automate SDK will hook into the schematically correct test tools to provision a new test automation run, that can be used for the integration test run
To set up a sandbox automation you will need:
- a Speckle project you are an owner of
- a function youve published to the Automate marketplace.
- the function needs to have minimum 1 release (its a tech limitation for now)
- for now, the author match is not enforced, but we will probably turn on a check, that only allows using functions in sandboxes, where the automation composer is the same as the function author
Steps:
- got to the new automation tab on the project page
- click create new automation
- select automation dev mode
- select function from list
- automation created
- follow the instructions on the test automation page, to set up the required input values in your development environment
- run the cli test command ( npm run test, pytest, dotnet test, etc,) that is relevant for your function setup.
- Internally these test commands do the following:
- Finds the Test Automation ID, Function ID, & API token stored in the local development environment
- Calls the API to request a new Automation run and a function run
- Runs the function locally, creating the json file (this can have a uniquely generated file name including timestamp to avoid overwriting previous attempts and allow for later auditing/debugging), updating the input command parameter pointing to the files path.
- test run results should be visible on the automation page and in the projects automation status display
:::

Просмотреть файл

@ -0,0 +1,20 @@
# Getting Started
## Accounts and Authentications
::: tip 💡 You must verify your account on https://latest.speckle.systems.
This is done by responding via the email sent to you on sign-up
:::
To participate in the Speckle Automate beta, you will need:
- A verified account on [latest.speckle.systems](https://latest.speckle.systems)
- An account on [github.com](https://github.com)
- An account on [speckle.community](http://speckle.community)
## User Interface
As a change from the closed beta experience you may have joined, Automate is now fully integrated into our main Speckle web application interface, and you can find it by clicking on a project that you are the owner of:
![Automate integrated into the Speckle web application](./img/integrated-ui.png)

Двоичные данные
automate/img/all-runs-passed.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 198 KiB

Двоичные данные
automate/img/authorise-github.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 73 KiB

Двоичные данные
automate/img/authorised-applications.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 65 KiB

Двоичные данные
automate/img/automation-name.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 49 KiB

Двоичные данные
automate/img/automations-tab.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 90 KiB

Двоичные данные
automate/img/build-and-deploy.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 286 KiB

Двоичные данные
automate/img/choose-model.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 80 KiB

Двоичные данные
automate/img/configuration.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 23 KiB

Двоичные данные
automate/img/configure-test.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 218 KiB

Двоичные данные
automate/img/create-automation.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 89 KiB

Двоичные данные
automate/img/create-button.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 22 KiB

Двоичные данные
automate/img/create-test-automation.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 213 KiB

Двоичные данные
automate/img/function-created.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 448 KiB

Двоичные данные
automate/img/function-library-card.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 112 KiB

Двоичные данные
automate/img/integrated-ui.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 209 KiB

Двоичные данные
automate/img/model-error.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 24 KiB

Двоичные данные
automate/img/my-test-automation.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 98 KiB

Двоичные данные
automate/img/new-automation-button.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.3 KiB

Двоичные данные
automate/img/new-function-button.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 40 KiB

Двоичные данные
automate/img/passed-runs.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 27 KiB

Двоичные данные
automate/img/paused-status.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 37 KiB

Двоичные данные
automate/img/readme.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.8 MiB

Двоичные данные
automate/img/repo-secrets.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 77 KiB

Двоичные данные
automate/img/repo-title.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 197 KiB

Двоичные данные
automate/img/result-metadata.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 708 KiB

Двоичные данные
automate/img/results-card.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 209 KiB

Двоичные данные
automate/img/run-success.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 25 KiB

Двоичные данные
automate/img/scene-viewer-results.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 83 KiB

Двоичные данные
automate/img/selected-function.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 88 KiB

Двоичные данные
automate/img/set-parameters.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 157 KiB

Просмотреть файл

@ -0,0 +1,23 @@
# Important Caveats
### Your Data
Our development server ([latest.speckle.systems](http://latest.speckle.systems)) has always been flagged as “transient” because we keep the server at the cutting edge of our development branch. While project data is handled exactly like all our stable servers, it comes with the note that we reserve the right to tear down the server and database and build it up again. Your functions will, by nature, be safe in GitHub, but automations, automation runs and results may be lost.
At the end of the Beta program, there is no plan to migrate either project data or automations to any other Speckle server.
### Your Access
Your access to Speckle Automate beta is at our discretion as we build and test the infrastructure. We have deliberately designed Automate to be highly open and permissive regarding what is possible to build. At the same time, we have some sophisticated tools to check the contents of running containers and WILL find crypto miners, spam email servers, and other nefarious use cases. There is a zero-tolerance policy, and access will be removed instantly.
### Open by Design
There are no sandbox restrictions on making external calls, limits on dependencies used, or artefact sizes. We will explore the best fit between function needs and compute platform offerings. Speckle does not currently accept inbound calls to its infrastructure. All automations are anticipated to be created, configured, and managed within the Speckle Automate interface.
### Our Infrastructure
If your code can be defined to run within a container that will run on a Linux machine, then Automate will run it (we hope). We are exploring how to support Windows runtimes and how to offer GPU computing. Speckle Automate beta can be assumed to be CPU execution only until further notice.
### Our Ethical Use and Privacy
Speckle does not use data uploaded to any Speckle server for purposes other than support when invited to join projects. We monitor logs to maintain integrity and server health and can debug problems from there without viewing user data. Function authors acknowledge that their functions are source-available and that they are responsible for their organisation's privacy, intellectual property, and security.

4
automate/known-issues.md Normal file
Просмотреть файл

@ -0,0 +1,4 @@
# Known Issues
- The functions library functions are all being updated to the latest version of the SDK. This means that some functions may not work as expected. If you encounter any issues, please report them to the Speckle team.
- Automation run executions and their results performed during the closed beta are not visible in the new web application integration. They are also no longer enabled. New automations will need to be made to see results.

Просмотреть файл

@ -0,0 +1,147 @@
# Function Code Anatomy
With your function project made and the code available on GitHub, you can start making it your own. Where you choose to develop (locally or codespace) is up to you, but assuming locally on your machine for now, we can clone the project as per the success instructions and cover some of the code architecture.
::: tip 💡 .github
This directory is for automations used to keep your function code up to date and ease the publishing process.
- `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 Automate
:::
The template projects for specklepy and speckle-sharp include all required for a working function to deploy in an automation. The anatomy doesnt have to match exactly, but it does have to have these key components:
### Function Inputs
- **Python**
This is a class object of `FunctionInputs` subclassing `AutomateBase` from the SpecklePy Automate SDK in Python.
Defining properties of this class using [Pydantic](https://docs.pydantic.dev/latest/usage/models/) `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.
```python
class FunctionInputs(AutomateBase):
text_input: str = Field(
title="Text Input",
description="Values given in this field will be available with the `text_input` key."
)
scalar_value: float = Field(
default=25.0,
title="Numerical value",
description=( "Annotating a field and providing a default value will tell the "
"Automate UI to treat the input field as a number" )
)
selection: str = Field(
default=Selection.default,
title="Select an option",
description=( "Specifying a class and value as the default will provide the "
"UI with a drop-down selection, preselecting the default value",
json_scheme_extra={
"examples": ["default", "option 2", "option 3"]
}
)
read_only: str = Field(
default="Placeholder",
title="Disabled Input Field",
description=( "Marking a field as readOnly will disable the UI input,"
"which can be used to mock input UI for future revision "
"or pass values specific to a function revision." )
)
```
- C#
```csharp
#FunctionInputs.cs
struct FunctionInputs
{
[Required]
public string TextInput; // A required string input. UI will infer the Property Title
[Range(0.0, 100.0)]
public float ScalarValue; // A float variable between 0 and 100
[DisplayName("Specific Input Title")]
[Description("This is a description for the example input.")]
public string DecoratedInput; // A range of Attributes applied.
}
```
- **Secrets Management**
It is possible to flag function inputs so that the Automate UI will obfuscate them on entry in the typical web fashion (`********`). This will also cause Automate to store these as encrypted and only pass them as plain text within `AutomateContext` at runtime.
- C#
```csharp
struct FunctionInputs
{
[Secret]
public string SecretInput; // Mark a field as secret for passwords and 3rd party tokens
}
```
- Python
```python
from Pydantic import SecretStr
class FunctionInputs(AutomateBase):
secret_input: SecretStr = Field(
title="Secret Input",
description=( "Marking a field as readOnly will disable the UI input,"
"which can be used to mock input UI for future revision "
"or pass values specific to a function revision." )
)
```
### Run Entry Points
In the GitHub action, there is a space to define the eventually built function as it would be executed from a command line with either `dotnet SpeckleAutomateDotnetExample.dll` or `python [main.py](http://main.py/) run`, which is the general rule for all Automate functions, whether defined with the template projects or not.
- **Python**
The essential execution of a Python SDK function is:
```csharp
if __name__ == "__main__":
execute_automate_function(automate_function, FunctionInputs)
```
`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.
- **C#**
The template executable method using the dotnet SDK is:
```csharp
#Program.cs
return await AutomationRunner
.Main<FunctionInputs>(args, AutomateFunction.Run)
.ConfigureAwait(false);
```
`FunctionInputs` is as weve 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.
::: tip 💡 You may rename and restructure your function code as you wish as long as these execution entry points are followed. However, it may make sense to adopt the template's structure to debug easily and allow others to follow the flow for the beta testing.
The main `.csproj` for dotnet functions should be renamed to reflect your function name; make sure to adjust the `workflow/main.yml` file to reflect this.
:::
### 🧪 Testing
Functions must be registered to Automations to trigger by events. It is recommended that you implement a structure of your project such that a lot of the business logic can be tested independently of the specifics of both the Automate environment and the Speckle data triggering the events.
::: warning TODO
We will cover testing strategies more later, but the demonstration projects are all available to explore. We have examples of testing on live project data for unit tests and end-to-end integration testing.
:::

Просмотреть файл

@ -4,7 +4,7 @@ We recommend to always create a new Function from one of the templates provided
However, if you do already have a GitHub repository for a Function, you can register that with Automate.
## Registering an existing Function
### Step by step guide
1. Click your profile icon in the top right corner of the Automate web application and select `API and Dev Info`.
1. Copy the `API token` and save securely. This token can be used to authenticate with the Speckle Automate API and undertake actions on your behalf. It should be treated as securely as a password.

Просмотреть файл

@ -2,6 +2,26 @@
New versions of a Function will be created automatically when a new GitHub release is created.
# Deployment
Your function's deployment is very straightforward when you are confident in the business logic. The GitHub action is triggered on a release. It will:
- Spin up a deployment container,
- Extract your functions input schema and validate it
- Build your function code
- Send to Speckle Automate server as an API call with your credentials and successfully compiled code.
- Automate will validate the payload and report success.
This way, only code that has completed the build steps will be sent to Automate. Once a release has been successfully sent, your function will appear in the functions list.
Points to look out for:
1. You can customise your `workflow.yml` if you want a multipart build step or customise the `functionInputs.json`; ensure the steps generate all the necessary artefacts.
2. The template projects include the basic `Dockerfile` that will be deployed to Speckle Automate. This can be customised to build a set of dependencies and libraries or even custom-build Python if you need a specific version. The container derived from this Dockerfile represents your execution runtime.
3. It will be important to keep the GitHub action up to date as this is where the API call for publishing is made; any.. changes to the API will need to be reflected.
# Releasing a New Version
For detailed instructions on how to create a new GitHub release, please refer to [GitHub's documentation](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository). We recommend using the [Semver naming convention](https://semver.org/) for your release names.
Releasing a new version of your Function code causes a [GitHub Action](https://github.com/features/actions) to run. This can be viewed in the Actions tab along the top of your GitHub repository. If there are any errors in the release process, they will be displayed here.

30
automate/roadmap.md Normal file
Просмотреть файл

@ -0,0 +1,30 @@
# Roadmap
Much of the roadmap for development will be shaped by the feedback we receive from the beta testers. We are looking for feedback on the developer experience, the automation experience, the integration of the automation results in the Speckle viewer, and how you would see Automate as a paid product.
Anything that does not yet exist listed here is entirely speculative and subject to change.
### Phase 1: Closed Beta
This phase is now complete. We will share the findings at a future community standup.
### Phase 2: Open Beta
This is the current phase.
1. Integrated the Automate platform into the Speckle development server [latest.speckle.systems](https://latest.speckle.systems).
2. A new sandbox environment for the local testing for function code against server data.
3. We are looking for feedback on the user experience and the integration of the automation results in the Speckle viewer.
### Phase 3: Public Beta
The Public Beta launch is planned for later in 2024. This will include:
1. Full integration into Speckle web application and migrated to [app.speckle.systems](https://app.speckle.systems) with abilty to run automations against production data.
2. The ability to have private functions for your organisation.
3. Multi-model triggers for automations.
4. The public function library will be discoverable and searchable.
### Phase 4: Product Launch
Speckle Automate Public Beta will cease as a program on full Automate launch in 2025.
1. A product with distinct payment and freemium tiers reflecting runtimes and processor specs.
2. Ability to publish code from Gitlab, Azure DevOps, Bitbucket, GitHub and others.
3. Composable automations with multiple triggers, functions and outputs.

Просмотреть файл

@ -0,0 +1,12 @@
# Troubleshooting
### Failed Automations
Automations may show a FAILED state for three categories of reasons:
- **By design**: a function successfully executes but marks the automation as Failed as part of its logic because the version data has failed the checks or analysis being run. — **Check the automation run reports in the UI**
- **By code error:** a function has exited unexpectedly early due to code logic errors. — **Check the logs to review the error message**
- **By platform error**: something in the platform has caused the execution to fail. This could be because:
- The function container is incorrectly configured — **Check the logs to review the error message**
- The available compute resource for the function container has run out of memory. — **Check the logs to review the error message**
- Squirrels have eaten through the wires — **Call animal welfare and request a rehoming**.

Просмотреть файл

@ -0,0 +1,36 @@
# Viewing results in Speckle UI
There are two entry points to Automate results:
### From the Model Scene View
If automations are running or have been completed, a results doughnut icon will appear. Clicking on this will reveal all the automations that have reported results for the currently viewed version.
![Automate results in model scene viewer](./img/scene-viewer-results.png)
Clicking either of the runs cards will expand to show:
![Automation run results card](./img/results-card.png)
- Status: The message included with a Fail or Success result.
- Attachments: Any artefacts uploaded by the function.
- Resulting Models: An option to add any model version produced by the function.
- Results: Each result report with its status, category, object count and message as reported by the function
- Clicking on a results card will isolate the objects reported by the card and
- Where the result includes metadata, a filter function may be presented to highlight the outcome
![result metadata view](./img/result-metadata.png)
### From the project dashboard
In the models list or card view, each model with automation runs completed will show the same doughnut icon.
![model-list-indicator](./img/passed-runs.png)
- Clicking the doughnut in the model list will show a summary, as seen above, but with additional options.
![automation list showing all runs passed](./img/all-runs-passed.png)
- **View Results**: Will link through to the relevant version and use the results context view to include any other models or objects
- **Open Model**: Will open the model at the latest version
- **View Artefact**: Will either open the artefact in a new browser tab (images) or prompt to download (files)

Просмотреть файл

@ -7,6 +7,10 @@
{
"path": "./user",
"name": "Speckle User Guide"
},
{
"path": "./automate",
"name": "Speckle Automate Guide"
},
{
"path": ".",