Skip to content

Add object hook method to JsonfileReader#226

Open
JSCU-CNI wants to merge 2 commits into
fox-it:mainfrom
JSCU-CNI:jsonfile-hook
Open

Add object hook method to JsonfileReader#226
JSCU-CNI wants to merge 2 commits into
fox-it:mainfrom
JSCU-CNI:jsonfile-hook

Conversation

@JSCU-CNI

Copy link
Copy Markdown
Contributor

This PR adds the method obj_hook to the JsonfileReader adapter. This allows implementations of JsonfileReader to modify object output without redefining the entire __iter__ method.

@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.07692% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.11%. Comparing base (ff6a1f1) to head (e12cd94).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
flow/record/adapter/jsonfile.py 73.07% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
- Coverage   84.24%   84.11%   -0.13%     
==========================================
  Files          35       35              
  Lines        3745     3759      +14     
==========================================
+ Hits         3155     3162       +7     
- Misses        590      597       +7     
Flag Coverage Δ
unittests 84.11% <73.07%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yunzheng

Copy link
Copy Markdown
Member

I don't see a real problem with adding this, but was curious what the use-case was besides the one shown in the unit test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants