GithubHelp home page GithubHelp logo

gergo-hello-aec-tech-function's Introduction

Speckle Automate function template - Python

This is a template repository for a Speckle Automate functions written in python using the specklepy SDK to interact with Speckle data.

This template contains the full scaffolding required to publish a function to the automate environment. Also has some sane defaults for a development environment setups.

Getting started

  1. Use this template repository to create a new repository in your own / organization's profile.

Register the function

Add new dependencies

To add new python package dependencies to the project, use: $ poetry add pandas

Change launch variables

describe how the launch.json should be edited

Github Codespaces

create new repo from template, and use the create new code

Local dev environment

Archive

This is a simple example of how to use the Speckle Automate Python package to automate the creation of a Speckle stream.

Using this Speckle Function

  1. Create a new Speckle Automation.
  2. Select your Speckle Project and Speckle Model.
  3. Select the existing Speckle Function named Random comment on IFC beam.
  4. Enter a phrase to use in the comment.
  5. Click Create Automation.

Getting Started with creating your own Speckle Function

  1. Fork this repository.
  2. Clone your forked repository to your development environment, or use GitHub CodeSpaces.
  3. Register your Function with Speckle Automate.
  4. After completing the registration of the Function you will be shown a Function Publish Token and a Function ID. You will need these later.
  5. Save your Function Publish Token as a GitHub Action Secret named SPECKLE_AUTOMATE_FUNCTION_PUBLISH_TOKEN.
  6. Save your Function ID as a GitHub Action Secret named SPECKLE_AUTOMATE_FUNCTION_ID.
  7. Make changes to your Function in main.py. See below for the Developer Requirements, and instructions on how to test.
  8. Every commit to main branch will create a new version of your Speckle Function.

Developer Requirements

  1. Install the following:
  2. Run poetry shell && poetry install to install the required Python packages.

Building and Testing

The code can be tested locally by running poetry run pytest. The code should also be packaged into the format required by Speckle Automate, a Docker Container Image, and that should also be tested.

Resources

  • Learn more about SpecklePy, and interacting with Speckle from Python.

gergo-hello-aec-tech-function's People

Contributors

gjedlicska avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.