2.0.0: major performance boost and other improvements
After 16 months of public beta and 8 beta versions, python-constraint 2 is ready for release π
It brings major performance optimizations, an overhaul of the project structure, and automated testing and reporting.
This new version can be installed with pip install python-constraint
.
Summary of major optimizations:
- Cythonized the package and added typing
- Added the (now default) OptimizedBacktracking solver based on #62
- Added the MaxProd and MinProd constraints
- Optimized the Function and MaxSum constraints
- Wider choice of output formats (use
getSolutionsOrderedList
orgetSolutionsAsListDict
) - Overall optimization of common bottlenecks
In all, this results in a two- to three- orders of magnitude speedup over the old version.
Various engineering changes were made as well, including:
- Split the codebase into multiple files for convenience
- Achieved and requires test coverage of at least 80%
- Switched from
setup.py
topyproject.toml
- Added nox for local testing against all supported Python versions
- Added ruff for code style testing
- Dropped Python 3.4, 3.5, 3.6, 3.7, 3.8 support
For more extensive information on these changes, check #76 and here