spells-mtg 0.11.4__py3-none-any.whl → 0.11.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spells-mtg might be problematic. Click here for more details.
- spells/card_data_files.py +26 -23
- {spells_mtg-0.11.4.dist-info → spells_mtg-0.11.6.dist-info}/METADATA +1 -1
- {spells_mtg-0.11.4.dist-info → spells_mtg-0.11.6.dist-info}/RECORD +6 -6
- {spells_mtg-0.11.4.dist-info → spells_mtg-0.11.6.dist-info}/WHEEL +0 -0
- {spells_mtg-0.11.4.dist-info → spells_mtg-0.11.6.dist-info}/entry_points.txt +0 -0
- {spells_mtg-0.11.4.dist-info → spells_mtg-0.11.6.dist-info}/licenses/LICENSE +0 -0
spells/card_data_files.py
CHANGED
|
@@ -28,7 +28,6 @@ ratings_col_defs = {
|
|
|
28
28
|
ColName.NAME: pl.col("name").cast(pl.String),
|
|
29
29
|
ColName.COLOR: pl.col("color").cast(pl.String),
|
|
30
30
|
ColName.RARITY: pl.col("rarity").cast(pl.String),
|
|
31
|
-
ColName.CARD_TYPE: pl.col("types").cast(pl.String),
|
|
32
31
|
ColName.IMAGE_URL: pl.col("url").cast(pl.String),
|
|
33
32
|
ColName.NUM_SEEN: pl.col("seen_count").cast(pl.Int64),
|
|
34
33
|
ColName.LAST_SEEN: pl.col("seen_count") * pl.col("avg_seen").cast(pl.Float64),
|
|
@@ -41,7 +40,8 @@ ratings_col_defs = {
|
|
|
41
40
|
ColName.WON_OPENING_HAND: pl.col("opening_hand_game_count")
|
|
42
41
|
* pl.col("opening_hand_win_rate").cast(pl.Float64),
|
|
43
42
|
ColName.DRAWN: pl.col("drawn_game_count").cast(pl.Int64),
|
|
44
|
-
ColName.WON_DRAWN: pl.col("drawn_win_rate")
|
|
43
|
+
ColName.WON_DRAWN: pl.col("drawn_win_rate")
|
|
44
|
+
* pl.col("drawn_game_count").cast(pl.Float64),
|
|
45
45
|
ColName.NUM_GIH: pl.col("ever_drawn_game_count").cast(pl.Int64),
|
|
46
46
|
ColName.NUM_GIH_WON: pl.col("ever_drawn_game_count")
|
|
47
47
|
* pl.col("ever_drawn_win_rate").cast(pl.Float64),
|
|
@@ -107,9 +107,9 @@ def deck_color_df(
|
|
|
107
107
|
[
|
|
108
108
|
pl.lit(set_code).alias(ColName.EXPANSION),
|
|
109
109
|
pl.lit(format).alias(ColName.EVENT_TYPE),
|
|
110
|
-
(pl.lit("Top") if player_cohort == "top" else pl.lit(None))
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
(pl.lit("Top") if player_cohort == "top" else pl.lit(None))
|
|
111
|
+
.alias(ColName.PLAYER_COHORT)
|
|
112
|
+
.cast(pl.String),
|
|
113
113
|
*[val.alias(key) for key, val in deck_color_col_defs.items()],
|
|
114
114
|
]
|
|
115
115
|
)
|
|
@@ -172,21 +172,24 @@ def base_ratings_df(
|
|
|
172
172
|
out=ratings_file_path,
|
|
173
173
|
)
|
|
174
174
|
|
|
175
|
-
concat_list.append(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
175
|
+
concat_list.append(
|
|
176
|
+
pl.read_json(ratings_file_path, infer_schema_length=500)
|
|
177
|
+
.with_columns(
|
|
178
|
+
(pl.lit(deck_color) if deck_color != "any" else pl.lit(None))
|
|
179
|
+
.alias(ColName.MAIN_COLORS)
|
|
180
|
+
.cast(pl.String)
|
|
181
|
+
)
|
|
182
|
+
.select(
|
|
183
|
+
[
|
|
184
|
+
pl.lit(set_code).alias(ColName.EXPANSION),
|
|
185
|
+
pl.lit(format).alias(ColName.EVENT_TYPE),
|
|
186
|
+
(pl.lit("Top") if player_cohort == "top" else pl.lit(None))
|
|
187
|
+
.alias(ColName.PLAYER_COHORT)
|
|
188
|
+
.cast(pl.String),
|
|
189
|
+
ColName.MAIN_COLORS,
|
|
190
|
+
*[val.alias(key) for key, val in ratings_col_defs.items()],
|
|
191
|
+
]
|
|
192
|
+
)
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
return pl.concat(concat_list)
|
|
@@ -3,7 +3,7 @@ spells/.ruff_cache/0.8.6/17785301476771359756,sha256=gPYLG8psuOSo37IefLzTu5wgRrb
|
|
|
3
3
|
spells/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
|
|
4
4
|
spells/__init__.py,sha256=0pnh2NLn9FrNKncE9-tBsighp3e8YAsN--_ovUpgWGs,333
|
|
5
5
|
spells/cache.py,sha256=6cl0q62erR3LCANPSfxG5-J7JQfLwNdWjzlBpfiL4IE,7174
|
|
6
|
-
spells/card_data_files.py,sha256=
|
|
6
|
+
spells/card_data_files.py,sha256=k9NcYLgK5vdqLfM_VZ0XMnNGWBO-IloocDXg5J8bO-s,6526
|
|
7
7
|
spells/cards.py,sha256=6stFPhJOzHqvQnkSv9cDeylRa_7L9Y8sOaowiZhzz6I,4174
|
|
8
8
|
spells/columns.py,sha256=s_PYyg2QaRL6kLWFNKCBEfbMF0x7O7-Yd9SeG1ttYL4,18206
|
|
9
9
|
spells/config.py,sha256=zpRUZ-6JKALE149L0yfeD1AgqKPaVBGHfD_TdHi-jqE,235
|
|
@@ -16,8 +16,8 @@ spells/log.py,sha256=3avmg65hru8K9npKLvPp1wWWxq-hoEYDUCbxqhPkKUw,2175
|
|
|
16
16
|
spells/manifest.py,sha256=ExWVk17BRw615UmvrV817xwz457yfTNdNMNE_M00aEg,8338
|
|
17
17
|
spells/schema.py,sha256=DbMvV8PIThJTp0Xzp_XIorlW6JhE1ud1kWRGf5SQ4_c,6406
|
|
18
18
|
spells/utils.py,sha256=IO3brrXVvZla0LRTEB5v6NgGqZb_rYA46XtKBURGMNk,1944
|
|
19
|
-
spells_mtg-0.11.
|
|
20
|
-
spells_mtg-0.11.
|
|
21
|
-
spells_mtg-0.11.
|
|
22
|
-
spells_mtg-0.11.
|
|
23
|
-
spells_mtg-0.11.
|
|
19
|
+
spells_mtg-0.11.6.dist-info/METADATA,sha256=X6UVl1fVGPdadQffDujjgizXMPINGPixenDm3mTfVKU,47369
|
|
20
|
+
spells_mtg-0.11.6.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
21
|
+
spells_mtg-0.11.6.dist-info/entry_points.txt,sha256=a9Y1omdl9MdnKuIj3aOodgrp-zZII6OCdvqwgP6BFvI,63
|
|
22
|
+
spells_mtg-0.11.6.dist-info/licenses/LICENSE,sha256=tS54XYbJSgmq5zuHhbsQGbNQLJPVgXqhF5nu2CSRMig,1068
|
|
23
|
+
spells_mtg-0.11.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|