-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from MHenderson/8-implement-partial-latin-squar…
…e-to-list-colouring-problem Implement partial latin square to list colouring problem
- Loading branch information
Showing
8 changed files
with
55 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
test: | ||
poetry run pytest | ||
|
||
install: | ||
poetry install |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
[tool.poetry] | ||
name = "ryser" | ||
version = "0.1.0" | ||
version = "0.1.0.9001" | ||
description = "Latin squares and related designs." | ||
authors = ["Matthew Henderson <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
networkx = "^3.4.2" | ||
|
||
|
||
[tool.poetry.group.test.dependencies] | ||
|
@@ -16,7 +17,3 @@ pytest = "^8.1.1" | |
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pytest.ini_options] | ||
pythonpath = [ | ||
"." | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import ryser as ry | ||
|
||
def test_pls_list_colouring_problem(): | ||
F = {1:1, 2:2, 6:1} | ||
G = ry.pls_list_colouring_problem(F, 3) | ||
assert list(G.nodes()) == [0, 1, 2] | ||
assert list(G.edges(data = True)) == [(0, 1, {'permissible': [2]}), (0, 2, {'permissible': [3]}), (0, 0, {'permissible': [1]}), (1, 0, {'permissible': [2, 3]}), (1, 2, {'permissible': [1]}), (1, 1, {'permissible': [3]}), (2, 0, {'permissible': [2, 3]}), (2, 1, {'permissible': [1, 3]}), (2, 2, {'permissible': [2, 3]})] |