Commit Graph

427 Commits

Author SHA1 Message Date
steffen123
2f9ded5141 fix pgsql index rebuilding 2010-08-04 17:39:45 +02:00
steffen123
102cfa5d88 Merge branch 'eric'
Conflicts:
	pyfpdb/DerivedStats.py - identical change was already pulled
2010-08-02 14:30:29 +02:00
steffen123
1b4b335b29 Merge branch 'carl' 2010-08-02 14:00:26 +02:00
steffen123
9ad275e11c recognise and store knockout and bounty 2010-08-02 13:53:50 +02:00
Eric Blade
8daee8da9b Merge branch 'master' of git://git.assembla.com/fpdb.git 2010-08-01 02:42:48 -04:00
steffen123
ed239668c0 fix pgsql index and foreign key drops 2010-07-31 23:55:05 +02:00
unknown
a11f4f61cd store game currency 2010-07-29 17:27:07 -04:00
steffen123
216c9f2714 increase DB version for sqlcoder's recent DB change 2010-07-29 17:31:40 +02:00
sqlcoder
9c5581caf0 rename stealattempt fields to raisefirstin and derive accordingly 2010-07-27 22:27:18 +01:00
steffen123
7f25cf6da8 DB: allow NULL for TT.currency/buyin/fee for when this info is not available 2010-07-23 04:00:25 +02:00
steffen123
ad28168d02 DB/TOUR: remove HandsPlayers.tourneyTypeId 2010-07-22 21:03:01 +02:00
steffen123
7063bc8905 TOURNEY: stop it from creating new TT for each tourney 2010-07-22 20:23:27 +02:00
steffen123
a6c43cdca7 TOUR: a trivial fix, a trivial change, and a few debug prints 2010-07-22 19:26:11 +02:00
steffen123
dfacdbea7a Merge branch 'sqlcoder' 2010-07-18 02:03:40 +02:00
steffen123
7f2364cf1d DUMP: change format slightly 2010-07-17 05:13:38 +02:00
steffen123
139dfbafb5 CLEANUP: move dump db file saving stuff into fpdb.pyw 2010-07-17 05:11:09 +02:00
steffen123
59294a7b94 TIMES: record Hands.importTime as UTC instead of localtime 2010-07-17 03:01:09 +02:00
steffen123
656986826f TOURNEY: record added/addedCurrency 2010-07-17 02:35:02 +02:00
steffen123
90ceafda6d DB: Added TT.added, addedCurrency 2010-07-17 02:19:12 +02:00
steffen123
f6232004ad PSS: PS summary import now supports non-ascii playernames in sqlite 2010-07-16 20:37:53 +02:00
steffen123
d65b6e55c8 TOURNEY: fix recording of Hands.tourneyId, allow it to be NULL 2010-07-15 02:08:59 +02:00
steffen123
10a94fa441 IMAP: fix a silly mistake I made earlier 2010-07-15 01:53:46 +02:00
steffen123
9e004e8962 DB: remove default row for TT, allow HP.ttId to be NULL and remove default 2010-07-15 01:18:36 +02:00
steffen123
ebf16c6aa9 TOURNEY: store HandsPlayers.tourneysPlayersId 2010-07-15 00:27:57 +02:00
steffen123
6a8f3ff68b TOURNEY: createOrUpdateTourneysPlayers now updates fields as needed 2010-07-14 23:05:37 +02:00
steffen123
ced3e8ac72 TOURNEY: rename a query 2010-07-14 22:44:10 +02:00
steffen123
85cc5a5471 TOURNEY: DB.createOrUpdateTourney fills in missing fields now 2010-07-14 22:36:07 +02:00
sqlcoder
3657327566 clear player cache when recreating database 2010-07-14 21:07:20 +01:00
steffen123
40088d6cf3 rename DB.createOrUpdateTourneyType to createTourneyType since TTs are static 2010-07-14 21:07:19 +02:00
steffen123
79043988c2 Merge branch 'sqlcoder' 2010-07-14 18:52:33 +02:00
steffen123
5cd78b608b DB: add TourneyTypes.rebuyFee and addOnFee 2010-07-14 01:49:55 +02:00
sqlcoder
b07505d367 tidy up closedown 2010-07-13 21:23:32 +01:00
steffen123
04ec51d7c1 DB: Fix capitalisation of Gametypes table in SQLite 2010-07-12 11:00:50 +02:00
steffen123
d53b3e1b4a DB: add backings table, fix a couple of log entries 2010-07-11 12:47:28 +02:00
steffen123
9283d7b579 some fixes for handStart rename, fixes for TT.category/limitType,
dumpDatabase method and menu entry
2010-07-11 09:47:05 +02:00
steffen123
5fee5136a9 DB: renamed Hands.handStart to Hands.startTime for consistency 2010-07-11 08:05:54 +02:00
steffen123
822c592db8 DB: add category and limitType to TourneyTypes 2010-07-11 06:42:37 +02:00
steffen123
cfb0a3f3d5 remove default value and allow null for Hands.rush 2010-07-11 06:37:25 +02:00
steffen123
8e9d588322 first version of Tourney Player Stats works 2010-07-11 03:13:58 +02:00
steffen123
87fbd56091 imports still playing tourney's TP, but not winnings of finishers 2010-07-11 01:55:15 +02:00
steffen123
6a3587e92e failed attempt at making SQLite accept non-ASCII player names for this 2010-07-11 00:37:32 +02:00
steffen123
ca61189706 added TourneyTypeCount to DB Stats window 2010-07-10 19:39:05 +02:00
steffen123
b1e41a54ec intermediate commit on the way to tourney stats 2010-07-10 05:19:50 +02:00
steffen123
4c00ef19cc implement simple DB stats - Hand and tourney count 2010-07-10 02:07:47 +02:00
steffen123
310c7a2947 PS Summary now stores rank, winnings, etc. into TourneysPl. 2010-07-09 01:07:22 +02:00
steffen123
5b64ad771a it now stores entries, prizepool and endTime into TT 2010-07-08 23:47:06 +02:00
steffen123
201b3a5b6c PS Summary now parses start/endTime. fixes MySQL support
also removed some but not all the new prints
2010-07-08 21:41:27 +02:00
steffen123
178b528d3b change calls to python2 back to python 2010-07-08 20:01:03 +02:00
steffen123
c6b6f8a788 many not really separable changes for IMAP import and associated cleaning
- deactivated use of TourneySummary (short: TS) from HHC and subclasses
- menu entry for IMAP import
- converted ImapSummaries (short: IS) to use the config file
- IS now optionally supports non-SSL and can run on folders other than INBOX
- removed gametypes and getGameTypeAsString from TS method as identical one is in Hand
- some other stuff
2010-07-08 19:46:25 +02:00
steffen123
eb3233ac98 more tourney work
- moved HH-based tourney handling completely into Hand
- renamed Tourney.py to TourneySummaries
- changed many DB fields to allow NULL and removed defaults
2010-07-07 04:01:40 +02:00
steffen123
04ed65e88c minor DB changes. recording TourneysPlayers now for FTP and PS 2010-07-07 00:52:44 +02:00
steffen123
e4916bc456 replace catchall except with an if 2010-07-06 23:52:59 +02:00
steffen123
e2087d60a1 rename tourney methods in DB 2010-07-06 23:43:49 +02:00
steffen123
e5cba5172d DB version increase for rush field 2010-07-06 18:14:35 +02:00
steffen123
d01435d068 store Tourneys and TourneyTypes for PS tourneys. see ML for more details 2010-07-05 11:48:26 +02:00
steffen123
39859970d7 another repair as a result of removing payinAmounts 2010-07-05 01:29:05 +02:00
steffen123
3b24fd18b2 some cleanups:
- updated copyright notices
- added copyright notices that were missing
- changed python to python2
- added gpl-2/3 license texts
- removed THANKS.txt file as the wiki version is more up to date
- removed empty fpdb_db.py
- added GPL2 to debian license file
2010-07-04 03:05:16 +02:00
steffen123
d291b8621f removed TourneysPlayers.payinAmounts 2010-07-02 22:40:40 +02:00
steffen123
6b417ebdd4 added HandsPlayers.sitout as discussed on ML 2010-07-02 22:17:15 +02:00
steffen123
5e45a086bd DB-version increase for headsup-removal 2010-07-02 19:45:30 +02:00
steffen123
6bc3e741c6 removed TourneyTypes.headsUp 2010-07-02 19:39:02 +02:00
steffen123
d652eb5d3c repaired sqlite db creation 2010-06-26 12:24:30 +02:00
steffen123
0477c73801 changed TourneyTypes as discussed, some currency-related fixes
I haven't expanded all queries etc. to include the new fields
    as that code is not currently used by anything and can be
    expanded as needed
