spells-mtg 0.11.3__tar.gz → 0.11.4__tar.gz
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_mtg-0.11.3 → spells_mtg-0.11.4}/PKG-INFO +1 -1
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/pyproject.toml +1 -1
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/card_data_files.py +26 -26
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/LICENSE +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/README.md +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/.ruff_cache/.gitignore +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/.ruff_cache/0.8.6/17785301476771359756 +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/.ruff_cache/CACHEDIR.TAG +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/__init__.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/cache.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/cards.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/columns.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/config.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/draft_data.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/enums.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/extension.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/external.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/filter.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/log.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/manifest.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/schema.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/spells/utils.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/tests/__init__.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/tests/filter_test.py +0 -0
- {spells_mtg-0.11.3 → spells_mtg-0.11.4}/tests/utils_test.py +0 -0
|
@@ -25,35 +25,35 @@ START_DATE_MAP = {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
ratings_col_defs = {
|
|
28
|
-
ColName.NAME: pl.col("name"),
|
|
29
|
-
ColName.COLOR: pl.col("color"),
|
|
30
|
-
ColName.RARITY: pl.col("rarity"),
|
|
31
|
-
ColName.CARD_TYPE: pl.col("types"),
|
|
32
|
-
ColName.IMAGE_URL: pl.col("url"),
|
|
33
|
-
ColName.NUM_SEEN: pl.col("seen_count"),
|
|
34
|
-
ColName.LAST_SEEN: pl.col("seen_count") * pl.col("avg_seen"),
|
|
35
|
-
ColName.NUM_TAKEN: pl.col("pick_count"),
|
|
36
|
-
ColName.TAKEN_AT: pl.col("pick_count") * pl.col("avg_pick"),
|
|
37
|
-
ColName.DECK: pl.col("game_count"),
|
|
38
|
-
ColName.WON_DECK: pl.col("win_rate") * pl.col("game_count"),
|
|
39
|
-
ColName.SIDEBOARD: pl.col("pool_count") - pl.col("game_count"),
|
|
40
|
-
ColName.OPENING_HAND: pl.col("opening_hand_game_count"),
|
|
28
|
+
ColName.NAME: pl.col("name").cast(pl.String),
|
|
29
|
+
ColName.COLOR: pl.col("color").cast(pl.String),
|
|
30
|
+
ColName.RARITY: pl.col("rarity").cast(pl.String),
|
|
31
|
+
ColName.CARD_TYPE: pl.col("types").cast(pl.String),
|
|
32
|
+
ColName.IMAGE_URL: pl.col("url").cast(pl.String),
|
|
33
|
+
ColName.NUM_SEEN: pl.col("seen_count").cast(pl.Int64),
|
|
34
|
+
ColName.LAST_SEEN: pl.col("seen_count") * pl.col("avg_seen").cast(pl.Float64),
|
|
35
|
+
ColName.NUM_TAKEN: pl.col("pick_count").cast(pl.Int64),
|
|
36
|
+
ColName.TAKEN_AT: pl.col("pick_count") * pl.col("avg_pick").cast(pl.Float64),
|
|
37
|
+
ColName.DECK: pl.col("game_count").cast(pl.Int64),
|
|
38
|
+
ColName.WON_DECK: pl.col("win_rate") * pl.col("game_count").cast(pl.Float64),
|
|
39
|
+
ColName.SIDEBOARD: (pl.col("pool_count") - pl.col("game_count")).cast(pl.Int64),
|
|
40
|
+
ColName.OPENING_HAND: pl.col("opening_hand_game_count").cast(pl.Int64),
|
|
41
41
|
ColName.WON_OPENING_HAND: pl.col("opening_hand_game_count")
|
|
42
|
-
* pl.col("opening_hand_win_rate"),
|
|
43
|
-
ColName.DRAWN: pl.col("drawn_game_count"),
|
|
44
|
-
ColName.WON_DRAWN: pl.col("drawn_win_rate") * pl.col("drawn_game_count"),
|
|
45
|
-
ColName.NUM_GIH: pl.col("ever_drawn_game_count"),
|
|
42
|
+
* pl.col("opening_hand_win_rate").cast(pl.Float64),
|
|
43
|
+
ColName.DRAWN: pl.col("drawn_game_count").cast(pl.Int64),
|
|
44
|
+
ColName.WON_DRAWN: pl.col("drawn_win_rate") * pl.col("drawn_game_count").cast(pl.Float64),
|
|
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
|
-
* pl.col("ever_drawn_win_rate"),
|
|
48
|
-
ColName.NUM_GNS: pl.col("never_drawn_game_count"),
|
|
47
|
+
* pl.col("ever_drawn_win_rate").cast(pl.Float64),
|
|
48
|
+
ColName.NUM_GNS: pl.col("never_drawn_game_count").cast(pl.Int64),
|
|
49
49
|
ColName.WON_NUM_GNS: pl.col("never_drawn_game_count")
|
|
50
|
-
* pl.col("never_drawn_win_rate"),
|
|
50
|
+
* pl.col("never_drawn_win_rate").cast(pl.Float64),
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
deck_color_col_defs = {
|
|
54
|
-
ColName.MAIN_COLORS: pl.col("short_name"),
|
|
55
|
-
ColName.NUM_GAMES: pl.col("games"),
|
|
56
|
-
ColName.NUM_WON: pl.col("wins"),
|
|
54
|
+
ColName.MAIN_COLORS: pl.col("short_name").cast(pl.String),
|
|
55
|
+
ColName.NUM_GAMES: pl.col("games").cast(pl.Int64),
|
|
56
|
+
ColName.NUM_WON: pl.col("wins").cast(pl.Int64),
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|
|
@@ -109,7 +109,7 @@ def deck_color_df(
|
|
|
109
109
|
pl.lit(format).alias(ColName.EVENT_TYPE),
|
|
110
110
|
(pl.lit("Top") if player_cohort == "top" else pl.lit(None)).alias(
|
|
111
111
|
ColName.PLAYER_COHORT
|
|
112
|
-
),
|
|
112
|
+
).cast(pl.String),
|
|
113
113
|
*[val.alias(key) for key, val in deck_color_col_defs.items()],
|
|
114
114
|
]
|
|
115
115
|
)
|
|
@@ -175,7 +175,7 @@ def base_ratings_df(
|
|
|
175
175
|
concat_list.append(pl.read_json(ratings_file_path).with_columns(
|
|
176
176
|
(pl.lit(deck_color) if deck_color != "any" else pl.lit(None)).alias(
|
|
177
177
|
ColName.MAIN_COLORS
|
|
178
|
-
)
|
|
178
|
+
).cast(pl.String)
|
|
179
179
|
))
|
|
180
180
|
df = pl.concat(concat_list)
|
|
181
181
|
|
|
@@ -185,7 +185,7 @@ def base_ratings_df(
|
|
|
185
185
|
pl.lit(format).alias(ColName.EVENT_TYPE),
|
|
186
186
|
(pl.lit("Top") if player_cohort == "top" else pl.lit(None)).alias(
|
|
187
187
|
ColName.PLAYER_COHORT
|
|
188
|
-
),
|
|
188
|
+
).cast(pl.String),
|
|
189
189
|
ColName.MAIN_COLORS,
|
|
190
190
|
*[val.alias(key) for key, val in ratings_col_defs.items()],
|
|
191
191
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|