Skip to main content

A library for creating and solving constrained randomization problems

Project description

constrainedrandom

A package for creating and solving constrained randomization problems.

Use this package to create SystemVerilog-style "declarative" randomizable objects in Python.

This is achieved by providing wrappers around the Python random and constraint packages, and aims to be as efficient as possible in a language like Python.

Installation

$ pip install constrainedrandom

Documentation

Read the docs here

To build the documentation yourself:

$ cd docs
$ make html

The index page is at docs/_build/html/index.html - you can open this in a web browser.

Tests and benchmarks

Please see tests/README.md and benchmarks/README.md for more information.

Releases/versioning

Releases are created using tags from the repository and can be found on PyPI.

Versioning attempts to follow Semantic Versioning.

Contributions

Please feel free to contribute to the project, following these guidelines:

  • Please contribute by creating a fork and submitting a pull request.
  • Pull requests should be as small as possible to resolve the issue they are trying to address.
  • Pull requests must respect the goals of the library, as stated in the documentation.
  • Pull requests should maintain backwards compatibility at least as far as Python 3.8.
  • Pull requests should pass all the tests in the tests/ directory. Run python -m tests.
  • Pull requests should take care not to make performance worse except for cases which require bug fixes. Run python -m tests and python -m benchmarks.
  • Pull requests should update the documentation for any added/changed functionality.

TODO

  • Add proper CI using tox or similar, testing Python versions 3.8..current
  • Add equivalent SystemVerilog testcases for benchmarking.

Contact the author(s)

Will Keen - william.keen@imgtec.com

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

constrainedrandom-1.2.2.tar.gz (60.3 kB view details)

Uploaded Source

Built Distribution

constrainedrandom-1.2.2-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file constrainedrandom-1.2.2.tar.gz.

File metadata

  • Download URL: constrainedrandom-1.2.2.tar.gz
  • Upload date:
  • Size: 60.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for constrainedrandom-1.2.2.tar.gz
Algorithm Hash digest
SHA256 07093cca031149b1b972662f0022434fb75e54802c8307d6710546d09dc5ee6b
MD5 f5753cac37a019e8e67ec1528e3f53cb
BLAKE2b-256 b6042a9a8a7c7dffae880f7ae1e87463c041aa433477d9d41f2ab2143c2d01be

See more details on using hashes here.

File details

Details for the file constrainedrandom-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for constrainedrandom-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 728a2f321a6ab23e7d7127fdee2bd9faa76d9842f28b526fb7062dc8500f9437
MD5 9751f97cef3b6540d0014624d863e4bf
BLAKE2b-256 9e735647e705450033bcd13cfb494ae6ef8a2df403c0f362a2fddbd00498744f

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