2010-06-25 11:02:01 +02:00
steffen123
8a2f881b61 split TourneyTypes.rebuyOrAddon to rebuy and addOn 2010-06-22 22:27:10 +02:00
steffen123
58da99c86c removed 2 ancient unusued methods and updated TourneysPlayers
tested bulk import for PS and FTP, player stats and positional stats
also fixed a little bug that sqlite created HandsPlayers.actionString
	with type REAL instead of VARCHAR
2010-06-22 21:05:33 +02:00
steffen123
d207261c82 Merge branch 'master' of git://git.assembla.com/fpdboz
removed pyfpdb/fpdb.py
2010-06-21 14:02:08 +02:00
steffen123
de2d810ac5 moved currency field from Sites to Gametypes&TourneyTypes, addded Sites.code 2010-06-20 17:34:58 +02:00
Gerko de Roo
d9f6967c1c Street(x)Bet and street(x)Call and Street(x)Raises
Now updates in hud chache also
2010-06-16 17:17:03 +02:00
Gerko de Roo
db6f7989a9 Street(x)Bet street(x)Calls were stored in (db.)handplayers.
They were not yet available in (db.)hudchache.
Using the Bets and Call, together with stree(x)Agression the
aggression frequency and aggression factor can be calculated.
2010-06-16 17:16:58 +02:00
sqlcoder
b7a7af37d5 minor whitespace change 2010-06-06 13:20:39 +01:00
Worros
212438a0c6 Database.py - Additional logging and comments 2010-06-04 15:25:56 +08:00
Worros
6b00311756 Make sqlite index deletion and creation work.
Also updated the coding style and logging in that area.
2010-06-04 14:37:46 +08:00
sqlcoder
014ddedc01 create db automatically if using sqlite 2010-03-07 10:30:56 +00:00
sqlcoder
6a6d1b1b2c fix 3bet stat (was being set to false if someone else 4bet) 2010-02-27 18:41:30 +00:00
sqlcoder
134a13bf29 create indexes on hudcache in sqlite 2010-02-25 20:43:15 +00:00
sqlcoder
09801cd00e first go at db maintenance window, turned off for now 2010-02-20 18:59:49 +00:00
sqlcoder
4a0fcd62a0 sqlite seems to perform ok for me 2010-02-06 10:28:17 +00:00
Worros
b2e409ae00 Merge branch 'master' of git://git.assembla.com/fpdb-sql 2010-02-04 00:36:51 +08:00
Worros
1cefb2e857 Fix playername siteid insert
From Gerko on mailing list:
> I just did a trial. Use bulkimport for a single Pokerstars file
> switch setting and bulkimport a single Full tilt file.
> When screening the db all players in the database show the same siteId
> (2 for pokerstars)
> Or the other way if the first site was Full Tilt.

