Thanks to visit codestin.com
Credit goes to github.com

Skip to content

2.0.0: major performance boost and other improvements

Compare
Choose a tag to compare
@fjwillemsen fjwillemsen released this 29 Jan 14:32
· 140 commits to main since this release

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 or getSolutionsAsListDict)
  • 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 to pyproject.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