From 9b59d8fb9cf0c9f9079c391d20ec8ceda0d98b81 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 30 Mar 2011 13:28:57 +0800 Subject: [PATCH 1/5] Regression: Fix data for newly parsed draw hands --- ...D-0.10-0.20-201011.Sample.Not.UTF16.txt.hp | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-Limit-USD-0.10-0.20-201011.Sample.Not.UTF16.txt.hp b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-Limit-USD-0.10-0.20-201011.Sample.Not.UTF16.txt.hp index 853b2b77..02a11267 100644 --- a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-Limit-USD-0.10-0.20-201011.Sample.Not.UTF16.txt.hp +++ b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-Limit-USD-0.10-0.20-201011.Sample.Not.UTF16.txt.hp @@ -1,4 +1,12 @@ -{ u'Hero': { 'card1': 0, +{ u'Hero': { 'card1': 48, + 'card2': 17, + 'card3': 44, + 'card4': 14, + 'card5': 7, + 'card6': 0, + 'card7': 0, + 'card8': 0, + 'card9': 0, 'card10': 0, 'card11': 0, 'card12': 0, @@ -9,15 +17,7 @@ 'card17': 0, 'card18': 0, 'card19': 0, - 'card2': 0, 'card20': 0, - 'card3': 0, - 'card4': 0, - 'card5': 0, - 'card6': 0, - 'card7': 0, - 'card8': 0, - 'card9': 0, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -117,18 +117,7 @@ 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, u'Player1': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -136,6 +125,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 6, + 'card17': 19, + 'card18': 45, + 'card19': 11, + 'card20': 50, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -235,18 +235,7 @@ 'wonWhenSeenStreet3': 1.0, 'wonWhenSeenStreet4': 0.0}, u'Player2': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -254,6 +243,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 13, + 'card17': 52, + 'card18': 23, + 'card19': 49, + 'card20': 2, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -353,18 +353,7 @@ 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, u'Player3': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -372,6 +361,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 10, + 'card17': 36, + 'card18': 40, + 'card19': 1, + 'card20': 12, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -587,4 +587,4 @@ 'wonWhenSeenStreet1': 0.0, 'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet3': 0.0, - 'wonWhenSeenStreet4': 0.0}} \ No newline at end of file + 'wonWhenSeenStreet4': 0.0}} From 3e6c5b6f31f1f02aa66b7fdf16b4351599c518f6 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 30 Mar 2011 13:29:39 +0800 Subject: [PATCH 2/5] THP: Minor updates --- pyfpdb/TestHandsPlayers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyfpdb/TestHandsPlayers.py b/pyfpdb/TestHandsPlayers.py index 1bb7eae8..6917b77e 100755 --- a/pyfpdb/TestHandsPlayers.py +++ b/pyfpdb/TestHandsPlayers.py @@ -21,8 +21,6 @@ import sys import os import codecs -import pprint -import PokerStarsToFpdb from Hand import * import Configuration import Database @@ -31,6 +29,8 @@ import fpdb_import import Options import datetime import pytz +import pprint +pp = pprint.PrettyPrinter(indent=4) DEBUG = False @@ -149,6 +149,9 @@ def compare_hands_file(filename, importer, errors): for hand in handlist: ghash = hand.stats.getHands() + # Delete unused data from hash + del ghash['gsc'] + del ghash['sc'] for datum in ghash: #print "DEBUG: hand: '%s'" % datum try: From 38f63ffcec08fb82d81f4534fe74c31150269e15 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 30 Mar 2011 13:42:59 +0800 Subject: [PATCH 3/5] Regression: Fix card data for newly parsed draw hands --- ...-0.20-201011.Saw.Showdown.Not.UTF16.txt.hp | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-NL-USD-0.10-0.20-201011.Saw.Showdown.Not.UTF16.txt.hp b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-NL-USD-0.10-0.20-201011.Saw.Showdown.Not.UTF16.txt.hp index 54ed77fb..925b08d3 100644 --- a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-NL-USD-0.10-0.20-201011.Saw.Showdown.Not.UTF16.txt.hp +++ b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-NL-USD-0.10-0.20-201011.Saw.Showdown.Not.UTF16.txt.hp @@ -1,4 +1,12 @@ -{ u'Hero': { 'card1': 0, +{ u'Hero': { 'card1': 7, + 'card2': 6, + 'card3': 32, + 'card4': 50, + 'card5': 10, + 'card6': 0, + 'card7': 0, + 'card8': 0, + 'card9': 0, 'card10': 0, 'card11': 0, 'card12': 0, @@ -9,15 +17,7 @@ 'card17': 0, 'card18': 0, 'card19': 0, - 'card2': 0, 'card20': 0, - 'card3': 0, - 'card4': 0, - 'card5': 0, - 'card6': 0, - 'card7': 0, - 'card8': 0, - 'card9': 0, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -117,18 +117,7 @@ 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, u'Player1': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -136,6 +125,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 38, + 'card17': 37, + 'card18': 30, + 'card19': 29, + 'card20': 28, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -235,18 +235,7 @@ 'wonWhenSeenStreet3': 1.0, 'wonWhenSeenStreet4': 0.0}, u'Player2': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -254,6 +243,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 49, + 'card17': 36, + 'card18': 21, + 'card19': 47, + 'card20': 43, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -705,4 +705,4 @@ 'wonWhenSeenStreet1': 0.0, 'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet3': 0.0, - 'wonWhenSeenStreet4': 0.0}} \ No newline at end of file + 'wonWhenSeenStreet4': 0.0}} From fe1f8a5829e5cdbbebbfa80c2f317fbfa14c2b86 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 30 Mar 2011 14:44:29 +0800 Subject: [PATCH 4/5] Regression: Fix card data for FTP draw .hp file --- .../3-Draw-Limit-USD-0.10-0.20-201011.txt.hp | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-0.10-0.20-201011.txt.hp b/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-0.10-0.20-201011.txt.hp index 30d2c55c..00cf77ae 100644 --- a/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-0.10-0.20-201011.txt.hp +++ b/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-0.10-0.20-201011.txt.hp @@ -1,4 +1,12 @@ -{ u'Hero': { 'card1': 0, +{ u'Hero': { 'card1': 9, + 'card2': 17, + 'card3': 13, + 'card4': 48, + 'card5': 37, + 'card6': 0, + 'card7': 0, + 'card8': 0, + 'card9': 0, 'card10': 0, 'card11': 0, 'card12': 0, @@ -9,15 +17,7 @@ 'card17': 0, 'card18': 0, 'card19': 0, - 'card2': 0, 'card20': 0, - 'card3': 0, - 'card4': 0, - 'card5': 0, - 'card6': 0, - 'card7': 0, - 'card8': 0, - 'card9': 0, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -117,18 +117,7 @@ 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, u'Player1': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -136,6 +125,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 32, + 'card17': 31, + 'card18': 29, + 'card19': 15, + 'card20': 14, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -353,18 +353,7 @@ 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, u'Player3': { 'card1': 0, - 'card10': 0, - 'card11': 0, - 'card12': 0, - 'card13': 0, - 'card14': 0, - 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -372,6 +361,17 @@ 'card7': 0, 'card8': 0, 'card9': 0, + 'card10': 0, + 'card11': 0, + 'card12': 0, + 'card13': 0, + 'card14': 0, + 'card15': 0, + 'card16': 21, + 'card17': 7, + 'card18': 6, + 'card19': 30, + 'card20': 40, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -705,4 +705,4 @@ 'wonWhenSeenStreet1': 0.0, 'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet3': 0.0, - 'wonWhenSeenStreet4': 0.0}} \ No newline at end of file + 'wonWhenSeenStreet4': 0.0}} From d282dead8a695a4d3985bd1e9269f2aaa152760d Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 30 Mar 2011 18:05:04 +0800 Subject: [PATCH 5/5] Regression: Fix card data for FTP draw .hp file --- .../3-Draw-Limit-USD-150-300-201012.txt.hp | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-150-300-201012.txt.hp b/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-150-300-201012.txt.hp index 6e0a1def..38c6b5f8 100644 --- a/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-150-300-201012.txt.hp +++ b/pyfpdb/regression-test-files/cash/FTP/Draw/3-Draw-Limit-USD-150-300-201012.txt.hp @@ -1,4 +1,12 @@ -{ u'Hero': { 'card1': 0, +{ u'Hero': { 'card1': 1, + 'card2': 24, + 'card3': 42, + 'card4': 35, + 'card5': 27, + 'card6': 0, + 'card7': 0, + 'card8': 0, + 'card9': 0, 'card10': 0, 'card11': 0, 'card12': 0, @@ -9,15 +17,7 @@ 'card17': 0, 'card18': 0, 'card19': 0, - 'card2': 0, 'card20': 0, - 'card3': 0, - 'card4': 0, - 'card5': 0, - 'card6': 0, - 'card7': 0, - 'card8': 0, - 'card9': 0, 'foldBbToStealChance': False, 'foldSbToStealChance': False, 'foldToOtherRaisedStreet0': False, @@ -359,12 +359,12 @@ 'card13': 0, 'card14': 0, 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, + 'card16': 6, + 'card17': 32, + 'card18': 33, + 'card19': 17, + 'card20': 15, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -477,12 +477,12 @@ 'card13': 0, 'card14': 0, 'card15': 0, - 'card16': 0, - 'card17': 0, - 'card18': 0, - 'card19': 0, + 'card16': 49, + 'card17': 19, + 'card18': 30, + 'card19': 28, + 'card20': 14, 'card2': 0, - 'card20': 0, 'card3': 0, 'card4': 0, 'card5': 0, @@ -587,4 +587,4 @@ 'wonWhenSeenStreet1': 1.0, 'wonWhenSeenStreet2': 1.0, 'wonWhenSeenStreet3': 1.0, - 'wonWhenSeenStreet4': 0.0}} \ No newline at end of file + 'wonWhenSeenStreet4': 0.0}}