Skip to content

Commit cfd4212

Browse files
committed
Polish 0.0.38: PII masking for unmapped data, pager consolidation, changelog
- sz_explorer: mask UNMAPPED_DATA values at SDK response level - sz_explorer: consolidate scroll() into view_report(force_scroll=True) - sz_explorer: add left/right arrows and h help to less pager prompt - CHANGELOG: extend 0.0.38 with this session's work, bump date to 2026-04-16
1 parent b8e356b commit cfd4212

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,26 @@ This project adheres to [Semantic Versioning].
77

88
## [Unreleased]
99

10-
## [0.0.38] - 2026-04-07
10+
## [0.0.38] - 2026-04-16
1111

1212
### Added in 0.0.38
1313

1414
- `sz_explorer`: `--mask_pii` (`-M`) CLI flag for PII data masking (#363)
1515
- `sz_explorer`: Scoring behavior downgrade/upgrade indicator on why/how displays (#364)
16+
- `sz_explorer`: (L)ist view for drill-into reports with save to CSV/HTML/JSON (#367)
17+
- `sz_explorer`: mouse wheel scrolling and `VIBRANT` color scheme
18+
- `sz_explorer`: PII masking extended to unmapped data
19+
- `sz_snapshot`: duplicate record detection via `OBS_ENT_ID`
1620

1721
### Fixed in 0.0.38
1822

1923
- `sz_explorer`: `previous` command going to beginning instead of previous entity (#340)
2024
- `sz_explorer`: `next`/`previous` crash when no prior `get` command issued (#340)
2125
- `sz_explorer`: `next`/`previous` error when direct database access is not available (#340)
2226
- `sz_explorer`: `how` columnar view sometimes showing features reversed (#341)
27+
- `sz_explorer`: match_key summarization corrupting drill-in counts
28+
- `sz_snapshot`: inflated TOTALS MATCH entity count
29+
- `sz_audit`: false "multiple" match_key categorization
2330

2431
## [0.0.37] - 2026-04-02
2532

sz_tools/sz_explorer

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,15 @@ def mask_pii(text, visible=2):
103103

104104

105105
def mask_json_pii(data, visible=2):
106-
"""Recursively walk a dict/list and mask string values under PII_KEYS."""
106+
"""Recursively walk a dict/list and mask string values under PII_KEYS and UNMAPPED_DATA."""
107107
if isinstance(data, dict):
108108
for key, value in data.items():
109109
if key in PII_KEYS and isinstance(value, str):
110110
data[key] = mask_pii(value, visible)
111+
elif key == "UNMAPPED_DATA" and isinstance(value, dict):
112+
for ukey, uval in value.items():
113+
if isinstance(uval, str):
114+
value[ukey] = mask_pii(uval, visible)
111115
elif isinstance(value, (dict, list)):
112116
mask_json_pii(value, visible)
113117
elif isinstance(data, list):
@@ -232,9 +236,9 @@ def view_report(report, **kwargs):
232236
less_cmd.append(f"--lesskey-src={lesskey_path}")
233237
except Exception:
234238
pass
235-
prompt = "\u2191\u2193 scroll, /search, s save, q quit %lt-%lb of %L"
239+
prompt = "\u2191\u2193\u2190\u2192 scroll, /search, s save, h help, q quit %lt-%lb of %L"
236240
else:
237-
prompt = "\u2191\u2193 scroll, /search, q quit %lt-%lb of %L"
241+
prompt = "\u2191\u2193\u2190\u2192 scroll, /search, h help, q quit %lt-%lb of %L"
238242
less_options += f"P{prompt}"
239243
less_cmd.append(less_options)
240244

@@ -248,19 +252,6 @@ def view_report(report, **kwargs):
248252
return less.returncode
249253

250254

251-
def scroll(report, **kwargs):
252-
print()
253-
less_options = "-MXSR"
254-
less = subprocess.Popen(["less", less_options], stdin=subprocess.PIPE)
255-
try:
256-
less.stdin.write(report.encode())
257-
except IOError:
258-
pass
259-
less.stdin.close()
260-
less.wait()
261-
print()
262-
263-
264255
class eda_node(object):
265256

266257
def __init__(self, node_id):
@@ -1503,7 +1494,7 @@ class EdaReports:
15031494
remove_from_history()
15041495
self.save_to_file(tbl, file_name)
15051496
elif reply.upper() == "S":
1506-
scroll(report)
1497+
view_report(report, force_scroll=True)
15071498
elif reply.upper().startswith("P"):
15081499
if current_index == 0:
15091500
get_char_with_prompt("\nNo prior records, press any key to continue...")

0 commit comments

Comments
 (0)