dataframe-textual 3.1.3__tar.gz → 3.2.0__tar.gz
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.
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/PKG-INFO +1 -1
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/pyproject.toml +1 -1
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/data_frame_table.py +26 -23
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/uv.lock +1 -1
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/.gitignore +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/LICENSE +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/README.md +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/main.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/__init__.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/__main__.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/commands.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/common.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/console_panel.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/data_frame_viewer.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/file_picker_screen.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/help_panel.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/keybindings.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/loading_screen.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/run_command_screen.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/status_bar.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/table_screen.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/text_screen.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/theme_screen.py +0 -0
- {dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/yes_no_screen.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dataframe-textual
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: Interactive terminal viewer/editor (TUI) for CSV/TSV, Excel, Parquet, JSONL, etc.
|
|
5
5
|
Project-URL: Homepage, https://github.com/need47/dataframe-textual
|
|
6
6
|
Project-URL: Repository, https://github.com/need47/dataframe-textual.git
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dataframe-textual"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.2.0"
|
|
8
8
|
description = "Interactive terminal viewer/editor (TUI) for CSV/TSV, Excel, Parquet, JSONL, etc."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
{dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/data_frame_table.py
RENAMED
|
@@ -353,9 +353,13 @@ class DataFrameTable(DataTable):
|
|
|
353
353
|
fully_loaded = False
|
|
354
354
|
break
|
|
355
355
|
else:
|
|
356
|
-
self.
|
|
356
|
+
self.app.call_from_thread(
|
|
357
|
+
self.notify, f"{total_loaded:{THOUSAND_SEPARATOR}} loaded so far", title="Load DataFrame"
|
|
358
|
+
)
|
|
357
359
|
else:
|
|
358
|
-
self.
|
|
360
|
+
self.app.call_from_thread(
|
|
361
|
+
self.notify, f"{total_loaded:{THOUSAND_SEPARATOR}} loaded so far", title="Load DataFrame"
|
|
362
|
+
)
|
|
359
363
|
except pl.exceptions.ComputeError as e:
|
|
360
364
|
self.log(f"Error loading remaining batch: {e}")
|
|
361
365
|
return self.app.exit(return_code=1, result=str(e))
|
|
@@ -365,15 +369,19 @@ class DataFrameTable(DataTable):
|
|
|
365
369
|
self.df = self.dataframe
|
|
366
370
|
|
|
367
371
|
if self.loaded_rows < self.BATCH_SIZE:
|
|
368
|
-
|
|
372
|
+
# Row insertion mutates the DataTable widget; run it on the app thread.
|
|
373
|
+
self.app.call_from_thread(self.load_rows_range, self.loaded_rows, self.BATCH_SIZE)
|
|
369
374
|
|
|
370
375
|
# fully loaded the dataframe
|
|
371
376
|
self.df_done = True
|
|
372
377
|
|
|
373
|
-
self.
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
378
|
+
self.app.call_from_thread(
|
|
379
|
+
partial(
|
|
380
|
+
self.notify,
|
|
381
|
+
"Data fully loaded" if fully_loaded else "Data loading stopped by user",
|
|
382
|
+
title="Load DataFrame",
|
|
383
|
+
severity="information" if fully_loaded else "warning",
|
|
384
|
+
)
|
|
377
385
|
)
|
|
378
386
|
|
|
379
387
|
def with_full_df(func: Callable) -> Callable:
|
|
@@ -2410,7 +2418,7 @@ class DataFrameTable(DataTable):
|
|
|
2410
2418
|
# Otherwise, expand to widest cell
|
|
2411
2419
|
try:
|
|
2412
2420
|
new_width = label_width
|
|
2413
|
-
|
|
2421
|
+
max_cell_value = ""
|
|
2414
2422
|
|
|
2415
2423
|
for row_start, row_end in self.loaded_ranges:
|
|
2416
2424
|
for ridx in range(row_start, row_end):
|
|
@@ -2425,12 +2433,13 @@ class DataFrameTable(DataTable):
|
|
|
2425
2433
|
else:
|
|
2426
2434
|
cell_value = str(cell)
|
|
2427
2435
|
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
need_expand = True
|
|
2431
|
-
new_width = cell_width
|
|
2436
|
+
if len(cell_value) > len(max_cell_value):
|
|
2437
|
+
max_cell_value = cell_value
|
|
2432
2438
|
|
|
2433
|
-
|
|
2439
|
+
max_cell_width = measure(self.app.console, max_cell_value, 1)
|
|
2440
|
+
if max_cell_width > new_width:
|
|
2441
|
+
new_width = max_cell_width
|
|
2442
|
+
else:
|
|
2434
2443
|
return None
|
|
2435
2444
|
|
|
2436
2445
|
self.column_widths[col_name] = -1 # Mark as expanded
|
|
@@ -2442,17 +2451,15 @@ class DataFrameTable(DataTable):
|
|
|
2442
2451
|
return None
|
|
2443
2452
|
|
|
2444
2453
|
def cmd_expand_column(self, expand_all: bool = False) -> None:
|
|
2445
|
-
"""Expand/unexpand
|
|
2454
|
+
"""Expand/unexpand visible columns.
|
|
2446
2455
|
|
|
2447
2456
|
Args:
|
|
2448
|
-
expand_all: If True, expand or unexpand all
|
|
2457
|
+
expand_all: If True, expand or unexpand all visible columns.
|
|
2449
2458
|
Otherwise: expand or unexpand the current column only.
|
|
2450
2459
|
"""
|
|
2451
2460
|
if expand_all:
|
|
2452
|
-
# Collect all
|
|
2453
|
-
target_cols = [
|
|
2454
|
-
col for col, dtype in self.visible_columns.items() if DtypeConfig(dtype).gtype in ("string", "list")
|
|
2455
|
-
]
|
|
2461
|
+
# Collect all visiblecolumn names
|
|
2462
|
+
target_cols = [col for col in self.visible_columns]
|
|
2456
2463
|
|
|
2457
2464
|
if not target_cols:
|
|
2458
2465
|
return
|
|
@@ -2474,10 +2481,6 @@ class DataFrameTable(DataTable):
|
|
|
2474
2481
|
title="Expand Columns",
|
|
2475
2482
|
)
|
|
2476
2483
|
else:
|
|
2477
|
-
dtype = self.cursor_col_dtype
|
|
2478
|
-
if dtype != pl.String and dtype != pl.List:
|
|
2479
|
-
return
|
|
2480
|
-
|
|
2481
2484
|
col_name = self.cursor_col_key.value
|
|
2482
2485
|
|
|
2483
2486
|
if not (result := self._expand_single_column(col_name)):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/data_frame_viewer.py
RENAMED
|
File without changes
|
{dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/file_picker_screen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataframe_textual-3.1.3 → dataframe_textual-3.2.0}/src/dataframe_textual/run_command_screen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|