The Lambda function wasn't initialising the lambda function correctly.
2010-02-03 23:48:39 +08:00
sqlcoder
d4248706e4 remove surplus get_logger calls, tidy up log messages some more 2010-02-01 22:31:00 +00:00
sqlcoder
86330e536a tidy up logging so that log isn't created in /fpdb/log/ unless it is being used 2010-02-01 21:03:51 +00:00
sqlcoder
e4c6419074 try to improve tourney handling in filter (now displays buyin, but this is not yet used by playerstats when fetching stats 2010-02-01 00:17:55 +00:00
sqlcoder
bbc84fef14 comment out debug message 2010-01-31 12:22:24 +00:00
sqlcoder
5e9486aa3d config changes for logging: logs rotate and go to APPDATA, hud_config now goes in /fpdb/ if they must use it but logging.conf stays in /pyfpdb/. TODO: Some logging still into /fpdb/log/ 2010-01-31 11:25:24 +00:00
sqlcoder
9932025271 move sqlite charset fix to Configuration.py from Database.py, make separate not_needed variables in Charset.py in case we want to update them separately 2010-01-30 11:05:34 +00:00
sqlcoder
d147187a71 add extra comment/suggestion 2010-01-29 23:36:39 +00:00
sqlcoder
a7d4c6243a add assignment (but commented out) that fixes unicode probs for me with sqlite 2010-01-29 23:29:37 +00:00
sqlcoder
2e970baa82 remove sqlite specific test to skip unicode encoding 2010-01-29 22:29:14 +00:00
Worros
a23d96e85d Add Carbon back in as default data.
Also add PKR
2010-01-29 17:00:37 +08:00
Worros
17bc9af88e Merge branch 'master' of git://github.com/kangaderoo/fpdb-kangaderoo
Conflicts:
	run_fpdb.py
2010-01-29 13:01:38 +08:00
sqlcoder
1df418c8e4 create fpdb dir if required, improve sqlite performance :-) 2010-01-27 23:48:39 +00:00
sqlcoder
e82d276cf9 pull and merge from carl (nothing changed) 2010-01-27 08:56:51 +00:00
sqlcoder
5a9836862f sqlite mods, made sqlite the default in HUD_config.xml.example - works (roughly) straight out of the box 2010-01-27 00:48:02 +00:00
sqlcoder
11bc48e126 merge fpdb_db.py into Database.py 2010-01-26 23:54:04 +00:00
sqlcoder
47baee65f9 add tourneyid to hands table (REQUIRES REIMPORT) and fix sqlite db access 2010-01-26 22:46:48 +00:00
Mika Bostrom
2c7287c351 Add new encoder
This encoder is used to handle input from HH conversion, which needs to
end up as UTF-8 in the database. Switch the open-coded routine from
Database.py to this common routine so all encodings now take place in
the same file.
2010-01-24 21:27:40 +01:00
Mika Bostrom
860b5737b7 Use common encoding routine everywhere
The string/locale manipulation in Database.py was open-coded and did not
use Charset.to_utf8() like the rest of the code.
2010-01-24 21:27:35 +01:00
Mika Bostrom
33277ce68b Add new encoder
This encoder is used to handle input from HH conversion, which needs to
end up as UTF-8 in the database. Switch the open-coded routine from
Database.py to this common routine so all encodings now take place in
the same file.
2010-01-24 21:11:46 +02:00
Mika Bostrom
6dcec48005 Use common encoding routine everywhere
The string/locale manipulation in Database.py was open-coded and did not
use Charset.to_utf8() like the rest of the code.
2010-01-24 19:59:49 +02:00
Gerko de Roo
73ae88e47a Merge branch 'master' of git://git.assembla.com/fpdboz.git 2010-01-24 13:37:27 +01:00
Mika Bostrom
3a03bc51a2 Some character set improvements
The strings (names) as stored in database should always be UTF-8;
whatever the display locale is, we then need to convert from the storage
encoding to session encoding. When making database queries with players
names in them, the names must be reconverted to UTF-8.
2010-01-23 16:34:24 +01:00
Worros
98e4b598ed Merge branch 'master' of git://repo.or.cz/fpbd-bostik 2010-01-23 02:18:42 +08:00
Worros
c88ccd1140 Remove unused convert_cards() 2010-01-23 02:18:20 +08:00
Mika Bostrom
91cd2d2599 Remove erroneous encoding
This string should not be encoded, it seems.
2010-01-21 22:05:24 +02:00
Mika Bostrom
dd12da302d Merge branch 'good'
Conflicts:
	pyfpdb/test_PokerStars.py

