Releases: imaginationtech/constrainedrandom
Releases · imaginationtech/constrainedrandom
1.2.1
Minor release, as there are no new API features and no API changes.
However, this is quite a major update.
Fixes:
- Issue with cached randomization results when relying on member variables that are not themselves random variables.
- Performance issue for class based variables.
Improvements:
- Debugging experience is vastly improved with overhauled exceptions and reporting.
- Performance graphs for assessing the performance impact of changes.
- Docmentation updates.
- Benchmark now uses unit testing framework, so code is shared. Benchmark test cases now much easier to create.
1.2.0
- Add support for using class instance methods as constraints
- Now supports inheritance and method overriding, better allowing constrainedrandom to be used in an object-oriented manner.
- Add documentation for using class features
- Add testing for using class features
- Expose sparsities to user via
set_solver_mode()
- Fix obscure issue around random-length lists
Full Changelog: 1.1.2...1.2.0
1.1.2
- Fix overflow bug for large variables in multi-var problems
1.1.1
Bug fixes:
- Fix strange user bug when using non-pure function as a constraint.
- Add unit test to catch this bug.
Misc improvements:
- Change input sanity parsing to use exceptions, not asserts.
1.1.0
1.1.0
New features:
- Add random-length lists by specifying
rand_length
inadd_rand_var
Documentation:
- Documentation for random-length lists
Testing:
- Many new test cases for lists
Bug fixes:
- Very rare corner case for random lists using CSP found and fixed.
1.0.3
- Better testing and bug fixes for globally-seeded objects.
- Fixed issue where list objects weren't deterministic when resetting the global seed with
random.seed(x)
. - Fixed issue that caused an unhandled exception when calling
copy.deepcopy
on aRandObj
instance using global seeding. - Split random list solver into naive and fast, add user-facing option to disable naive.
- Previously this was optimized manually, but in a stateful way that impacted determinism.
- Therefore this is considered a bug fix rather than a feature addition.
- Change benchmarking for this accordingly.
1.0.2
1.0.1
1.0.0
API changes:
- Constructor no longer mandates an instance of
random.Random
.- Determinism can be controlled globally via
random.seed()
. - See documentation for details.
- Determinism can be controlled globally via
add_multi_var_constraint
->add_constraint
- Now supports adding extra single-var constraints too.
set_naive_solve
->set_solver_mode
- See documentation.
- Add
with_constraints
andwith_values
arguments toRandObj.randomize()
- See documentation.
add_variable
now supports alength
argument for random lists.- See documentation.
Other changes:
- Debugging information when constraints are unsolvable.
- Performance improvements.
- Determinism bugfixes around PYTHONHASHSEED.
- Improved "How to" guide.
- Much better unit tests.
0.0.1
Initial public Pypi package
Package:
https://pypi.org/project/constrainedrandom/0.0.1/
Documentation:
https://constrainedrandom.readthedocs.io/en/0.0.1/