Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorvaldAagaard committed Jun 13, 2024
2 parents efdffb5 + 552c038 commit 5d31942
Show file tree
Hide file tree
Showing 7 changed files with 398 additions and 473 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
with:
submodules: recursive
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp-312-* pp38-* pp39-* pp310-*"
CIBW_SKIP: "cp38-macosx* pp*-win*"
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* pp39-* pp310-*"
CIBW_SKIP: "pp*-win* pp*-macos*"
CIBW_ARCHS: auto64
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {package}/tests
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Binary Python wheels are built and distributed on [PyPI](https://pypi.org/projec

| Architecture | Windows | Linux | MacOS |
| ------------- | -------- | -------- | -------- |
| x86 | N/A | N/A | N/A |
| x64 (CPython) | 3.8-3.12 | 3.8-3.12 | 3.8-3.12 |
| x64 (PyPy) | 3.8-3.10 | 3.8-3.10 | 3.8-3.10 |
| x86 (CPython) | N/A | N/A | N/A |
| x64 (CPython) | 3.9-3.12 | 3.9-3.12 | 3.9-3.12 |
| x64 (PyPy) | N/A | 3.9-3.10 | N/A |

On these systems `python3 -m pip install endplay` will install these pre-built wheels, otherwise it will attempt to install from the source distribution which requires a C++ compiler on your system. Note that *endplay* requires Python 3.7+.

Expand Down
835 changes: 380 additions & 455 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "endplay"
version = "0.5.8"
version = "0.5.9"
description = "A suite of tools for generation and analysis of bridge deals"
license = "MIT"
authors = ["Dominic Price <dominicprice@outlook.com>"]
Expand Down Expand Up @@ -36,10 +36,10 @@ keywords = [
"Bug Tracker" = "https://github.com/dominicprice/endplay/issues"

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"
pyparsing = ">=3.0"
tqdm = ">=4.65"
numpy = ">=1.22"
numpy = ">=1.26"
matplotlib = ">=2.0"
more-itertools = ">=9.0"

Expand Down
4 changes: 2 additions & 2 deletions src/endplay/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from contextlib import ContextDecorator

# Packages metadata, used by setuptools etc
__version__ = "0.5.8"
__version__ = "0.5.9"
"""Version of the library as a string"""

__version_info__ = (0, 5, 8)
__version_info__ = (0, 5, 9)
"""Version of the library as a tuple of integers"""

__author__ = "Dominic Price"
Expand Down
4 changes: 2 additions & 2 deletions src/endplay/dealer/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def generate_deals(
raise DealNotGeneratedError(message)
else:
warnings.warn(message, DealNotGeneratedWarning)
return generated
return
generated += 1
rs.shuffle(cards) # type: ignore
deal = predeal.copy()
Expand All @@ -211,7 +211,7 @@ def generate_deals(
yield perm
produced = True
break
return generated
return


def _generate_swaps(deal: Deal, swapping: int):
Expand Down
10 changes: 5 additions & 5 deletions tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def test_cccc(self):
# These test cases can be generated by choosing the Random Hand
# option on http://rpbridge.net/cgi-bin/xhe1.pl
suit = SuitHolding("AQT432")
self.assertEqual(cccc(suit), 8.45)
self.assertAlmostEqual(cccc(suit), 8.45)
hand1 = Hand("A2.6.J97532.AQ85")
self.assertEqual(cccc(hand1), 12.8)
self.assertAlmostEqual(cccc(hand1), 12.8)
hand2 = Hand("A6.K954.A93.A984")
self.assertEqual(cccc(hand2), 16)
self.assertAlmostEqual(cccc(hand2), 16)
hand3 = Hand("73.t84.qt753.kj3")
self.assertEqual(cccc(hand3), 5.6)
self.assertAlmostEqual(cccc(hand3), 5.6)
hand4 = Hand("KQ54.T65.Q52.A43")
self.assertEqual(cccc(hand4), 10.2)
self.assertAlmostEqual(cccc(hand4), 10.2)

def test_rule_of_n(self):
deal = self.deal
Expand Down

0 comments on commit 5d31942

Please sign in to comment.