Skip to content

Commit 1b15fd9

Browse files
committed
Correct tabulate, ship fonts, further licensing tests
1 parent 031784b commit 1b15fd9

File tree

11 files changed

+2841
-15
lines changed

11 files changed

+2841
-15
lines changed

GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else
4141
endif
4242

4343
# To see all pytest output, uncomment --capture=no, ...
44-
PYTESTOPTS = --capture=no --log-cli-level=5 # INFO
44+
PYTESTOPTS = --capture=no --log-cli-level=WARNING
4545

4646
PY3TEST = $(PY3) -m pytest $(PYTESTOPTS)
4747

@@ -709,7 +709,7 @@ upload-check:
709709
|| ( echo -e "\n\n*** Missing Python modules; run:\n\n $(PY3) -m pip install --upgrade twine\n" \
710710
&& false )
711711
upload: upload-check wheel
712-
python3 -m twine upload --repository pypi dist/slip39-$(VERSION)*
712+
$(PY3) -m twine upload --repository pypi dist/slip39-$(VERSION)*
713713

714714
clean:
715715
@rm -rf MANIFEST *.png build dist auto *.egg-info $(shell find . -name '__pycache__' )

requirements-invoice.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ eth-account >=0.8.0,<0.9
22
py-solc-x >=1.1.1,<1.2
33
pycryptodome >=3.16, <4
44
requests >=2.20, <3
5+
56
# Update to 0.9.1 w/ type deduction w/ missing/empty support
67
#tabulate >=0.9.1,<1
7-
git+https://github.com/pjkundert/python-tabulate@feature-empties#egg=tabulate
8+
89
dkimpy[ed25519] >=1.0.5,<2
910

1011
# These versions are very brittle; must be upgraded in lock-step (see web3.py/setup.py)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
base58 >=2.0.1,<3
22
chacha20poly1305 >=0.0.3
33
click >=8.1.3,<9
4-
crypto-licensing >=3.3.0,<4
4+
crypto-licensing >=3.3.1,<4
55
cx_Freeze >=6.12 ; sys_platform == "win32"
66
fpdf2 >=2.5.7,<3
77
hdwallet >=2.2.1,<3

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,15 @@
163163

164164
package_dir = {
165165
"slip39": "./slip39",
166-
"slip39.layout": "./slip39/layout",
166+
"slip39.cli": "./slip39/cli",
167167
"slip39.invoice": "./slip39/invoice",
168+
"slip39.layout": "./slip39/layout",
169+
"slip39.layout.font": "./slip39/layout/font",
168170
"slip39.recovery": "./slip39/recovery",
169171
"slip39.generator": "./slip39/generator",
170172
"slip39.gui": "./slip39/gui",
171-
"slip39.cli": "./slip39/cli",
173+
# Until tabulate fixes empty cell type deduction, separators
174+
"slip39.tabulate": "./slip39/tabulate",
172175
}
173176

174177
package_data = {

slip39/communications.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
from crypto_licensing.licensing import doh
3131
from email import utils, message_from_file, message_from_string
3232
from email.mime import multipart, text
33-
from tabulate import tabulate
33+
34+
#from tabulate import tabulate
35+
from .tabulate import tabulate
3436

3537
from .util import is_listlike, commas, uniq, log_cfg, log_level
3638

slip39/invoice/artifact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from calendar import monthrange
2929

3030
import fpdf
31-
import tabulate
31+
from .. import tabulate
3232

3333
from crypto_licensing.misc import get_localzone, Duration
3434

@@ -51,7 +51,7 @@
5151
"""
5252
log = logging.getLogger( "artifact" )
5353

54-
# Custom tabula1te format that provides "====" SEPARATING_LINE between line-items and totals
54+
# Custom tabulate format that provides "====" SEPARATING_LINE between line-items and totals
5555
tabulate._table_formats["totalize"] = tabulate.TableFormat(
5656
lineabove = tabulate.Line("", "-", " ", ""),
5757
linebelowheader = tabulate.Line("", "-", " ", ""),

slip39/invoice/artifact_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
import pytest
1010

11-
import tabulate
11+
#import tabulate
12+
from .. import tabulate
1213

1314
from crypto_licensing.misc import parse_datetime
1415

slip39/invoice/multipayout.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
from itertools import count
2525

2626
from web3 import Web3 # noqa F401
27-
from tabulate import tabulate
27+
28+
#from tabulate import tabulate
29+
from ..tabulate import tabulate
2830

2931
from ..util import remainder_after, fraction_allocated, commas
3032
from .ethereum import Chain, Contract, contract_address # noqa F401

slip39/invoice/payments_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ def test_grants( tmp_path ):
128128
[
129129
( licensing.KeypairPlaintext( k ) if k else None, l )
130130
for k,l in licensing.authorized(
131-
author = author,
131+
author = author,
132132
basename = str( base_ss ),
133-
confirm = False,
133+
confirm = False,
134134
registering = False,
135135
acquiring = False,
136136
keypairs = [ keyp_cl_raw ],
@@ -180,8 +180,7 @@ def test_grants( tmp_path ):
180180
},
181181
null
182182
]
183-
]
184-
"""
183+
]"""
185184

186185
client = licensing.Agent(
187186
name = "Perry Kundert",

0 commit comments

Comments
 (0)