Skip to content

Version 1.4.2 release

Compare
Choose a tag to compare
@daveraja daveraja released this 21 Sep 14:15
· 49 commits to master since this release
6c0ec34

This version mainly contains bug fixes. It also has a small addition to the query API. The changes are:

  • Export the field() function at the clorm namespace level. Previously you had to import it from clorm.orm.core This works in a similar way to the field() function in dataclasses.
  • Fixed the bug in the func() function. This function provides a wrapper for using functions/lambdas within clorm queries.
  • Added missing on_core and on_unsat callbacks for clorm.clingo.Control.solve(), which were callbacks introduced in Clingo 5.5.
  • Fixed non-determinism in clorm.clingo.Control.solve() with assumptions. Previously was using a set object which is not deterministic between python instances so was creating non-determinism when looking at the results of different clingo runs.
  • Fix bug when specifying a function/lambda in the select clause of a query over multiple predicates. The order that the facts were presented to the function/lambda wouldn't always match to the function requirements because of the internal order within the generated query plan.
  • New feature: while clorm facts are immutable, so cannot be modified within a factbase, the query API now lets you specify how facts can be replaced by a modified version. This can be used to simulate modifying the facts of a factbase.