Skip to main content

Maple

Automate your model Quality Check with Speckle and Maple

About

Maple is a library designed to write simple code that can check different attributes of a Model in Speckle.

Using Maple you can write test specs that check any parameter or quantity inside the project model.

Maple can be integrated into Speckle Automate to run the quality check tests on a continuous integration and ensure project standards. See Maple-Automate-CI to check the full implementation of maple in Speckle Automate.

Get started

Install the library from PyPi

pip install maple-spec

Then, create your main.py to test your specs locally

# main.py
import maple as mp

def spec_a():
    mp.it("checks window height is greater than 2600 mm")

    mp.get('category', 'Windows')\
        .where('speckle_type',
               'Objects.Other.Instance:Objects.Other.Revit.RevitInstance')\
        .its('Height')\
        .should('be.greater', 2600)

# Use the stream id of one of your projects
mp.stream("streamid")
mp.run(spec_a)

For this to work out of the box, you should have the Speckle Manager installed and your account set-up, so Maple can fetch the data from your stream.

If not, alternatively you can set an environment variable called SPECKLE_TOKEN with a Speckle token that can read from streams, for example:

SPECKLE_TOKEN="your-secret-token"

Finally run the file with python like so:

python main.py

Metadata

Release files for maple-spec 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maple-spec 0.0.3
File Size Uploaded
maple_spec-0.0.3.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maple-spec 0.0.3
File Interpreter ABI Platform
maple_spec-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 18.9 kB

Release files / maple_spec-0.0.3.tar.gz

Download URL maple_spec-0.0.3.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
752fb74f817fe65000a713d1b437e50e34650f2fa5506679c7d44557a6d267ec
BLAKE2b-256 checksum
How to use checksums
28b2beab0ccf718572d2ff37e0143f2da37aca72eeb72725e365f0b8a04bf346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / maple_spec-0.0.3-py3-none-any.whl

Download URL maple_spec-0.0.3-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b466eeaffa19edd205a3690add1d49e1b46759e717a4db7492d4f0890a76cb59
BLAKE2b-256 checksum
How to use checksums
f486faae5d9304be7f085f9c782ba718bf899fa60d04a6689fc0bad7e6662bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page