Skip to main content

A testing library for Speckle models

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maple_spec-0.0.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

maple_spec-0.0.4-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file maple_spec-0.0.4.tar.gz.

File metadata

  • Download URL: maple_spec-0.0.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for maple_spec-0.0.4.tar.gz
Algorithm Hash digest
SHA256 af9ad8d9771d38e5c031d9b172237c4c748a67cce3a8eaced3690319ec3dc9a2
MD5 d355ea7a70b17529e302939b68a37030
BLAKE2b-256 eaacc0189559ac7fb80e1c5566ad9c488cce664120b317a8697b92685d1f1532

See more details on using hashes here.

File details

Details for the file maple_spec-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: maple_spec-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for maple_spec-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bcbf8a921c5bb398a071b169265818dc8f77be57a8370b05ce82e26bfdcefb19
MD5 54d53afcd783f20faae9e3818e65c91e
BLAKE2b-256 d672eb73628ebb6a3ec8da5bfa230e4128896a5c0984ec3f5c381e84e4af205f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page