1.1.0
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
* Improves rule number handling Adds a fallback mechanism for retrieving rule numbers. This ensures the system can handle cases where the primary "Rule Number" field is missing or empty, defaulting to "Rule #" to maintain data integrity. Also corrects some docstring formatting. * Improves rule processing efficiency Avoids unnecessary rule processing by checking rule severity against the minimum configured severity level. Also ensures that results are only attached to failed objects if they exist and meet the minimum severity criteria. Addresses a potential issue where rules with no "Report Severity" column could cause errors, by considering an alternative "Severity" column. * Adds Python compatibility inspection Ensures that the project is compatible with Python 3 by adding a compatibility inspection setting. This will help to identify and address any potential compatibility issues early on. * Updates integration test URL and severity. Updates the default URL used in the integration test to a new speckle model checker endpoint. Changes the minimum severity level from warning to info, increasing the detail of reported results.
Speckle Checker
Speckle Checker is an Automate function that validates Speckle objects against configurable rules defined in a spreadsheet. This approach provides a flexible way to implement quality checks without coding, making it accessible to all team members.
Overview
The Checker function allows you to:
- Define validation rules in a spreadsheet
- Configure severity levels for issues
- Check properties across different types of objects
- Generate reports of validation results
- Apply consistent standards across projects
Getting Started
1. Prepare Your Rule Spreadsheet
- Access the template spreadsheet
- Use the Speckle menu to launch the Speckle sidebar and make a copy.
- Define your rules using the format explained below
- Publish your rules by clicking "Publish Rules". Copy the resultant URL.
2. Create an Automation
- Go to your workspace project in Speckle
- Create a new Automation
- Select the Checker function
- Configure the function:
- Paste your published rules URL
- Set minimum severity level to report
- Configure other options as needed
- Save and run your automation
Rule Definition Format
Rules are defined in a spreadsheet with the following columns:
| Rule Number | Logic | Property Name | Predicate | Value | Message | Report Severity |
|---|---|---|---|---|---|---|
| 1 | WHERE | category | matches | Walls | Wall thickness check | ERROR |
| 1 | AND | Width | greater than | 200 | ||
| 2 | WHERE | category | matches | Columns | Column height check | WARNING |
| 2 | AND | height | in range | 2500,4000 |
Column Explanation
- Rule Number: Groups conditions that belong to the same rule
- Logic: Defines how conditions are combined (WHERE, AND, CHECK)
- Property Name: The object property or parameter to check
- Predicate: Comparison operation (equals, greater than, etc.)
- Value: Reference value for comparison
- Message: Description shown in validation results
- Report Severity: ERROR, WARNING, or INFO
Supported Predicates
| Predicate | Description | Example |
|---|---|---|
| exists | Checks if a property exists | height exists |
| equal to | Exact value match | width equal to 300 |
| not equal to | Value doesn't match | material not equal to Concrete |
| greater than | Value exceeds threshold | height greater than 3000 |
| less than | Value below threshold | thickness less than 50 |
| in range | Value within bounds | elevation in range 0,10000 |
| in list | Value in allowed set | type in list W1,W2,W3 |
| contains | Property contains substring | name contains Beam |
| does not contain | Property doesn't contain | name does not contain temp |
| is true | Boolean property is true | is_structural is true |
| is false | Boolean property is false | is_placeholder is false |
| is like | Loose text matching | name is like Wall matches Walls |
Rule Logic
- WHERE: Filters objects to check (like SELECT WHERE in SQL)
- AND: Additional filter conditions
- CHECK: Final check condition (optional, defaults to last AND)
Objects pass a rule when they match all conditions. Objects that match WHERE/AND filters but fail the CHECK condition are reported as issues.
Working with Object Properties
The Checker understands properties in Speckle objects regardless of schema:
- Direct properties:
category,name,id - Nested properties:
parameters.WIDTH.value - Revit parameters: Use parameter names like
Mark,Width,Assembly Code
Example Rules
Wall Thickness Check
Rule 1: WHERE category equals "Walls" AND width less than "200"
Message: "Wall too thin - minimum thickness is 200mm"
Severity: ERROR
Door Naming Convention
Rule 2: WHERE category equals "Doors" AND name is not like "^D\d{3}$"
Message: "Door name must follow pattern D followed by 3 digits"
Severity: WARNING
Structural Column Height Range
Rule 3: WHERE category equals "Columns" AND is_structural is true AND height not in range "2400,4000"
Message: "Structural column height outside acceptable range (2400-4000mm)"
Severity: ERROR
Support
For issues or questions, please let us know on the Speckle Community Forum.
Description
Languages
Python
97.5%
Dockerfile
1.4%
Shell
1.1%