Skip to content

Commit

Permalink
bump to 0.7.1 (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirRender00 authored Apr 20, 2022
1 parent 5cb333a commit d1bf8d1
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Analysing the code with pylint
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Core Tests
name: Pytest

on:
push:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Run tests with pytest
run: poetry run pytest --workers auto
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Build package
run: poetry build
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/windows-gui-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Windows GUI Tests

on:
push:
branches:
- "main"
- "[0-9]+.[0-9]+"
pull_request:
branches:
- "main"
- "[0-9]+.[0-9]+"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install poetry
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: $HOME/.poetry/bin/poetry install --no-interaction
- name: Run tests with pytest
run: $HOME/.poetry/bin/poetry run pytest ./tests/gui/text_gui.py
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# texasholdem
![Core Tests Status](https://github.com/SirRender00/texasholdem/actions/workflows/core-tests.yml/badge.svg)
![Pytest Status](https://github.com/SirRender00/texasholdem/actions/workflows/pytest.yml/badge.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://raw.githubusercontent.com/SirRender00/texasholdem/main/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/texasholdem/badge/?version=stable)](https://texasholdem.readthedocs.io/en/stable/?badge=stable)
![Pylint Status](https://github.com/SirRender00/texasholdem/actions/workflows/pylint.yml/badge.svg)

A python package for Texas Hold 'Em Poker, providing
A python package for Texas Hold 'Em Poker providing
- Fast evaluation of hand strengths
- Export & import human-readable game history
- GUIs to view games and game history
Expand All @@ -14,8 +14,8 @@ A python package for Texas Hold 'Em Poker, providing

| Version Name | Latest Tag | Release Notes | Patch Notes | Documentation | Release Date | End Support Date |
| ------------ | ---------- | ------------- | ----------- | ------------- | ------------ | ---------------- |
| 0.7 | v0.7.0 | [Release Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.7.0) | [Patch Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.7.0) | [Documentation](https://texasholdem.readthedocs.io/en/0.7/) | 16 April 2022 | |
| 0.6 | v0.6.3 | [Release Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.6.0) | [Patch Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.6.3) | [Documentation](https://texasholdem.readthedocs.io/en/0.6/) | 24 March 2022 | |
| 0.7 | v0.7.1 | [Release Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.7.1) | [Patch Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.7.0) | [Documentation](https://texasholdem.readthedocs.io/en/0.7/) | 16 April 2022 | |
| 0.6 | v0.6.4 | [Release Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.6.0) | [Patch Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.6.4) | [Documentation](https://texasholdem.readthedocs.io/en/0.6/) | 24 March 2022 | |
| 0.5 | v0.5.2 | [Release Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.5.0) | [Patch Notes](https://github.com/SirRender00/texasholdem/releases/tag/v0.5.2) | [Documentation](https://texasholdem.readthedocs.io/en/0.5/) | 21 March 2022 | |

Current Roadmap \
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = 'Evyn Machi'

# The full version, including alpha/beta/rc tags
release = 'v0.7.0'
release = 'v0.7.1'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "texasholdem"
version = "0.7.0"
version = "0.7.1"
description = "A texasholdem python package"
authors = ["Evyn Machi <[email protected]>"]
keywords = ['texasholdem', 'holdem', 'poker']
Expand Down
4 changes: 2 additions & 2 deletions tests/gui/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
_SCREEN_SIZE = (100, 300)


BASIC_GUI_RUNS = 25
COMPLETE_GUI_RUNS = 10
BASIC_GUI_RUNS = 10
COMPLETE_GUI_RUNS = 5


@pytest.fixture(scope='session')
Expand Down
4 changes: 2 additions & 2 deletions texasholdem/game/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,14 @@ def _settle(self):

settle_history.pot_winners[i] = (pot.get_total_amount(), best_rank, winners)

win_amount = int((pot.get_total_amount()) / len(winners))
win_amount = pot.get_total_amount() // len(winners)
for player_id in winners:
self.players[player_id].chips += win_amount

# leftover chip goes to player left of the button WSOP Rule 73
leftover = pot.get_total_amount() - (win_amount * len(winners))
if leftover:
for j in self.in_pot_iter(loc=self.btn_loc):
for j in self.in_pot_iter(loc=self.btn_loc + 1):
if j in winners:
self.players[j].chips += leftover
break
Expand Down

0 comments on commit d1bf8d1

Please sign in to comment.