spells-mtg 0.11.2__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.

Files changed (25) hide show
  1. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/PKG-INFO +1 -1
  2. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/pyproject.toml +1 -1
  3. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/card_data_files.py +26 -26
  4. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/draft_data.py +1 -1
  5. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/LICENSE +0 -0
  6. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/README.md +0 -0
  7. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/.ruff_cache/.gitignore +0 -0
  8. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/.ruff_cache/0.8.6/17785301476771359756 +0 -0
  9. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/.ruff_cache/CACHEDIR.TAG +0 -0
  10. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/__init__.py +0 -0
  11. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/cache.py +0 -0
  12. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/cards.py +0 -0
  13. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/columns.py +0 -0
  14. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/config.py +0 -0
  15. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/enums.py +0 -0
  16. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/extension.py +0 -0
  17. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/external.py +0 -0
  18. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/filter.py +0 -0
  19. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/log.py +0 -0
  20. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/manifest.py +0 -0
  21. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/schema.py +0 -0
  22. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/spells/utils.py +0 -0
  23. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/tests/__init__.py +0 -0
  24. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/tests/filter_test.py +0 -0
  25. {spells_mtg-0.11.2 → spells_mtg-0.11.4}/tests/utils_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spells-mtg
3
- Version: 0.11.2
3
+ Version: 0.11.4
4
4
  Summary: analaysis of 17Lands.com public datasets
5
5
  Author-Email: Joel Barnes <oelarnes@gmail.com>
6
6
  License: MIT
@@ -11,7 +11,7 @@ dependencies = [
11
11
  ]
12
12
  requires-python = ">=3.11"
13
13
  readme = "README.md"
14
- version = "0.11.2"
14
+ version = "0.11.4"
15
15
 
16
16
  [project.license]
17
17
  text = "MIT"
@@ -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
  ]
@@ -34,7 +34,7 @@ class CardDataFileSpec():
34
34
  set_code: str
35
35
  format: str = "PremierDraft"
36
36
  player_cohort: str = "all"
37
- deck_colors: str = "any"
37
+ deck_colors: str | list[str] = "any"
38
38
  start_date: datetime.date | None = None
39
39
  end_date: datetime.date | None = None
40
40
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes