From 9e3df066f59ce8d7de8868a66d5c37c0512a5f11 Mon Sep 17 00:00:00 2001 From: gimick Date: Sat, 4 Sep 2010 23:12:29 +0100 Subject: [PATCH 01/10] import: cli mode, don't display progress bar; tweak progress bar --- pyfpdb/GuiBulkImport.py | 4 +-- pyfpdb/fpdb.pyw | 2 +- pyfpdb/fpdb_import.py | 75 ++++++++++++++++++++++++++++++----------- 3 files changed, 59 insertions(+), 22 deletions(-) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index e311c68e..d503c922 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -142,12 +142,12 @@ class GuiBulkImport(): """returns the vbox of this thread""" return self.vbox - def __init__(self, settings, config, parent, sql = None): + def __init__(self, settings, config, sql = None, parent = None): self.settings = settings self.config = config self.parent = parent - self.importer = fpdb_import.Importer(self, self.settings, config,parent, sql) + self.importer = fpdb_import.Importer(self, self.settings, config, sql, parent) self.vbox = gtk.VBox(False, 0) self.vbox.show() diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index 23bf9df7..af94f83a 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -999,7 +999,7 @@ class fpdb: def tab_bulk_import(self, widget, data=None): """opens a tab for bulk importing""" - new_import_thread = GuiBulkImport.GuiBulkImport(self.settings, self.config, self.window, self.sql) + new_import_thread = GuiBulkImport.GuiBulkImport(self.settings, self.config, self.sql, self.window) self.threads.append(new_import_thread) bulk_tab=new_import_thread.get_vbox() self.add_and_display_tab(bulk_tab, _("Bulk Import")) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index 630c0d73..1b770ce5 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -70,7 +70,7 @@ else: psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) class Importer: - def __init__(self, caller, settings, config, parent, sql = None): + def __init__(self, caller, settings, config, sql = None, parent = None): """Constructor""" self.settings = settings self.caller = caller @@ -302,15 +302,13 @@ class Importer: totpartial = 0 toterrors = 0 tottime = 0 - progresscount = 0 - progressgoal = len(self.filelist) - - ProgressDialog = ProgressBar(self.parent) + + #prepare progress popup window + ProgressDialog = ProgressBar(len(self.filelist), self.parent) for file in self.filelist: - progresscount += 1 - ProgressDialog.progress_update(progresscount,progressgoal) + ProgressDialog.progress_update() (stored, duplicates, partial, errors, ttime) = self.import_file_dict(db, file ,self.filelist[file][0], self.filelist[file][1], q) @@ -319,11 +317,12 @@ class Importer: totpartial += partial toterrors += errors + del ProgressDialog + for i in xrange( self.settings['threads'] ): print _("sending finish message queue length ="), q.qsize() db.send_finish_msg(q) - del ProgressDialog return (totstored, totdups, totpartial, toterrors) # end def importFiles @@ -543,25 +542,63 @@ class Importer: class ProgressBar: + """ + Popup window to show progress + + Init method sets up total number of expected iterations + If no parent is passed to init, command line + mode assumed, and does not create a progress bar + """ + def __del__(self): - self.progress.destroy() - - def progress_update(self, fraction, sum): - - progresspercent = float(fraction) / (float(sum) + 1.0) - self.pbar.set_fraction(progresspercent) - self.pbar.set_text(str(fraction) + " / " + str(sum)) + if self.parent: + self.progress.destroy() - def __init__(self, parent): + def progress_update(self): + + if not self.parent: + #nothing to do + return + + self.fraction += 1 + #update sum if fraction exceeds expected total number of iterations + if self.fraction > self.sum: + sum = self.fraction + + #progress bar total set to 1 plus the number of items,to prevent it + #reaching 100% prior to processing fully completing + + progress_percent = float(self.fraction) / (float(self.sum) + 1.0) + progress_text = (self.title + " " + + str(self.fraction) + " / " + str(self.sum)) + + self.pbar.set_fraction(progress_percent) + self.pbar.set_text(progress_text) + + + def __init__(self, sum, parent): + + self.parent = parent + if not self.parent: + #no parent is passed, assume this is being run from the + #command line, so return immediately + return + + self.fraction = 0 + self.sum = sum + self.title = _("Importing") + self.progress = gtk.Window(gtk.WINDOW_TOPLEVEL) self.progress.set_resizable(False) self.progress.set_modal(True) - self.progress.set_transient_for(parent) - self.progress.set_decorated(False) - + self.progress.set_transient_for(self.parent) + self.progress.set_decorated(True) + self.progress.set_deletable(False) + self.progress.set_title(self.title) + vbox = gtk.VBox(False, 5) vbox.set_border_width(10) self.progress.add(vbox) From 50ffeea3ecf3f51292af6a40a9da7de45fd36505 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 17:08:15 +0800 Subject: [PATCH 02/10] PSSummary: Add comment for Stars step satellites --- pyfpdb/PokerStarsSummary.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index 0066d0de..b0729baf 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -251,6 +251,12 @@ class PokerStarsSummary(TourneySummary): if 'TICKET' and mg['TICKET'] != None: print "DEBUG: TODO! fix Step ticket values" print "\tWinning = Level %s" % mg['LEVEL'] + # Step 1 - $7.50 USD + # Step 2 - $27.00 USD + # Step 3 - $82.00 USD + # Step 4 - $215.00 USD + # Step 5 - $700.00 USD + # Step 6 - $2100.00 USD #TODO: currency, ko/addon/rebuy count -> need examples! #print "DEBUG: addPlayer(%s, %s, %s, %s, None, None, None)" %(rank, name, winnings, self.currency) From c1a512435b3cb75c317e420ee7f02b4c701c6ab9 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 18:30:22 +0800 Subject: [PATCH 03/10] Fix Importer call for CLI usage --- pyfpdb/GuiBulkImport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index d503c922..5b9e0c53 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -395,7 +395,7 @@ def main(argv=None): gtk.main() else: #Do something useful - importer = fpdb_import.Importer(False,settings, config, self.parent) + importer = fpdb_import.Importer(False,settings, config, None) # importer.setDropIndexes("auto") importer.setDropIndexes(_("don't drop")) importer.setFailOnError(options.failOnError) From c169ccedf41515b1431bac0b08e6297dec01c3bf Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 21:18:02 +0800 Subject: [PATCH 04/10] Regression: Party Stud H/L --- .../Stud/7-StudHL-USD-0.50-1.00-201008.txt | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pyfpdb/regression-test-files/cash/PartyPoker/Stud/7-StudHL-USD-0.50-1.00-201008.txt diff --git a/pyfpdb/regression-test-files/cash/PartyPoker/Stud/7-StudHL-USD-0.50-1.00-201008.txt b/pyfpdb/regression-test-files/cash/PartyPoker/Stud/7-StudHL-USD-0.50-1.00-201008.txt new file mode 100644 index 00000000..46f04052 --- /dev/null +++ b/pyfpdb/regression-test-files/cash/PartyPoker/Stud/7-StudHL-USD-0.50-1.00-201008.txt @@ -0,0 +1,54 @@ +Game #9581478205 starts. + +#Game No : 9581478205 +***** Hand History for Game 9581478205 ***** +$0.50/$1 USD 7 Card Stud Hi-Lo - Monday, August 30, 20:20:17 EEST 2010 +Table Table 136403 (Real Money) +Seat 0 is the button +Total number of players : 7/8 +Seat 3: XMAN1 ( $24.95 USD ) +Seat 5: ISqzUSqueal ( $31.02 USD ) +Seat 7: PPPPPositive ( $4.20 USD ) +Seat 8: Unladylike ( $19 USD ) +Seat 6: YMAN1 ( $10.18 USD ) +Seat 2: strandalleen ( $17.55 USD ) +Seat 1: tubby09 ( $24.20 USD ) +tubby09 posts ante [$0.05 USD] +strandalleen posts ante [$0.05 USD] +XMAN1 posts ante [$0.05 USD] +ISqzUSqueal posts ante [$0.05 USD] +YMAN1 posts ante [$0.05 USD] +PPPPPositive posts ante [$0.05 USD] +Unladylike posts ante [$0.05 USD] +** Dealing ** +Dealt to XMAN1 [ Td 5s 3c ] +YMAN1 opens +YMAN1 bring-ins [$0.25 USD] +PPPPPositive completes [$0.50 USD] +Unladylike folds +tubby09 folds +strandalleen calls [$0.50 USD] +XMAN1 folds +ISqzUSqueal folds +YMAN1 calls [$0.25 USD] +** Dealing Fourth street ** +PPPPPositive opens +PPPPPositive bets [$0.50 USD] +strandalleen calls [$0.50 USD] +YMAN1 folds +** Dealing Fifth street ** +PPPPPositive opens +PPPPPositive bets [$1 USD] +strandalleen calls [$1 USD] +** Dealing Sixth street ** +PPPPPositive opens +PPPPPositive bets [$1 USD] +strandalleen calls [$1 USD] +** Dealing River ** +PPPPPositive opens +PPPPPositive bets [$1 USD] +strandalleen calls [$1 USD] +PPPPPositive shows [ Ad, Qd, Ah, 2d, 7d, Th, 6d ]a flush, Ace high. +strandalleen doesn't show [ 5h, 9d, 9c, Qc, 2h, Kc, Js ]a pair of Nines. +PPPPPositive wins $8.45 USD from the main pot with a flush, Ace high. +There was no qualifying low hand From 23d73c5675b53039d61fd29ec9994f9b59ee8cd0 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 22:08:27 +0800 Subject: [PATCH 05/10] PSSummary.py: Fix winnings for Step tickets --- pyfpdb/PokerStarsSummary.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index b0729baf..87505f00 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -249,14 +249,16 @@ class PokerStarsSummary(TourneySummary): winnings=None if 'TICKET' and mg['TICKET'] != None: - print "DEBUG: TODO! fix Step ticket values" - print "\tWinning = Level %s" % mg['LEVEL'] - # Step 1 - $7.50 USD - # Step 2 - $27.00 USD - # Step 3 - $82.00 USD - # Step 4 - $215.00 USD - # Step 5 - $700.00 USD - # Step 6 - $2100.00 USD + #print "Tournament Ticket Level %s" % mg['LEVEL'] + step_values = { + '1' : '750', # Step 1 - $7.50 USD + '2' : '2750', # Step 2 - $27.00 USD + '3' : '8200', # Step 3 - $82.00 USD + '4' : '21500', # Step 4 - $215.00 USD + '5' : '70000', # Step 5 - $700.00 USD + '6' : '210000', # Step 6 - $2100.00 USD + } + winnings = step_values[mg['LEVEL']] #TODO: currency, ko/addon/rebuy count -> need examples! #print "DEBUG: addPlayer(%s, %s, %s, %s, None, None, None)" %(rank, name, winnings, self.currency) From 673afc06631e2b6289be821e4b3fe89e43789a1e Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 22:21:34 +0800 Subject: [PATCH 06/10] Regression: .hp: Fix and verify error - missing seatNo --- .../Flop/NLHE-9max-USD-0.25-0.50.200810.All.Streets.txt.hp | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/regression-test-files/cash/Carbon/Flop/NLHE-9max-USD-0.25-0.50.200810.All.Streets.txt.hp b/pyfpdb/regression-test-files/cash/Carbon/Flop/NLHE-9max-USD-0.25-0.50.200810.All.Streets.txt.hp index 3cf6aefe..7d99b3f5 100644 --- a/pyfpdb/regression-test-files/cash/Carbon/Flop/NLHE-9max-USD-0.25-0.50.200810.All.Streets.txt.hp +++ b/pyfpdb/regression-test-files/cash/Carbon/Flop/NLHE-9max-USD-0.25-0.50.200810.All.Streets.txt.hp @@ -692,6 +692,7 @@ 'raisedFirstIn': False, 'rake': 0, 'sawShowdown': False, + 'seatNo': 8, 'sitout': False, 'startCards': 0, 'startCash': 925, From b3633120ef3093e35f770261e85ec60bf37f7c49 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 22:44:29 +0800 Subject: [PATCH 07/10] Regression: Add Stars Badugi file --- .../Draw/Badugi-USD-0.25-0.50-201009.txt | 225 ++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 pyfpdb/regression-test-files/cash/Stars/Draw/Badugi-USD-0.25-0.50-201009.txt diff --git a/pyfpdb/regression-test-files/cash/Stars/Draw/Badugi-USD-0.25-0.50-201009.txt b/pyfpdb/regression-test-files/cash/Stars/Draw/Badugi-USD-0.25-0.50-201009.txt new file mode 100644 index 00000000..aa47ff10 --- /dev/null +++ b/pyfpdb/regression-test-files/cash/Stars/Draw/Badugi-USD-0.25-0.50-201009.txt @@ -0,0 +1,225 @@ +PokerStars Game #49164202872: Badugi Limit ($0.25/$0.50 USD) - 2010/09/05 10:32:15 ET +Table 'Benkoela V' 8-max Seat #8 is the button +Seat 1: Lino19 ($6.80 in chips) +Seat 2: s0rrow ($5 in chips) +Seat 3: jodarin ($0.70 in chips) +Seat 4: Scorpio2000 ($3.40 in chips) +Seat 5: buddyboy3399 ($8.25 in chips) +Seat 6: JDANIELDC ($8.75 in chips) +Seat 8: Kula91 ($3.80 in chips) +Lino19: posts small blind $0.10 +s0rrow: posts big blind $0.25 +cuchiku: sits out +*** DEALING HANDS *** +Dealt to s0rrow [As 3h 8h 6s] +jodarin: calls $0.25 +Scorpio2000: calls $0.25 +buddyboy3399: calls $0.25 +JDANIELDC: folds +Kula91: folds +Kula91 leaves the table +Lino19: calls $0.15 +s0rrow: checks +*** FIRST DRAW *** +Lino19: discards 1 card +s0rrow: discards 2 cards [8h 6s] +Dealt to s0rrow [As 3h] [5h Ks] +jodarin: discards 2 cards +Scorpio2000: discards 1 card +buddyboy3399: discards 2 cards +Lino19: bets $0.25 +s0rrow: folds +jodarin: calls $0.25 +Scorpio2000: calls $0.25 +buddyboy3399: raises $0.25 to $0.50 +Lino19: calls $0.25 +jodarin: calls $0.20 and is all-in +Scorpio2000: calls $0.25 +*** SECOND DRAW *** +Lino19: discards 1 card +jodarin: discards 2 cards +Scorpio2000: discards 1 card +buddyboy3399: stands pat +Lino19: checks +Scorpio2000: bets $0.50 +buddyboy3399: calls $0.50 +Lino19: calls $0.50 +*** THIRD DRAW *** +Lino19: discards 1 card +jodarin: discards 2 cards +Scorpio2000: stands pat +buddyboy3399: stands pat +Lino19: checks +Scorpio2000: bets $0.50 +buddyboy3399: calls $0.50 +Lino19: folds +*** SHOW DOWN *** +Scorpio2000: shows [8c 5d 7s Th] (Badugi: T,8,7,5) +buddyboy3399: shows [8s 3d Ac 4h] (Badugi: 8,4,3,A) +buddyboy3399 collected $2.55 from side pot +jodarin: mucks hand +buddyboy3399 collected $2.90 from main pot +jodarin leaves the table +*** SUMMARY *** +Total pot $5.70 Main pot $2.90. Side pot $2.55. | Rake $0.25 +Seat 1: Lino19 (small blind) folded after the 3rd Draw +Seat 2: s0rrow (big blind) folded after the 1st Draw +Seat 3: jodarin mucked [Ad Td Qc 2s] +Seat 4: Scorpio2000 showed [8c 5d 7s Th] and lost with a Badugi: T,8,7,5 +Seat 5: buddyboy3399 showed [8s 3d Ac 4h] and won ($5.45) with a Badugi: 8,4,3,A +Seat 6: JDANIELDC folded before the Draw (didn't bet) +Seat 8: Kula91 (button) folded before the Draw (didn't bet) + + + +PokerStars Game #49164247462: Badugi Limit ($0.25/$0.50 USD) - 2010/09/05 10:33:25 ET +Table 'Benkoela V' 8-max Seat #1 is the button +Seat 1: Lino19 ($5.55 in chips) +Seat 2: s0rrow ($4.75 in chips) +Seat 4: Scorpio2000 ($1.65 in chips) +Seat 5: buddyboy3399 ($11.95 in chips) +Seat 6: JDANIELDC ($8.75 in chips) +s0rrow: posts small blind $0.10 +Scorpio2000: posts big blind $0.25 +cuchiku: sits out +*** DEALING HANDS *** +Dealt to s0rrow [3h Tc Kc Ad] +oooDestroyoo joins the table at seat #3 +kallexx1 joins the table at seat #8 +buddyboy3399: folds +JDANIELDC: folds +Lino19: folds +s0rrow: folds +Uncalled bet ($0.15) returned to Scorpio2000 +Scorpio2000 collected $0.20 from pot +Scorpio2000: doesn't show hand +*** SUMMARY *** +Total pot $0.20 | Rake $0 +Seat 1: Lino19 (button) folded before the Draw (didn't bet) +Seat 2: s0rrow (small blind) folded before the Draw +Seat 4: Scorpio2000 (big blind) collected ($0.20) +Seat 5: buddyboy3399 folded before the Draw (didn't bet) +Seat 6: JDANIELDC folded before the Draw (didn't bet) + + + +PokerStars Game #49164255772: Badugi Limit ($0.25/$0.50 USD) - 2010/09/05 10:33:38 ET +Table 'Benkoela V' 8-max Seat #2 is the button +Seat 1: Lino19 ($5.55 in chips) +Seat 2: s0rrow ($4.65 in chips) +Seat 4: Scorpio2000 ($1.75 in chips) +Seat 5: buddyboy3399 ($11.95 in chips) +Seat 6: JDANIELDC ($8.75 in chips) +Seat 8: kallexx1 ($5000 in chips) +oooDestroyoo will be allowed to play after the button +Scorpio2000: posts small blind $0.10 +buddyboy3399: posts big blind $0.25 +cuchiku: sits out +kallexx1: posts big blind $0.25 +*** DEALING HANDS *** +Dealt to s0rrow [4s 8s Kc 3h] +JDANIELDC: calls $0.25 +kallexx1: checks +Lino19: folds +s0rrow: folds +Scorpio2000: calls $0.15 +cuchiku leaves the table +buddyboy3399: raises $0.25 to $0.50 +JDANIELDC: calls $0.25 +kallexx1: calls $0.25 +Scorpio2000: folds +*** FIRST DRAW *** +buddyboy3399: stands pat +JDANIELDC: discards 2 cards +kallexx1: stands pat +buddyboy3399: bets $0.25 +JDANIELDC: folds +kallexx1: calls $0.25 +*** SECOND DRAW *** +buddyboy3399: stands pat +kallexx1: discards 1 card +buddyboy3399: bets $0.50 +kallexx1: calls $0.50 +*** THIRD DRAW *** +buddyboy3399: stands pat +kallexx1: discards 1 card +buddyboy3399: bets $0.50 +kallexx1: calls $0.50 +*** SHOW DOWN *** +buddyboy3399: shows [Tc 3s 2s 7h] (3-card: T,7,2) +kallexx1: shows [4c 4d 5s 6h] (3-card: 6,5,4) +kallexx1 collected $4.05 from pot +*** SUMMARY *** +Total pot $4.25 | Rake $0.20 +Seat 1: Lino19 folded before the Draw (didn't bet) +Seat 2: s0rrow (button) folded before the Draw (didn't bet) +Seat 4: Scorpio2000 (small blind) folded before the Draw +Seat 5: buddyboy3399 (big blind) showed [Tc 3s 2s 7h] and lost with a 3-card: T,7,2 +Seat 6: JDANIELDC folded after the 1st Draw +Seat 8: kallexx1 showed [4c 4d 5s 6h] and won ($4.05) with a 3-card: 6,5,4 + + + +PokerStars Game #49164287914: Badugi Limit ($0.25/$0.50 USD) - 2010/09/05 10:34:29 ET +Table 'Benkoela V' 8-max Seat #4 is the button +Seat 1: Lino19 ($5.55 in chips) +Seat 2: s0rrow ($4.65 in chips) +Seat 3: oooDestroyoo ($20 in chips) +Seat 4: Scorpio2000 ($1.50 in chips) +Seat 5: buddyboy3399 ($10.20 in chips) +Seat 6: JDANIELDC ($8.25 in chips) +Seat 8: kallexx1 ($5002.30 in chips) +buddyboy3399: posts small blind $0.10 +JDANIELDC: posts big blind $0.25 +oooDestroyoo: posts big blind $0.25 +*** DEALING HANDS *** +Dealt to s0rrow [2h 5c Kd 7h] +kallexx1: folds +kallexx1 leaves the table +Lino19: folds +s0rrow: folds +oooDestroyoo: checks +Scorpio2000: calls $0.25 +buddyboy3399: calls $0.15 +JDANIELDC: checks +*** FIRST DRAW *** +buddyboy3399: discards 1 card +JDANIELDC: discards 2 cards +oooDestroyoo: discards 2 cards +Scorpio2000: discards 2 cards +buddyboy3399: bets $0.25 +JDANIELDC: calls $0.25 +oooDestroyoo: calls $0.25 +Scorpio2000: folds +*** SECOND DRAW *** +buddyboy3399: stands pat +JDANIELDC: discards 1 card +oooDestroyoo: discards 1 card +buddyboy3399: bets $0.50 +JDANIELDC: calls $0.50 +oooDestroyoo: calls $0.50 +*** THIRD DRAW *** +buddyboy3399: stands pat +JDANIELDC: discards 1 card +oooDestroyoo: discards 1 card +buddyboy3399: bets $0.50 +JDANIELDC: raises $0.50 to $1 +oooDestroyoo: calls $1 +buddyboy3399: calls $0.50 +*** SHOW DOWN *** +JDANIELDC: shows [3c 4d 6h 8s] (Badugi: 8,6,4,3) +oooDestroyoo: mucks hand +buddyboy3399: mucks hand +JDANIELDC collected $5.95 from pot +*** SUMMARY *** +Total pot $6.25 | Rake $0.30 +Seat 1: Lino19 folded before the Draw (didn't bet) +Seat 2: s0rrow folded before the Draw (didn't bet) +Seat 3: oooDestroyoo mucked [9d 3d 2s 7c] +Seat 4: Scorpio2000 (button) folded after the 1st Draw +Seat 5: buddyboy3399 (small blind) mucked [Qh 3s 4c Td] +Seat 6: JDANIELDC (big blind) showed [3c 4d 6h 8s] and won ($5.95) with a Badugi: 8,6,4,3 +Seat 8: kallexx1 folded before the Draw (didn't bet) + + + From d59663773bcf7fdb26f908a307826eb345360cde Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 23:23:41 +0800 Subject: [PATCH 08/10] Regression: Correct shown card values in test files --- .../NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp b/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp index dc79279b..9d615ef8 100644 --- a/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp +++ b/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp @@ -186,8 +186,8 @@ 'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, - u'Player3': { 'card1': 0, - 'card2': 0, + u'Player3': { 'card1': 1, + 'card2': 15, 'card3': 0, 'card4': 0, 'card5': 0, @@ -280,8 +280,8 @@ 'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet4': 0.0}, - u'Player4': { 'card1': 0, - 'card2': 0, + u'Player4': { 'card1': 16, + 'card2': 34, 'card3': 0, 'card4': 0, 'card5': 0, From 631d2361aa88132b24dbe2bf250f1ce501bb5bf4 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 5 Sep 2010 23:28:29 +0800 Subject: [PATCH 09/10] Regression: PKR fix rake --- .../Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp b/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp index 9d615ef8..0643a61d 100644 --- a/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp +++ b/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp @@ -220,7 +220,7 @@ 'position': 0, 'raiseFirstInChance': False, 'raisedFirstIn': False, - 'rake': 0, + 'rake': 40, 'sawShowdown': True, 'seatNo': 3, 'sitout': False, From 21043d5445fce8984c96fe8345ce87a8e1fa9d03 Mon Sep 17 00:00:00 2001 From: Worros Date: Mon, 6 Sep 2010 00:39:51 +0800 Subject: [PATCH 10/10] Regression: PKR updates --- pyfpdb/PkrToFpdb.py | 7 ++++--- .../NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pyfpdb/PkrToFpdb.py b/pyfpdb/PkrToFpdb.py index c13dd284..e8b44379 100755 --- a/pyfpdb/PkrToFpdb.py +++ b/pyfpdb/PkrToFpdb.py @@ -115,7 +115,7 @@ class Pkr(HandHistoryConverter): ^%(PLYR)s(?P\sbets|\schecks|\sraises|\scalls|\sfolds)(\sto)? (\s(%(CUR)s)?(?P[.\d]+))? """ % subst, re.MULTILINE|re.VERBOSE) - self.re_ShowdownAction = re.compile(r"^%s: shows \[(?P.*)\]" % player_re, re.MULTILINE) + self.re_ShowdownAction = re.compile(r"^%(PLYR)s shows \[(?P.*)\]" % subst, re.MULTILINE) self.re_CollectPot = re.compile(r"^%(PLYR)s wins %(CUR)s(?P[.\d]+)" % subst, re.MULTILINE) self.re_sitsOut = re.compile("^%s sits out" % player_re, re.MULTILINE) self.re_ShownCards = re.compile("^Seat (?P[0-9]+): %s (\(.*\) )?(?Pshowed|mucked) \[(?P.*)\].*" % player_re, re.MULTILINE) @@ -354,9 +354,10 @@ class Pkr(HandHistoryConverter): def readShowdownActions(self, hand): -# TODO: pick up mucks also?? - for shows in self.re_ShowdownAction.finditer(hand.handText): + # TODO: pick up mucks also?? + for shows in self.re_ShowdownAction.finditer(hand.handText): cards = shows.group('CARDS').split(' ') + #print "DEBUG: addShownCards(%s, %s)" %(cards, shows.group('PNAME')) hand.addShownCards(cards, shows.group('PNAME')) def readCollectPot(self,hand): diff --git a/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp b/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp index 0643a61d..32020879 100644 --- a/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp +++ b/pyfpdb/regression-test-files/cash/PKR/Flop/NLHE-2max-USD-0.02-0.04-200903.All-in.on.turn.txt.hp @@ -224,7 +224,7 @@ 'sawShowdown': True, 'seatNo': 3, 'sitout': False, - 'startCards': 0, + 'startCards': 2, 'startCash': 180, 'street0Aggr': False, 'street0Bets': 0, @@ -271,7 +271,7 @@ 'street4CheckCallRaiseDone': False, 'street4Raises': 0, 'street4Seen': False, - 'totalProfit': -159, + 'totalProfit': 219, 'tourneyTypeId': None, 'tourneysPlayersIds': None, 'winnings': 0,