spells-mtg 0.11.11__tar.gz → 0.11.13__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.11 → spells_mtg-0.11.13}/PKG-INFO +1 -1
  2. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/pyproject.toml +1 -1
  3. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/card_data_files.py +2 -0
  4. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/draft_data.py +6 -4
  5. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/LICENSE +0 -0
  6. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/README.md +0 -0
  7. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/.ruff_cache/.gitignore +0 -0
  8. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/.ruff_cache/0.8.6/17785301476771359756 +0 -0
  9. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/.ruff_cache/CACHEDIR.TAG +0 -0
  10. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/__init__.py +0 -0
  11. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/cache.py +0 -0
  12. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/cards.py +0 -0
  13. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/columns.py +0 -0
  14. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/config.py +0 -0
  15. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/enums.py +0 -0
  16. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/extension.py +0 -0
  17. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/external.py +0 -0
  18. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/filter.py +0 -0
  19. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/log.py +0 -0
  20. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/manifest.py +0 -0
  21. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/schema.py +0 -0
  22. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/spells/utils.py +0 -0
  23. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/tests/__init__.py +0 -0
  24. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/tests/filter_test.py +0 -0
  25. {spells_mtg-0.11.11 → spells_mtg-0.11.13}/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.11
3
+ Version: 0.11.13
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.11"
14
+ version = "0.11.13"
15
15
 
16
16
  [project.license]
17
17
  text = "MIT"
@@ -19,10 +19,12 @@ DECK_COLOR_DATA_TEMPLATE = (
19
19
  )
20
20
 
21
21
  START_DATE_MAP = {
22
+ "PIO": dt.date(2024, 12, 10),
22
23
  "DFT": dt.date(2025, 2, 11),
23
24
  "TDM": dt.date(2025, 4, 8),
24
25
  "FIN": dt.date(2025, 6, 10),
25
26
  "EOE": dt.date(2025, 7, 29),
27
+ "OM1": dt.date(2025, 9, 23),
26
28
  }
27
29
 
28
30
  ratings_col_defs = {
@@ -347,7 +347,10 @@ def _view_select(
347
347
  cdefs = [col_def_map[c] for c in sorted(view_cols)]
348
348
  select = []
349
349
  for cdef in cdefs:
350
- if is_agg_view:
350
+ if isinstance(df, pl.DataFrame) and cdef.name in df.columns:
351
+ base_cols = base_cols.union(frozenset({cdef.name}))
352
+ select.append(cdef.name)
353
+ elif is_agg_view:
351
354
  if cdef.col_type == ColType.AGG:
352
355
  base_cols = base_cols.union(cdef.dependencies)
353
356
  select.append(cdef.expr)
@@ -471,7 +474,7 @@ def _base_agg_df(
471
474
 
472
475
  if group_by:
473
476
  joined_df = functools.reduce(
474
- lambda prev, curr: prev.join(curr, on=group_by, how="outer", coalesce=True),
477
+ lambda prev, curr: prev.join(curr, on=group_by, how="full", coalesce=True),
475
478
  join_dfs,
476
479
  )
477
480
  else:
@@ -565,11 +568,10 @@ def summon(
565
568
  select_df = _view_select(
566
569
  card_df, card_cols, m.col_def_map, is_agg_view=False
567
570
  )
568
- agg_df = agg_df.join(select_df, on="name", how="outer", coalesce=True)
571
+ agg_df = agg_df.join(select_df, on="name", how="full", coalesce=True)
569
572
  else:
570
573
  assert len(codes) == 1, "Only one set supported for loading from card data file"
571
574
  assert codes[0] == cdfs.set_code, "Wrong set file specified"
572
- assert cdfs.format == "PremierDraft", "Only PremierDraft supported"
573
575
  agg_df = base_ratings_df(
574
576
  set_code=cdfs.set_code,
575
577
  format=cdfs.format,
File without changes
File without changes
File without changes