spells-mtg 0.2.2__py3-none-any.whl → 0.2.3__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/columns.py +1 -1
- spells/draft_data.py +10 -9
- spells/manifest.py +1 -3
- {spells_mtg-0.2.2.dist-info → spells_mtg-0.2.3.dist-info}/METADATA +1 -1
- {spells_mtg-0.2.2.dist-info → spells_mtg-0.2.3.dist-info}/RECORD +8 -8
- {spells_mtg-0.2.2.dist-info → spells_mtg-0.2.3.dist-info}/WHEEL +0 -0
- {spells_mtg-0.2.2.dist-info → spells_mtg-0.2.3.dist-info}/entry_points.txt +0 -0
- {spells_mtg-0.2.2.dist-info → spells_mtg-0.2.3.dist-info}/licenses/LICENSE +0 -0
spells/columns.py
CHANGED
spells/draft_data.py
CHANGED
|
@@ -53,22 +53,23 @@ def _get_names(set_code: str) -> tuple[str, ...]:
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
def _hydrate_col_defs(set_code: str, col_spec_map: dict[str, ColumnSpec]):
|
|
56
|
-
def get_views(spec: ColumnSpec) ->
|
|
56
|
+
def get_views(spec: ColumnSpec) -> set[View]:
|
|
57
57
|
if spec.name == ColName.NAME or spec.col_type == ColType.AGG:
|
|
58
|
-
return
|
|
58
|
+
return set()
|
|
59
59
|
if spec.col_type == ColType.CARD_ATTR:
|
|
60
|
-
return
|
|
60
|
+
return {View.CARD}
|
|
61
61
|
if spec.views is not None:
|
|
62
|
-
return spec.views
|
|
62
|
+
return set(spec.views)
|
|
63
63
|
assert (
|
|
64
64
|
spec.dependencies is not None
|
|
65
65
|
), f"Col {spec.name} should have dependencies"
|
|
66
66
|
|
|
67
|
-
views =
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
views = functools.reduce(
|
|
68
|
+
lambda prev, curr: prev.intersection(curr),
|
|
69
|
+
[get_views(col_spec_map[dep]) for dep in spec.dependencies],
|
|
70
|
+
)
|
|
70
71
|
|
|
71
|
-
return
|
|
72
|
+
return views
|
|
72
73
|
|
|
73
74
|
names = _get_names(set_code)
|
|
74
75
|
assert len(names) > 0, "there should be names"
|
|
@@ -118,7 +119,7 @@ def _hydrate_col_defs(set_code: str, col_spec_map: dict[str, ColumnSpec]):
|
|
|
118
119
|
cdef = ColumnDefinition(
|
|
119
120
|
name=spec.name,
|
|
120
121
|
col_type=spec.col_type,
|
|
121
|
-
views=
|
|
122
|
+
views=views,
|
|
122
123
|
expr=expr,
|
|
123
124
|
dependencies=dependencies,
|
|
124
125
|
signature=signature,
|
spells/manifest.py
CHANGED
|
@@ -99,8 +99,6 @@ def _resolve_view_cols(
|
|
|
99
99
|
For each view ('game', 'draft', and 'card'), return the columns
|
|
100
100
|
that must be present at the aggregation step. 'name' need not be
|
|
101
101
|
included, and 'pick' will be added if needed.
|
|
102
|
-
|
|
103
|
-
Dependencies within base views will be resolved by `col_df`.
|
|
104
102
|
"""
|
|
105
103
|
unresolved_cols = col_set
|
|
106
104
|
view_resolution = {}
|
|
@@ -169,7 +167,7 @@ def create(
|
|
|
169
167
|
needed_views = frozenset()
|
|
170
168
|
for view, cols_for_view in view_cols.items():
|
|
171
169
|
for col in cols_for_view:
|
|
172
|
-
if col_def_map[col].views ==
|
|
170
|
+
if col_def_map[col].views == {view}: # only found in this view
|
|
173
171
|
needed_views = needed_views.union({view})
|
|
174
172
|
|
|
175
173
|
view_cols = {v: view_cols[v] for v in needed_views}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
spells/__init__.py,sha256=QCPWQySUK2SZtCU-mSZLsn7vrNLJMDsRwil8gmAzmdk,151
|
|
2
2
|
spells/cache.py,sha256=4v7h8D3TtaT0R_EdiRNhdcQrXzdH_CukezO6oAXvNEY,2956
|
|
3
3
|
spells/cards.py,sha256=6seKpgI4TlJxI20bvcgt5VpxzsbCnnjWneDWpneJJ6Y,3497
|
|
4
|
-
spells/columns.py,sha256=
|
|
5
|
-
spells/draft_data.py,sha256=
|
|
4
|
+
spells/columns.py,sha256=uPL9BqCGlxAfP75Ggo4-Ryqml9KG_62WFPyJ2ztNDMM,22045
|
|
5
|
+
spells/draft_data.py,sha256=pHVMvMy4aVPRnpt3IasxH7CKRHH7UE-GldmAa_b4XWw,10547
|
|
6
6
|
spells/enums.py,sha256=BQIZvCSAopiscnKY-Qm_j2BgmPy9R5oj1yeIrjMQM1o,4507
|
|
7
7
|
spells/external.py,sha256=qe6wOBDhPN4CZNQvYRq6G-OpIZcWTZzJjySgnf2Gu1o,10258
|
|
8
8
|
spells/filter.py,sha256=J-YTOOAzOQpvIX29tviYL04RVoOUlfsbjBXoQBDCEdQ,3380
|
|
9
|
-
spells/manifest.py,sha256=
|
|
9
|
+
spells/manifest.py,sha256=qj4XdYqQOlc6oPKMIWezrRLNwLI9OD5zRDYnMUgl624,6836
|
|
10
10
|
spells/schema.py,sha256=z8Qn2SiHG4T6YfPsz8xHLGMjU_Ofm76-Vrquh3b9B64,6422
|
|
11
|
-
spells_mtg-0.2.
|
|
12
|
-
spells_mtg-0.2.
|
|
13
|
-
spells_mtg-0.2.
|
|
14
|
-
spells_mtg-0.2.
|
|
15
|
-
spells_mtg-0.2.
|
|
11
|
+
spells_mtg-0.2.3.dist-info/METADATA,sha256=fU18GU_AKHmWHXIq_OkxR6hTdr0heLTMn58XnKkbFNg,41597
|
|
12
|
+
spells_mtg-0.2.3.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
|
13
|
+
spells_mtg-0.2.3.dist-info/entry_points.txt,sha256=a9Y1omdl9MdnKuIj3aOodgrp-zZII6OCdvqwgP6BFvI,63
|
|
14
|
+
spells_mtg-0.2.3.dist-info/licenses/LICENSE,sha256=tS54XYbJSgmq5zuHhbsQGbNQLJPVgXqhF5nu2CSRMig,1068
|
|
15
|
+
spells_mtg-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|