Skip to content

Commit

Permalink
Merge pull request potassco#138 from potassco/97-clean-up-predicate-c…
Browse files Browse the repository at this point in the history
…omparison-relations

97 clean up predicate comparison relations
  • Loading branch information
daveraja authored May 6, 2024
2 parents 846b3ab + e648a6d commit ea7918f
Show file tree
Hide file tree
Showing 16 changed files with 522 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ that makes it easier to refactor the python code as the ASP program evolves.

The documentation is available online `here <https://clorm.readthedocs.io/>`_.

Note: Clorm works with Python 3.7+ and Clingo 5.5+
Note: Clorm works with Python 3.8+ and Clingo 5.6+

Installation
------------

Clorm requires Python 3.7+ and Clingo 5.5+. It can be installed using either the
Clorm requires Python 3.8+ and Clingo 5.6+. It can be installed using either the
`pip` or `conda` package managers.

`pip` packages can be downloaded from PyPI:
Expand Down
2 changes: 1 addition & 1 deletion clorm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .orm import *

__version__ = "1.5.1"
__version__ = "1.6.0"
__author__ = "David Rajaratnam"
__email__ = "[email protected]"
__copyright__ = "Copyright (c) 2018 David Rajaratnam"
Expand Down
4 changes: 3 additions & 1 deletion clorm/_clingo.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def _check_is_func(obj: Any, name: str) -> None:
# Wrap clingo.Model and override some functions
# ------------------------------------------------------------------------------


# class Model(OModel, metaclass=WrapperMetaClass):
class ModelOverride(object):
"""Provides access to a model during a solve call.
Expand Down Expand Up @@ -236,6 +237,7 @@ class ClormSolveHandle(SolveHandleOverride, OSolveHandle):
# Wrap clingo.Control and override some functions
# ------------------------------------------------------------------------------


# ------------------------------------------------------------------------------
# Helper functions to expand the assumptions list as part of a solve() call. The
# assumptions list is a list of argument-boolean pairs where the argument can be
Expand All @@ -255,7 +257,7 @@ def _add_fact(fact: Union[Predicate, Symbol], bval: bool) -> None:
clingo_assump.append((raw, bool(bval)))

try:
for (arg, bval) in assumptions:
for arg, bval in assumptions:
if isinstance(arg, Predicate):
_add_fact(arg, bval)
elif isinstance(arg, Iterable):
Expand Down
Loading

0 comments on commit ea7918f

Please sign in to comment.