Resolve by copying sorrow's version on top-
2010-01-21 21:34:54 +02:00
Mika Bostrom
a841603460 Some character set improvements
The strings (names) as stored in database should always be UTF-8;
whatever the display locale is, we then need to convert from the storage
encoding to session encoding. When making database queries with players
names in them, the names must be reconverted to UTF-8.
2010-01-21 21:24:55 +02:00
Worros
776405982b Quick fix for hud 2010-01-15 21:24:37 +08:00
Mika Bostrom
478b82587d Store names as UTF-8
The names should be always in UTF-8 encoding. At least for PostgreSQL
the encdoding of the database comes from the time of running 'initdb'
(which is different from 'createdb') and if the encoding was selected or
set to something else at that time, the following error will occur:

  File ".../pyfpdb/Database.py", line 1630, in <lambda>
    self.pcache = LambdaDict(lambda  key:self.insertPlayer(key, siteid))
  File ".../pyfpdb/Database.py", line 1661, in insertPlayer
    c.execute (q, (site_id, _name))
  File "/usr/lib/python2.5/encodings/iso8859_15.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2122' in
position 10: character maps to <undefined>

This happens because 'name' is a regular string as opposed to a valid
unicode object. By forcing the string to unicode and encoding it in
UTF-8 the error goes away. In my case the database encoding was
ISO-8859-15 (latin9) but any other "wrong" encoding would trigger the
same problem.

