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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file maple_spec-0.0.5.tar.gz
.
File metadata
- Download URL: maple_spec-0.0.5.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e8bba0b6732f3bcb9064fb44f6d51bf77e86700d7a2e5c998d3dd9a69af9a8c |
|
MD5 | b7558ca2f71ca0e2240920023fc26b31 |
|
BLAKE2b-256 | efbe583e1c2e3d1ee8160d0b832ab17a5c5449462fa55e04a8137c1ff64aaaec |
File details
Details for the file maple_spec-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: maple_spec-0.0.5-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3752f86ce35956e64c6fd14861c0f181b6e642b42b8c71a492aff8824d799892 |
|
MD5 | 998f316788d8db1acbf4d8ce1910aade |
|
BLAKE2b-256 | 4eba1d8ec51a90f72bdfd56dae8127d3c05db567bfda519b88650853aa0fd2e3 |