Skip to content

Releases: MiniZinc/minizinc-python

MiniZinc Python 0.9.0

04 Apr 06:31
3fc2ffc
Compare
Choose a tag to compare

Added

  • Add support for MiniZinc tuple and record types.

Changed

  • Minimum supported version of MiniZinc has increased from 2.5.0 to 2.5.4.

Fixed

  • Ensure time events send using the JSON stream are parsed as timedelta objects.
  • Pass JSON definitions in using JSON instead of generated DZN files.

MiniZinc Python 0.8.0

06 Feb 05:56
7324d34
Compare
Choose a tag to compare

This release concerned mostly some of the internals of the Python package, and its dependency management. The little external changes are listed below.

Removed

  • BREAKING: The project no longer supports Python 3.6. This change will make it easier to manage MiniZinc Python's build system.

Fixed

  • Fix the conversion when using a Python enumerated type in MiniZinc that uses non-ascii identifiers.

MiniZinc Python 0.7.0

13 Jul 04:30
a195cf6
Compare
Choose a tag to compare

Added

  • Add additional Driver.executable property to safely access the location
    of the executable used by the Driver object.
  • Support for input and output of complex MiniZinc enumerated types, such as
    anonymous enumerated types or enumerated types using constructor functions.

Removed

  • BREAKING: The project no longer contains the (uncompleted) direct library
    connection to libminizinc. With this change come some simplifications in methods of
    relocated from CLIDriver and CLIInstance, and the move of find_driver to
    Driver.find.

Fixed

  • Store statistics as a string when incorrectly reported by the solver.
  • Fix the conversion of statistics when using MiniZinc 2.6+

MiniZinc Python 0.6.0

02 Mar 02:48
5a57fc4
Compare
Choose a tag to compare

Added

  • Add support for the usage of JSON Stream output when using MiniZinc 2.6+

Fixed

  • Do not raise error about unsupported solver flags when MiniZinc driver would not raise an error.
  • Fix warnings caused by unterminated coroutines when using the asynchronous iterators

MiniZinc Python 0.5.0

07 Oct 00:55
Compare
Choose a tag to compare

Added

  • Add (generated) __version__ field to the package to abide by the PEP
    recommendations.
  • Add support for using NumPy types to instantiate Models. (np.array and
    any type that falls under np.generic).
  • Add available_solvers method to the Driver objects to explicitly
    report the available solvers according to the current environment.
  • Add support for Python 3.10.

Changed

  • BREAKING: Update minimal supported MiniZinc version to 2.5.0 to ensure
    full functionality.
  • Remove the (additional) hard time-out in from the CLI driver. MiniZinc should
    correctly enforce set time limit.
  • Solver.lookup now has an extra refresh argument to signal whether
    the driver should refresh the found solver configurations.

Fixed

  • Always close temporary files before removing them, so that if an exception is
    raised while a file is still open, it gets removed correctly on Windows.
  • Set the required process creation flags on Windows to allow MiniZinc to
    terminate its subprocesses correctly.
  • Pass --intermediate-solutions flag when -i or -a is supported by
    the solver.
  • Pygments parser generated by Iro did not contain the correct #pop rules.
    The parser was manually edited to work correctly, but we can no longer
    generate is automatically unless the bug in upstream Iro is resolved.
  • Resolve a syntax error (a missing semicolon) in the meta-heuristics example in
    the documentation.
  • Correctly pass the -O0 flag to the CLI when optimisation_level is set
    to zero.
  • Set type of MiniZinc annotation output type ann to str in Python in
    accordance with the JSON output format.

MiniZinc Python 0.4.2

25 Nov 03:03
Compare
Choose a tag to compare

Fixed

  • Terminate the MiniZinc process when stopping early (instead of killing it). This allows MiniZinc to correctly stop any solver processes.

Changed

  • Revert change from 0.4.1 where enumerated types unknown to Python would be made stored as anonymous enumerations. Interoperability between the MiniZinc driver and the MiniZinc Python has instead changed to allow JSON strings as valid input for enumerated types. (required MiniZinc 2.5.3)

MiniZinc Python 0.4.1

11 Nov 02:04
Compare
Choose a tag to compare

Added

  • Support for Python 3.9. (MiniZinc Python will aim to support all versions of
    Python that are not deprecated)
  • Experimental support for capturing the error output of the MiniZinc process
    in CLIInstance.
  • Experimental support for verbose compiler and solver output (using the -v
    flag) in CLIInstance.

Changed

  • The MiniZinc Python repository moved from GitLab to GitHub, replacing GitLab
    CI for GitHub Actions for the continuous testing.
  • Values of an enumerated type defined in MiniZinc will now appear in solutions
    as a member of a singular anonymous enum.Enum class.

Fixed

  • Handle the cancellation of asynchronous solving and correctly dispose of the
    process
  • Correct the JSON representation of sets of with IntEnum members. (Lists
    are still not correctly represented).
  • check_solution will now correctly handle solution values of an enumerated
    type defined in MiniZinc.

MiniZinc Python 0.4.0

29 Oct 06:03
Compare
Choose a tag to compare

Changed

  • The check_solution has been split into two separate functions. The
    check_result function allows the user to check the correctness of a
    Result object and the new check_solution function can check the
    correctness of an individual solution in the form of a data class object or a
    dictionary.
  • Model.add_file no longer has its parse_data flag enabled by default.

Fixed

  • Catch lark ImportError before LarkError during Model.add_file() since
    LarkError will not exist if the import failed.
  • Ensure a DZN file does not get included if its data is parsed.

MiniZinc Python 0.3.3

29 Oct 06:02
Compare
Choose a tag to compare

Added

  • Add requiredFlags field to the Solver data class.

Fixed

  • Ignore extra (undocumented) fields from MiniZinc's --solvers-json output
    when initialising Solver objects.

MiniZinc Python 0.3.2

29 Oct 06:02
Compare
Choose a tag to compare

Fixed

  • Add full support for string input and output. The usage of strings would
    previously incorrectly give a warning.