Skip to main content

Revl

PyPI latest version Documentation status License

Revl is a Python library that helps to benchmark code for Autodesk Maya.

Upon writing a piece of code for Maya, it might be interesting to know how it performs under different conditions, such as within scenes that are large or small, that define a deep DAG hiearchy or a flat one, that use many node types or only a few, and so on.

Following sets of user-provided commands, Revl can pseudo-randomly generate Maya scenes with different properties against which the behaviour of a piece of code can be observed.

The random nature of the process can also help revealing potential bugs by exposing edge cases that were not thought of, thus making it also a good tool for unit testing. See Wikipedia’s Fuzzing page.

Note that Revl does not provide any sort of profiling tool to measure performances. The built-in timeit module as well as other open-source packages can be used for this purpose.

Features

  • generates scenes by running commands a given total number of times.

  • fine control over the probability distribution for each command.

  • scene generations are reproducible using a fixed seed.

  • extensible with custom commands.

  • allows for fuzz testing.

  • fast (using Maya’s API, not the command layer).

Usage

>>> import revl
>>> commands = [
...     (4.0, revl.createTransform,),
...     (1.0, revl.createPrimitive, (), {'parent': True}),
... ]
>>> count = 100
>>> revl.run(commands, count, seed=1.23)

In this example, Revl invokes a total of 100 evaluations inequally shared between the two distinct commands provided, leading to create approximatively 80% of transforms, and 20% of primitives (plus their associated transforms). Also, the primitive type is picked randomly, and each primitive’s transform is randomly parented under another transform from the scene, possibly creating a scene with a deep DAG hierarchy.

See the Tutorial section from the documentation for more detailed examples and explanations on how to use Revl.

Documentation

Read the documentation online at revl.readthedocs.io or check its source in the doc directory.

Out There

Projects using Revl include:

Author

Christopher Crouzet <christophercrouzet.com>

Metadata

Release files for revl 0.2.0

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

Source distribution (sdist)

Source distribution for revl 0.2.0
File Size Uploaded
revl-0.2.0.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for revl 0.2.0
File Interpreter ABI Platform
revl-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 31.4 kB

Release files / revl-0.2.0.tar.gz

Download URL revl-0.2.0.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0d9c752166dcdaaf5cc64293da3c8a8bb6f18901d4e8114f0a1711692959f5ad
BLAKE2b-256 checksum
How to use checksums
c5dcc4506aae2f32268d5c1bc29b079e518d63b335273eec5d5b64a98af1b454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / revl-0.2.0-py2.py3-none-any.whl

Download URL revl-0.2.0-py2.py3-none-any.whl
Size 11.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
01dddc28a494ab4e7a13dabcb654bd17cf6a23a440b4cd40a858bf3c8c3c44c7
BLAKE2b-256 checksum
How to use checksums
0d7dd2b43d6203d95afc69643d1e18468c999418f12b4006b5872d100121fcec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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