This is a relatively common problem in python.
2009-12-29 13:05:03 +08:00
Worros
46e91e1a0f [NEWIMPORT] Remove a couple of unused functions 2009-12-25 18:55:13 +08:00
Worros
0adf0a7b18 [NEWIMPORT] updateHudCache update.
Fix a couple of bugs:
    position != 2 its = 'M'
    actually commit changes to hud
2009-12-24 01:12:39 +08:00
Worros
a0475aa4db [NEWIMPORT] Add function to update hudcache for Hand 2009-12-23 23:14:34 +08:00
Worros
a2d0657b3a [NEWIMPORT] Remove unused functions
Move old HudCache update over in preparation for fixing
2009-12-23 13:56:18 +08:00
Worros
1b82f20411 [NEWIMPORT] Remove legacy code. 2009-12-22 14:44:35 +08:00
Worros
a2947c8707 [NEWIMPORT] Add stubbed variable to insert 2009-12-18 10:28:28 +08:00
Worros
975eb360ef [NEWIMPORT] Add stubbed variable to insert 2009-12-18 10:27:43 +08:00
Worros
1f70a9ad8a [NEWIMPORT] Fix thinko on insertPlayer
Was returning the player name instead of id in the case where the player exists in the database, but wasn't cached already

Removing some merge gunge too
2009-12-17 01:55:48 +08:00
Worros
56c5521e6a [NEWIMPORT] Move HandsPlayers insert statement into SQL.py 2009-12-14 18:01:24 +08:00
Worros
fb92ee2941 [NEWIMPORT] Stub remaining HandsPlayers stats 2009-12-14 17:52:08 +08:00
sqlcoder
ab89f9f603 show message dialog if pg connect fails 2009-12-12 09:51:07 +00:00
Worros
5f67fc8220 Merge branch 'master' of git://git.assembla.com/fpdb-eric 2009-12-07 12:10:56 +08:00
sqlcoder
18b0a47555 move print message to log 2009-12-05 22:20:44 +00:00
Eric Blade
abf132c719 Merge branch 'master' of git://git.assembla.com/fpdb-sql.git
Conflicts:
	pyfpdb/Database.py
