Chaz Littlejohn
148777bebd
Changed the order of how draw cards are stored in HP so cards dealt to hero on Draws 1-3 (the open field of the holecards dictionary are placed after the cards held from previous streets (the closed field of the holecards dictionary)
2011-04-01 02:08:20 +00:00
Chaz Littlejohn
54f05e4866
Merge branch 'sorrow' into chazdazzle
2011-03-31 16:41:28 +00:00
Chaz Littlejohn
cb989b8570
Merge branch 'sorrow' into chazdazzle
2011-03-30 03:51:08 +00:00
Chaz Littlejohn
6954ab1b62
changed the key in the hands stats dict from 'gameTypeId' back to 'gametypeId'
2011-03-30 03:49:13 +00:00
Chaz Littlejohn
faaca41b5a
Merge branch 'sorrow' into chazdazzle
2011-03-30 03:25:58 +00:00
Chaz Littlejohn
fc2b79a5e8
tourneysPlayersIds is later updated by db.createOrUpdateTourneysPlayers and turned into a dict rather than a list so it makes sense to initialise as such
2011-03-30 03:18:36 +00:00
Chaz Littlejohn
c361992b13
added \u20ac into the sym dict
2011-03-30 03:15:12 +00:00
Chaz Littlejohn
c19549b3da
changed the currency substitutions to byte stream AND unicode -- i.e. u'$|\xe2\x82\xac|\u20ac|'
2011-03-29 20:15:21 +00:00
Chaz Littlejohn
b00c30cbbf
Re-did patch to fix import when no hero is defined
2011-03-29 14:18:00 +00:00
Chaz Littlejohn
dc839c9cae
Merge branch 'sorrow' into chazdazzle
2011-03-29 14:04:59 +00:00
Chaz Littlejohn
38fbae957a
charset needs to be set to 'utf8' for the MySQL connection to store unicode strings correctly
2011-03-29 06:10:07 +00:00
Chaz Littlejohn
300340218b
specifiying 'utf8' CHARSET in Players.name field not required and will lead to a conflict if mysql database created using a different utf-8 collation
2011-03-28 18:34:05 +00:00
Chaz Littlejohn
a87f43f933
Updated the import process for Draw hands so that cards, along with additional draws can now be stored. HandsPlayers now includes 20 card fields to accomodate up to 4 five card hands for each player. The regex for the 'stands pat' action was also improved so that hero cards from those streets could be taken from that line of text
2011-03-24 06:00:10 +00:00
Chaz Littlejohn
5eeafc4503
Added regex & methods for picking up the 'discards' and 'stands pat' actions in FTP draw hands
2011-03-24 04:08:08 +00:00
Chaz Littlejohn
7c31a19077
Modified HHC so gtk & pygtk are imported to execute a callback only if import is run from the gui
2011-03-23 19:34:15 +00:00
Chaz Littlejohn
3e9dacf900
Added a rebuild_sessionscache method for creating the SC table from hands in the database
2011-03-23 19:27:56 +00:00
Chaz Littlejohn
8c4d5d42b4
Added printtest back in and fixed a couple of SessionsCache bugs
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
3ac088b748
Fixed a timezone issue in storeSessionsCache
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
dd6ce46487
Added methods to create utilize a lock table for managing access to the database during a multi-threaded import. Currently, only MySQL is supported
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
3c2fdaf53e
Fixed some data-type bugs in the Import class -- essentialy the same commit as 530a21cb9f65f83f8b09ef08f6415c8bd256fccc in the chaz branch of my repo
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
91d791a3ac
Commented out the truly absurd amount of printing that goes on whenever you load a Config file
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
09f1616e87
fixed a small bug in storeHudCache
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
d0ae2a155d
changed all of the currency substitutions from byte stream (i.e. \xe2\x82\xac for EURO) to unicode (u'\u20AC') as it was throwing unicode errors when attempting to format the string in the various regex statements. I am aware that I may be the only one to encounter this problem.
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
66e1cc3704
This commit includes a set of updates which:
...
* implement the new SessionsCache table
- The SessionsCache table can be used to track overall or game sepecific sessions
- The totalProfit field is summed by gameTypeId for cash games allowing for multiple currencies
- Tournament profit (cashes - buy-ins) are also recorded in totalProfit and its grouped by tourneyId
* change the sequence and methodology surrounding the import of hands
- fpdb_import.py implements a unique Hand.py method for each table
- Hands SessionCache and HudCache records themselves are 'cached' to allow for 'bulk insert' at EOF
- import is reorganized to allow for efficient locking in multiple connection environments
* changes the name of the index created by addTPlayersIndex (so that it is unique) to accommodate a bug in MySQL 5.5
TODO
* A 'rebuild_sessionsCache' method is still required
* Further commits are expected to fix bugs created during the porting of this code
2011-03-23 19:27:55 +00:00
Chaz Littlejohn
ed1259fe30
It's not actually a big deal if there's no bring-in, like if the bring-in completes instead, so changed to debug.
2011-03-22 04:17:46 +00:00
Chaz Littlejohn
41e0042235
Added tracking for FTP 2-7 Single Draw
2011-03-22 04:16:23 +00:00
Chaz Littlejohn
64f46181fa
Modified hhc & fpdb_import so gtk & pygtk are imported only if import is run from the
...
gui
2011-03-22 03:22:38 +00:00
Chaz Littlejohn
5f63bc1cca
Merge branch 'sorrow' into chazdazzle
2011-03-22 02:21:15 +00:00
Chaz Littlejohn
bd94b34bf9
testing...
2011-03-19 21:38:48 +00:00
Chaz
0f9709390e
Replaced -i infile with -f file in Options.py and replaced options.infile with options.filename in SplitHandHistory.py, Anonymise.py, and ImapFetcher.py
2010-10-13 02:23:41 -04:00
Chaz
b0cf6d3cb0
removed -f filename from Options.py and replaced its use in SplitHandHistory.py with -i infile
2010-10-13 02:18:36 -04:00
Chaz
fa3f878c3a
* Migrated commandline options to Options.py
...
* Added a EOF exception
* Fixed a few error handling issues
2010-10-13 01:51:57 -04:00
Chaz
f97c1da3b9
Migrated SplitHandHistory.py commandline options to Options.py
2010-10-13 01:48:35 -04:00
Chaz
b08081e419
Added a FpdbEndOfFile error for use in SplitHandHistory.py
2010-10-13 01:47:28 -04:00
Chaz
6ce42df734
Fixed a re matching problem for sites (OnGame, Carbon) which include char after the newline in re_SplitHands
2010-10-12 22:47:22 -04:00
Chaz
d517606a59
Added SplitHandHistory module which can be used to split up hand histories (archive & non-archive) into smaller files of n hands each (useful in limitied memory situations). Module contains a SplitHandHistory class and a command line utility.
2010-10-12 21:00:08 -04:00
Chaz
6202d02dbc
Module containing a class that identifies the site a particular hand history, or directory of hand histories came from. Includes a main method which id's the regression files.
2010-10-12 01:08:32 -04:00
Chaz
388bec04dd
Removed Partouche from <hhcs> in the config files
2010-10-11 22:37:59 -04:00
Chaz
9c225a5b72
* Updated storeHandsPlayers() to insert via executemany() if 'saveActions' is False and via looped execute() to call get_last_insert_id() if 'saveActions' is True
2010-09-28 23:34:20 -04:00
Chaz
76b2dec2b6
* updated _addRaise() so that it does in fact accept the action variable
2010-09-28 17:33:15 -04:00
Chaz
ae6a035834
* fixed a small issue in assembleHandsActions()
2010-09-28 17:23:44 -04:00
Chaz
0e9fb62b0d
* added a call to the import_parameter 'saveActions' in Hand.py, saving it's value in the variable Hand.saveActions
...
* added logic to Hand.import() so that it only calls db.storeHandsActions if saveActions is true
* added logic to DetailedStats.getstats() so that it only calls assembleHandsActions() if saveActions is true
2010-09-28 17:17:15 -04:00
Chaz
030a15f041
* Filled assembleHandsActions()
2010-09-28 17:11:09 -04:00
Chaz
a76e34598d
* Modified storeHandsPlayers() so it returns a dictionary of handId & playerId to handPlayerIds
...
* Filled storeHandsActions() with the required information
* Updated Hand.insert so that it calls storeHandsActions() and added the variable dbid_hpid to receive the new dictionary
2010-09-28 17:09:24 -04:00
Chaz
1b0db117ce
* updated 'createHandsActionsTable' and 'store_hands_actions' in the SQL dictionary
2010-09-28 17:01:31 -04:00
Chaz
c1b2a0040c
* Added HandsActions & Actions indexes & foreign keys to Database.py
...
* Added 'createActionsTable' to the SQL dictionary
* Updated create_tables so 'createActionsTable' would be called
* Updated dumpdatabase(), adding in u'Actions'
* Added action name & code info for filling the Actions table in FillDefaultData()
2010-09-28 16:59:37 -04:00
Chaz
94d4bf6ed5
* added ACTION dictionary for looking up actionId
...
* edited addAnte(), addBlind(), addCall(), addBet(), addBlind() (Draw), addDiscard() (Draw),
addComplete() (Stud), and addBringIn() (Stud) to standardize element order and datatype
* added a field to _addRaise() which allows addComplete() (Stud) to pass the 'compleates' action type
2010-09-28 16:50:33 -04:00