Skip to content

Commit 2e4ba81

Browse files
update docs and tests
1 parent f81905d commit 2e4ba81

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

CHANGELOG

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
jtbl changelog
22

3+
20230228 v1.5.1
4+
- Preserve long float formatting
5+
36
20230114 v1.5.0
47
- Be more tolerant of loading JSON Lines with blank lines and whitespace
58

jtbl/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import tabulate
88
import shutil
99

10-
__version__ = '1.5.0'
10+
__version__ = '1.5.1'
1111
SUCCESS, ERROR = True, False
1212

1313

man/jtbl.1

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH jtbl 1 2022-04-04 1.3.1 "JTBL - JSON tables in the terminal"
1+
.TH jtbl 1 2023-02-28 1.5.1 "JTBL - JSON tables in the terminal"
22
.SH NAME
33
jtbl \- Print JSON and JSON Lines data as a table in the terminal
44
.SH SYNOPSIS
@@ -64,6 +64,6 @@ Kelly Brazil ([email protected])
6464
https://github.com/kellyjonbrazil/jtbl
6565

6666
.SH COPYRIGHT
67-
Copyright (c) 2020-2022 Kelly Brazil
67+
Copyright (c) 2020-2023 Kelly Brazil
6868

6969
License: MIT License

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name='jtbl',
8-
version='1.5.0',
8+
version='1.5.1',
99
author='Kelly Brazil',
1010
author_email='[email protected]',
1111
description='A simple cli tool to print JSON and JSON Lines data as a table in the terminal.',

tests/test_make_table.py

+5
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ def test_jc_dig_answer(self):
329329

330330
self.assertEqual(jtbl.cli.make_table(data=stdin, columns=80), (self.SUCCESS, expected))
331331

332+
def test_float_format(self):
333+
stdin = [{"a": 1000000, "b": 1000000.1}]
334+
expected = ' a b\n------- ---------\n1000000 1000000.1'
335+
336+
self.assertEqual(jtbl.cli.make_table(data=stdin, columns=80), (self.SUCCESS, expected))
332337

333338
def test_json_lines(self):
334339
"""test JSON Lines data"""

0 commit comments

Comments
 (0)