Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #100 from fedden/feature/update-averaging-script-a…
Browse files Browse the repository at this point in the history
…nd-update-clustering

Release candidate 1.0.0
  • Loading branch information
fedden authored Jul 5, 2020
2 parents c4eb048 + b0df571 commit 294da2d
Show file tree
Hide file tree
Showing 133 changed files with 3,124 additions and 5,978 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
applications
assets
clustering_cache
docs
paper
poker_ai.egg-info
research
!research/blueprint_algo/preflop_lossless.pkl
!research/blueprint_algo/flop_lossy_2.pkl
!research/blueprint_algo/river_lossy_2.pkl
!research/blueprint_algo/turn_lossy_2.pkl
!research/size_of_problem/action_sequences.pkl
tags
32 changes: 32 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see:
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements.txt
24 changes: 8 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
language: python

# Environment variables.
env:
global:
- CC_TEST_REPORTER_ID=607f73633cb88df8c21568f855bd394dc47772d2228b2f0476ad8c87b625a334
services:
- docker

# Which version(s) of python we want to use for testing.
python:
- "3.7"

# command to install dependencies
install:
- pip install -r requirements.txt
- pip install pytest pytest-cov
- pip install .
before_install:
- docker build -t pokeraitest .

# Hook up code coverage in the before test script.
before_script:
Expand All @@ -22,12 +13,13 @@ before_script:
- ./cc-test-reporter before-build

# command to run test script.
script: pytest
script:
- docker run -ti pokeraitest pytest test -v --cov-report term --cov-report xml --cov-fail-under=50 --cov=/poker_ai/poker_ai
- MOST_RECENT_IMAGE=$(docker ps -a --format "{{.Image}}" | head -1)

# Code to run after the test script.
after_script:
- pytest test -v --cov-report term --cov-report xml --cov-fail-under=90 --cov=pluribus
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then docker run -ti $MOST_RECENT_IMAGE ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi

# Alert us in slack.
notifications:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ If you want to work on the codebase, then although you don't have to, it is reco

With ssh (recommended):
```bash
git clone [email protected]:fedden/pluribus-poker-AI.git
git clone [email protected]:fedden/poker_ai.git
```

With https:
```bash
git clone https://github.com/fedden/pluribus-poker-AI.git
git clone https://github.com/fedden/poker_ai.git
```

### 2. Initialise the repo with git flow
Expand All @@ -27,7 +27,7 @@ sudo apt install git-flow

If you are using Mac OS X, please checkout the [install instructions](https://github.com/nvie/gitflow/wiki/Mac-OS-X).

Now `cd` to the root of the pluribus repo.
Now `cd` to the root of the poker_ai repo.

Run:
```bash
Expand Down Expand Up @@ -98,4 +98,4 @@ git push origin feature/my-feature-branch-name-here --force

Once you have wrote your cool new feature, you'll need to make a PR. If you can write any tests to support any new features introduced, this would be very welcome. If you have any conflicts with `develop` please ensure you have rebased with `develop` as instructed in step (3).

Please open a pull request via the github UI and request to merge into `develop`. Once there has been a successful review of your PR, and the automated tests pass, then feel free to merge at your leisure.
Please open a pull request via the github UI and request to merge into `develop`. Once there has been a successful review of your PR, and the automated tests pass, then feel free to merge at your leisure.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM pokerai/pokerai:1.0.0rc1
# Copy the requirements.
COPY requirements.txt requirements.txt
# Install python modules.
RUN pip install -r requirements.txt
# Copy everything else.
COPY . /poker_ai
RUN pip install -e .
# Setup tests.
RUN pip install pytest-cov
ENV CC_TEST_REPORTER_ID=607f73633cb88df8c21568f855bd394dc47772d2228b2f0476ad8c87b625a334
RUN curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
RUN chmod +x ./cc-test-reporter
RUN ./cc-test-reporter before-build
CMD ["/bin/bash"]
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1.0.0rc1
--------

* Adding script to train AI.
* Adding script to cluster hands.
* Adding script to RT search on top of offline strategy.
* Adding Sphinx auto documentation.
* Adding CLI for all key supported scripts.
17 changes: 17 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,22 @@ an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.



EXCEPTIONS AND ADDITIONAL PERMISSIONS

Indemnification

You hereby indemnify the licensors and authors from all liability and
claims arising from your use of the licensed technology. The copyright
holder, or any other party who modifies and/or conveys the Program as
permitted above, will be responsible for and will indemnify and keep
indemnified the authors of the Program in respect of any liability, loss,
damage, cost, expense, deduction, contribution, assessment, penalty, fine,
or interest arising from or made in connection with any claim arising out
of the use, provision, or conveyance of the Program.


END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs
Expand Down Expand Up @@ -672,3 +688,4 @@ may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

14 changes: 14 additions & 0 deletions ParentDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python:3.7
RUN mkdir /poker_ai
# Work from the root of the repo.
WORKDIR /poker_ai
# Supply '--build_arg LUT_DIR=research/blueprint_algo' here.
ARG LUT_DIR
# Copy pickle LUTs over.
COPY "${LUT_DIR}/flop_lossy_2.pkl" .
COPY "${LUT_DIR}/preflop_lossless.pkl" .
COPY "${LUT_DIR}/river_lossy_2.pkl" .
COPY "${LUT_DIR}/turn_lossy_2.pkl" .
# Set the environment variable for the tests
ENV LUT_DIR="/poker_ai"
CMD ["/bin/bash"]
Loading

0 comments on commit 294da2d

Please sign in to comment.