Files
speckle-automate-checker/DEVELOPER_README.md
T
Jonathon Broughton b7ff0137b1 Split Readmes (#15)
* Add project configuration and refactor logic

- Created .gitignore to exclude IDE files.
- Added project module configuration for Python.
- Set up inspection profiles for code quality checks.
- Refactored main function logic into separate modules for better organisation.
- Introduced helper functions for object manipulation and rule processing.
- Implemented spreadsheet reading functionality to dynamically load rules.
- Added tests for integration with the Speckle server.

* Add developer guide

- Introduced a new developer README with setup, project structure, testing, and deployment instructions.
- Revised the primary README to reflect changes in functionality and usage instructions for the Checker function.
2025-02-06 21:33:18 +00:00

994 B

Checker Function Development Guide

Setup

  1. Install dependencies:
poetry shell && poetry install
  1. Configure .env:
SPECKLE_TOKEN=your_speckle_token
SPECKLE_SERVER_URL=app.speckle.systems

Get test automation details from app.speckle.systems

Project Structure

  • function.py: Main business logic
  • rules.py: Rule definitions and processing
  • inputs.py: Function input schema
  • helpers.py: Utility functions
  • spreadsheet.py: TSV handling

Testing

poetry run pytest

Extending Rules

  1. Add new predicate to input_predicate_mapping in rules.py
  2. Create corresponding method in RevitRules class
  3. Update tests

Building

The function is packaged as a Docker container:

docker build -f ./Dockerfile -t checker .

Local Testing

docker run --rm checker python -u main.py run [automation_data] [parameters] [token]

Deployment

Create a GitHub release to trigger deployment to Speckle Automate.