spells-mtg 0.11.15__tar.gz → 0.11.17__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.15 → spells_mtg-0.11.17}/PKG-INFO +1 -1
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/pyproject.toml +1 -1
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/card_data_files.py +26 -2
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/LICENSE +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/README.md +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/.ruff_cache/.gitignore +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/.ruff_cache/0.8.6/17785301476771359756 +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/.ruff_cache/CACHEDIR.TAG +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/__init__.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/cache.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/cards.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/columns.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/config.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/draft_data.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/enums.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/extension.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/external.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/filter.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/log.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/manifest.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/schema.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/spells/utils.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/tests/__init__.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/tests/filter_test.py +0 -0
- {spells_mtg-0.11.15 → spells_mtg-0.11.17}/tests/utils_test.py +0 -0
|
@@ -25,6 +25,7 @@ START_DATE_MAP = {
|
|
|
25
25
|
"FIN": dt.date(2025, 6, 10),
|
|
26
26
|
"EOE": dt.date(2025, 7, 29),
|
|
27
27
|
"OM1": dt.date(2025, 9, 23),
|
|
28
|
+
"Cube+-+Powered": dt.date(2025, 10, 28),
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
ratings_col_defs = {
|
|
@@ -176,7 +177,7 @@ def base_ratings_df(
|
|
|
176
177
|
)
|
|
177
178
|
|
|
178
179
|
concat_list.append(
|
|
179
|
-
pl.read_json(ratings_file_path, infer_schema_length=
|
|
180
|
+
pl.read_json(ratings_file_path, infer_schema_length=540)
|
|
180
181
|
.with_columns(
|
|
181
182
|
(pl.lit(deck_color) if deck_color != "any" else pl.lit(None))
|
|
182
183
|
.alias(ColName.MAIN_COLORS)
|
|
@@ -195,4 +196,27 @@ def base_ratings_df(
|
|
|
195
196
|
)
|
|
196
197
|
)
|
|
197
198
|
|
|
198
|
-
|
|
199
|
+
raw_df = pl.concat(concat_list)
|
|
200
|
+
|
|
201
|
+
group_cols = [
|
|
202
|
+
ColName.NAME,
|
|
203
|
+
ColName.EXPANSION,
|
|
204
|
+
ColName.MAIN_COLORS,
|
|
205
|
+
]
|
|
206
|
+
|
|
207
|
+
attr_cols = [
|
|
208
|
+
ColName.EVENT_TYPE,
|
|
209
|
+
ColName.PLAYER_COHORT,
|
|
210
|
+
ColName.COLOR,
|
|
211
|
+
ColName.RARITY,
|
|
212
|
+
ColName.IMAGE_URL,
|
|
213
|
+
]
|
|
214
|
+
|
|
215
|
+
sum_cols = list(set(ratings_col_defs) - set(group_cols + attr_cols))
|
|
216
|
+
|
|
217
|
+
attr_df = raw_df.select(group_cols + attr_cols).group_by(group_cols).first()
|
|
218
|
+
sum_df = raw_df.select(group_cols + sum_cols).group_by(group_cols).sum()
|
|
219
|
+
|
|
220
|
+
df = attr_df.join(sum_df, on=group_cols, join_nulls=True)
|
|
221
|
+
|
|
222
|
+
return df
|
|
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
|