2009-12-01 08:03:25 -05:00
Eric Blade
bec343abfd argh at whitespace churn, do i have my editor settings screwey?
trap error 2003 on mysql connect (same as 2002, but for tcp)
2009-12-01 06:58:33 -05:00
sqlcoder
f7ed06d071 improve rebuild hudcache and indexes dialogs 2009-11-30 21:43:29 +00:00
sqlcoder
00c85aa62d add rebuild indexes option to Database menu (can we put tooltips over these menu options?) 2009-11-29 23:02:45 +00:00
sqlcoder
65b372570f add some comments 2009-11-29 17:36:37 +00:00
sqlcoder
7f40d9dd3a change default for min_seats to 0 in case hc.activeSeats is zero 2009-11-28 11:48:06 +00:00
sqlcoder
b60895a89f merge from carl 2009-11-26 22:35:50 +00:00
sqlcoder
65fe163379 add ability to display hud stats by number of seats at table (All / Custom / Exact) 2009-11-26 21:28:05 +00:00
Worros
aee9a7339c [NEWIMPORT] Stop duplicate hands from crashing import 2009-11-25 16:29:30 +08:00
Worros
83f06c35cc [NEWIMPORT] HandsPlayers.CBet stats 2009-11-25 14:59:29 +08:00
Worros
a87a145c28 [NEWIMPORT] HandsPlayers.streetXCalls and streetXBets
Pretty sure the bets stat is wrong
2009-11-25 00:57:14 +08:00
Worros
3bb1656603 [NEWIMPORT] Add HandsPlayers.wonAtSD 2009-11-24 23:23:21 +08:00
Worros
9203e0b0d8 [NEWIMPORT] HandsPlayers.sawShowdown added 2009-11-24 23:14:43 +08:00
Worros
dc1b0d2e38 [NEWIMPORT] Calculate wonWhenSeenStreet1
Won is defined as 'collected money from the pot'

Seen street 1 does not require vpip on street 0
2009-11-24 21:58:27 +08:00
Worros
48c395565e [NEWIMPORT] Add HandsPlayers.totalProfit
Grapher now works after import yay
2009-11-24 17:29:54 +08:00
Worros
d617f1c4e0 [NEWIMPORT] Update Database.storeHandsPlayers 2009-11-24 16:39:59 +08:00
Worros
34e7fb0459 [NEWIMPORT] Fix HandsPlayers.cardX init 2009-11-23 00:20:51 +08:00
Worros
943e188a4d [NEWIMPORT] Hole card data for flop games
Take some code from Grindi to calculate playersAtStreetX and streetXRaises
2009-11-23 00:05:23 +08:00
Mika Bostrom
615d1ea8a6 Add default style keys
It seems there is some weird way for stylekeys to remain unset. Catch
the special case and have a way to see why this happens.
2009-11-20 08:48:49 +02:00
sqlcoder
04c09af7b2 tidy up aggregation code, NOTE: renamed some aggregation config to try and make meaning clearer, updated aggregation description in .example 2009-11-17 21:47:43 +00:00
Eratosthenes
5021cae297 Clean up logging changes. 2009-11-09 19:30:23 -05:00
Eratosthenes
0bbbc7222b First go at rationalizing config paths and logging defaults. 2009-11-08 22:53:10 -05:00
Worros
5c7cce090e [NEWIMPORT] Added street0VPI to HandsPlayers
Also fixed last patch for streetXSeen
2009-11-06 19:30:50 +08:00
Worros
006d7164ea [NEWIMPORT] Insert streetXSeen col into HandsPlayers 2009-11-06 19:13:52 +08:00
Worros
5aef7b6054 [NEWIMPORT] Insert winnings column into HandsPlayers 2009-11-06 18:39:59 +08:00
Worros
bea6bf2d6b Merge branch 'master' of git://git.assembla.com/fpdb-mme
Conflicts:
	pyfpdb/Configuration.py
2009-11-05 12:22:05 +08:00
fpdb-mme
6d54da1c49 Merge branch 'master' of git://git.assembla.com/fpdboz
Conflicts:
	pyfpdb/Configuration.py
	pyfpdb/SQL.py

note:hopefully got the merge right
2009-11-04 18:34:28 +01:00
unknown
98981059cd Merge branch 'master' of git://git.assembla.com/free_poker_tools.git 2009-11-04 02:58:13 -05:00
Eratosthenes
0a563cad53 Added get_table_info method. 2009-11-03 21:51:10 -05:00