spells-mtg 0.0.3__py3-none-any.whl → 0.1.0__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/cache.py CHANGED
@@ -30,9 +30,7 @@ def data_home() -> str:
30
30
  "SPELLS_DATA_HOME",
31
31
  os.environ.get(
32
32
  "XDG_DATA_HOME",
33
- r"C:\Users\$USERNAME\AppData\Local\Spells"
34
- if is_win
35
- else "~/.local/share/spells/",
33
+ r"~\AppData\Local\Spells" if is_win else "~/.local/share/spells/",
36
34
  ),
37
35
  )
38
36
  )
spells/cards.py CHANGED
@@ -88,7 +88,9 @@ def card_df(draft_set_code: str, names: list[str]) -> pl.DataFrame:
88
88
  return pl.DataFrame(
89
89
  [
90
90
  {
91
- field: _extract_value(draft_set_code, name, card_data_map.get(name, {}), field)
91
+ field: _extract_value(
92
+ draft_set_code, name, card_data_map.get(name, {}), field
93
+ )
92
94
  for field in CardAttr
93
95
  }
94
96
  for name in names
spells/external.py CHANGED
@@ -264,7 +264,9 @@ def download_data_set(
264
264
  )
265
265
  print()
266
266
 
267
- cache.spells_print(mode, "Unzipping and transforming to parquet (this might take a few minutes)...")
267
+ cache.spells_print(
268
+ mode, "Unzipping and transforming to parquet (this might take a few minutes)..."
269
+ )
268
270
  _process_zipped_file(dataset_path, target_path)
269
271
  cache.spells_print(mode, f"File {target_path} written")
270
272
  if clear_set_cache:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spells-mtg
3
- Version: 0.0.3
3
+ Version: 0.1.0
4
4
  Summary: analaysis of 17Lands.com public datasets
5
5
  Author-Email: Joel Barnes <oelarnes@gmail.com>
6
6
  License: MIT
@@ -69,7 +69,7 @@ Spells is not affiliated with 17Lands. Please review the Usage Guidelines for 17
69
69
  ## spells
70
70
 
71
71
  - Uses [Polars](https://docs.pola.rs/) for high-performance, multi-threaded aggregations of large datasets
72
- - Uses Polars to power an expressive query language for specifying custom extensions and optimizing complex queries
72
+ - Uses Polars to power an expressive query language for specifying custom extensions
73
73
  - Converts csv datasets to parquet for 10x faster calculations and 20x smaller file sizes
74
74
  - Supports calculating the standard aggregations and measures out of the box with no arguments (ALSA, GIH WR, etc)
75
75
  - Caches aggregate DataFrames in the local file system automatically for instantaneous reproduction of previous analysis
@@ -78,10 +78,11 @@ Spells is not affiliated with 17Lands. Please review the Usage Guidelines for 17
78
78
  - Supports "Deck Color Data" aggregations with built-in column definitions.
79
79
  - Provides a CLI tool `spells [add|refresh|clean|remove|info] [SET]` to download and manage external files
80
80
  - Downloads and manages public datasets from 17Lands
81
- - Downloads and models booster configuration and card data from [MTGJSON](https://mtgjson.com/)
81
+ - Retrieves and models booster configuration and card data from [MTGJSON](https://mtgjson.com/)
82
82
  - Is fully typed, linted, and statically analyzed for support of advanced IDE features
83
83
  - Provides optional enums for all base columns and built-in extensions, as well as for custom extension parameters
84
84
  - Uses Polars expressions to support second-stage aggregations and beyond like game-weighted z-scores with one call to summon
85
+ - Tested on MacOS, Linux, and Windows
85
86
 
86
87
  ## summon
87
88
 
@@ -208,7 +209,7 @@ Spells provides several features out of the box to optimize performance to the d
208
209
 
209
210
  ### Parquet Transformation
210
211
 
211
- The most significant optimization used by Spells is the simplest: the csv files are scanned and streamed to Parquet files by Polars. This allows 10x faster compute times with 20x less storage space and lower memory usage compared to csv. Yes, the files are twenty times smaller and ten times faster!
212
+ The most significant optimization used by Spells is the simplest: the csv files are scanned and streamed to Parquet files by Polars. This allows 10x faster compute times with 20x less storage space and lower memory usage compared to csv. Yes, it's twenty times smaller and ten times faster!
212
213
 
213
214
  ### Query Optimization
214
215
 
@@ -249,7 +250,7 @@ So that's it, that's what Spells does from a high level. `summon` will hand off
249
250
 
250
251
  Spells includes a command-line interface `spells` to manage your external data files and local cache. Spells will download files to an appropriate file location on your system,
251
252
  typically `~/.local/share/spells` on Unix-like platforms and `C:\Users\{Username}\AppData\Local\Spells` on Windows.
252
- To use `spells`, make sure Spells in installed in your environment using pip or a package manager, and type `spells help` into your shell, or dive in with `spells add DSK` or your favorite set.
253
+ To use `spells`, make sure Spells in installed in your environment using pip or a package manager, and type `spells help` into your shell, or dive in with `spells add DSK` or your favorite set. If Spells is installed globally using pipx, any local version of Spells will be able to read the managed files.
253
254
 
254
255
  ## API
255
256
 
@@ -268,7 +269,7 @@ summon(
268
269
 
269
270
  #### parameters
270
271
 
271
- - columns: a list of string or `ColName` values to select as non-grouped columns. Valid `ColTypes` are `PICK_SUM`, `NAME_SUM`, `GAME_SUM`, `CARD_ATTR`, `AGG`. Min/Max/Unique
272
+ - columns: a list of string or `ColName` values to select as non-grouped columns. Valid `ColTypes` are `PICK_SUM`, `NAME_SUM`, `GAME_SUM`, `CARD_ATTR`, and `AGG`. Min/Max/Unique
272
273
  aggregations of non-numeric (or numeric) data types are not supported. If `None`, use a set of columns modeled on the commonly used values on 17Lands.com/card_data.
273
274
 
274
275
  - group_by: a list of string or `ColName` values to display as grouped columns. Valid `ColTypes` are `GROUP_BY` and `CARD_ATTR`. By default, group by "name" (card name).
@@ -452,6 +453,7 @@ A table of all included columns. Columns can be referenced by enum or by string
452
453
  # Roadmap to 1.0
453
454
 
454
455
  - [ ] Support Traditional and Premier datasets (currently only Premier is supported)
456
+ - [ ] Group by all
455
457
  - [ ] Enable configuration using $XDG_CONFIG_HOME/cfg.toml
456
458
  - [ ] Support min and max aggregations over base views
457
459
  - [ ] Enhanced profiling
@@ -1,15 +1,15 @@
1
1
  spells/__init__.py,sha256=EcI7ijXYvPA8jj7wUZqs6CSWr__MD8AOXhkex-Hj37E,131
2
- spells/cache.py,sha256=9ij8nIoYlyGY0W-WcYHmWA9AT1jCYmRcXw23RDS7xSE,3005
3
- spells/cards.py,sha256=2JLwCY7b2vrLeuzBCctqp-dcQbctgXkuiWebv_rVQ5w,3153
2
+ spells/cache.py,sha256=4v7h8D3TtaT0R_EdiRNhdcQrXzdH_CukezO6oAXvNEY,2956
3
+ spells/cards.py,sha256=CP8f3rUBuFQlj6xj2W72-mDQPuzozEcMu3PkRtBeX1Q,3191
4
4
  spells/columns.py,sha256=BEYKDpZYkRgV1kBqIq6XC6kXvVjOih7jGthIpy-YVSw,23339
5
5
  spells/draft_data.py,sha256=xoGn6QGaAKgIInEzi2pnvk4CH5xNrwYq4mAj3r07GfA,9272
6
6
  spells/enums.py,sha256=Idpv17rCAHDF5bENU8I8V0rpL9W5KB2GM6lhrN4GunU,4447
7
- spells/external.py,sha256=Yke-ZcoJ425pBdx8xmiqJ3RVNoexIjBWepCjp7e5tjQ,10246
7
+ spells/external.py,sha256=Apv_l32swO9bF8ihWV73cd7zpzHgxqFy8ZZa1n3XUUE,10260
8
8
  spells/filter.py,sha256=J-YTOOAzOQpvIX29tviYL04RVoOUlfsbjBXoQBDCEdQ,3380
9
9
  spells/manifest.py,sha256=XEJwwYJzOEWrQQwka39F9SgZo38hH_Kj4MPY7GOuLvY,6903
10
10
  spells/schema.py,sha256=z8Qn2SiHG4T6YfPsz8xHLGMjU_Ofm76-Vrquh3b9B64,6422
11
- spells_mtg-0.0.3.dist-info/METADATA,sha256=s8poWzjlhctbD9wDXPZ7K2lDYDcTjNgoBuEoLnTAegI,40918
12
- spells_mtg-0.0.3.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
13
- spells_mtg-0.0.3.dist-info/entry_points.txt,sha256=a9Y1omdl9MdnKuIj3aOodgrp-zZII6OCdvqwgP6BFvI,63
14
- spells_mtg-0.0.3.dist-info/licenses/LICENSE,sha256=tS54XYbJSgmq5zuHhbsQGbNQLJPVgXqhF5nu2CSRMig,1068
15
- spells_mtg-0.0.3.dist-info/RECORD,,
11
+ spells_mtg-0.1.0.dist-info/METADATA,sha256=Q9FSV4QSWKXLtZCav1YCPTlgDGUXDNRzBO-BQQFIkFM,41050
12
+ spells_mtg-0.1.0.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
13
+ spells_mtg-0.1.0.dist-info/entry_points.txt,sha256=a9Y1omdl9MdnKuIj3aOodgrp-zZII6OCdvqwgP6BFvI,63
14
+ spells_mtg-0.1.0.dist-info/licenses/LICENSE,sha256=tS54XYbJSgmq5zuHhbsQGbNQLJPVgXqhF5nu2CSRMig,1068
15
+ spells_mtg-0.1.0.dist-info/RECORD,,