Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python:

install:
- pip install --upgrade pip
- pip install coveralls==1.8.2
- pip install coveralls==1.9.2

script:
- ./setup.py test
Expand Down
7 changes: 3 additions & 4 deletions demo/mesh_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
from collections import deque, namedtuple
from itertools import chain, combinations, product

from combcov import CombCov, Rule
from permuta import Av, MeshPatt, Perm, PermSet
from permuta.misc import flatten, ordered_set_partitions

from combcov import CombCov, Rule

logger = logging.getLogger("MeshTiling")


class MockAvCoPatts():
class MockAvCoPatts:
def __init__(self, av_patts, co_patts):
self.base_perm_set = Av(av_patts)

Expand Down Expand Up @@ -423,7 +422,7 @@ def __str__(self):
top_bottom_lines


class Utils():
class Utils:

# See https://github.com/PermutaTriangle/CombCov/issues/28
equivalent_shadings = {
Expand Down
2 changes: 1 addition & 1 deletion demo/word_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, alphabet=tuple(), avoid=frozenset(), prefix=""):
self.alphabet = tuple(alphabet)
self.avoid = self._basis_of(avoid)
self.prefix = prefix
self.max_prefix_size = max(0, max(len(av) for av in self.avoid))
self.max_prefix_size = max((len(av) for av in self.avoid), default=1)

def contains(self, word):
return all(av not in word for av in self.avoid)
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def read(fname):

setup(
name="CombCov",
version="0.6.3",
version="0.6.4",
author="Permuta Triangle",
author_email="permutatriangle@gmail.com",
description="Searching for combinatorial covers.",
Expand All @@ -29,10 +29,10 @@ def read(fname):
"permuta==1.2.1",
"PuLP==1.6.10",
],
setup_requires=["pytest-runner==5.1"],
setup_requires=["pytest-runner==5.2"],
tests_require=[
"pytest==5.1.2",
"pytest-cov==2.7.1",
"pytest==5.3.2",
"pytest-cov==2.8.1",
"pytest-pep8==1.0.6",
"pytest-isort==0.3.1",
],
Expand Down
3 changes: 1 addition & 2 deletions tests/test_mesh_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
from itertools import combinations, product
from math import factorial

from permuta import Av, MeshPatt, Perm, PermSet

import pytest
from combcov import Rule
from demo.mesh_tiling import Cell, MeshTiling, MockAvCoPatts, Utils
from permuta import Av, MeshPatt, Perm, PermSet


class MockContainingPattsTest(unittest.TestCase):
Expand Down
5 changes: 5 additions & 0 deletions tests/test_word_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def test_equality_nonsense(self):
self.assertNotEqual(word_set, "nonsense")
self.assertNotEqual(word_set, None)

def test_avoiding_empty_set(self):
word_set = WordSet(self.alphabet, frozenset())
subrules = list(word_set.get_subrules())
self.assertTrue(len(subrules) > 1)


if __name__ == '__main__':
unittest.main()