decksmith 0.1.8__py3-none-any.whl → 0.1.9__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.
decksmith/validate.py CHANGED
@@ -2,6 +2,7 @@
2
2
  Python module for validating a dictionar
3
3
  """
4
4
 
5
+ import pandas as pd
5
6
  from jval import validate
6
7
 
7
8
  ELEMENT_SPEC = {
@@ -121,5 +122,9 @@ def transform_card(card):
121
122
  """
122
123
  for element in card.get("elements", []):
123
124
  if element.get("type") == "text" and "text" in element:
124
- element["text"] = str(element["text"])
125
+ if pd.isna(element["text"]):
126
+ element["text"] = None
127
+ else:
128
+ element["text"] = str(element["text"])
129
+
125
130
  return card
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: decksmith
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: A command-line application to dynamically generate decks of cards from a JSON specification and a CSV data file, inspired by nandeck.
5
5
  License: GPL-2.0-only
6
6
  Author: Julio Cabria
@@ -6,8 +6,8 @@ decksmith/main.py,sha256=AzDq1aXziQmYz2IWdWSoBFskUeAXfOmcfYnIQUNIYp0,3357
6
6
  decksmith/templates/deck.csv,sha256=pNJebNxoDIfM8m0-aj05YrANHih1BTKOMry1kspIpPI,462
7
7
  decksmith/templates/deck.json,sha256=BTTnmaFP5AkbbC_B7uMF6R4bOM7JizW6EATcsjjJrT4,695
8
8
  decksmith/utils.py,sha256=XKSapVB1_zZvYcl3LgZcHAob4Pk5HUT9AnlAQBAdeTs,2833
9
- decksmith/validate.py,sha256=W7BzB2LEw6WojJX7DGPQiqEiMCz7r0TIi5NJU3Wym6s,3450
10
- decksmith-0.1.8.dist-info/entry_points.txt,sha256=-usRztjj2gnfmPubb8nFYHD22drzThAmSfM6geWI98Y,48
11
- decksmith-0.1.8.dist-info/METADATA,sha256=SIlCh-pJy-d2hZi-lNrLd-KaNeqeelYXp159FSC3MEM,2419
12
- decksmith-0.1.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
- decksmith-0.1.8.dist-info/RECORD,,
9
+ decksmith/validate.py,sha256=uqnNs8n6IeYfZcRrQKOaZzTMZM6gGP3MS_HPyWJ9vrQ,3578
10
+ decksmith-0.1.9.dist-info/entry_points.txt,sha256=-usRztjj2gnfmPubb8nFYHD22drzThAmSfM6geWI98Y,48
11
+ decksmith-0.1.9.dist-info/METADATA,sha256=Uq5NLeafcSXqufooG6g8GTcihnyPsci0VCB-kGWkbrs,2419
12
+ decksmith-0.1.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
+ decksmith-0.1.9.dist-info/RECORD,,