Skip to content

feat(reporting): make Report.run() the single entry point, deprecate determine_report() and persist_results() - #122

Merged
tombonfert merged 3 commits into
mainfrom
feature/run_single_entry_point
Oct 15, 2026
Merged

tombonfert merged 3 commits into
mainfrom
feature/run_single_entry_point

Conversation

@tombonfert

Copy link
Copy Markdown
Collaborator

Summary

Closes #106.

Report.run() is now the one documented way to execute a report. The two-step determine_report() + persist_results() flow still works but emits a FutureWarning pointing to run(). This matters for correctness: the drain loop for max_containers_per_batch lives only in run(). A capped incremental run following the old documented flow silently processed just the first batch.

Changes

  • API: The logic moved into private _determine_report() / _persist_results(), and run() now calls those. The public methods are thin wrappers that warn and then delegate, so behavior is unchanged. They use FutureWarning rather than DeprecationWarning, matching the existing batch_size deprecation: DeprecationWarning is hidden by default when raised from library code.
  • Telemetry: The deprecated methods keep their telemetry tags, so usage of the old path stays measurable. run() now sends one run ping per call instead of extra pings on every iteration. Also removed a mislabeled determine_report tag on _persist_incremental.
  • Tests: Migrated off the deprecated API to run(), run(persist_results=False), or the private steps where a test needs a single step or a single capped pass. Added tests for the warning, that it points at the caller, and that the wrappers delegate.
  • Docs: Skills, README, narrative docs, demo notebooks and the API reference now teach run(). They cover run(persist_results=False) for sinkless or compute-only use and include a deprecation note.

Migration

Before After
determine_report() + persist_results() run()
determine_report() only run(persist_results=False)

…n favor of `run()`

- Mark `Report.determine_report()` and `Report.persist_results()` as deprecated with `FutureWarning`; keep behavior unchanged.
- Refactor `Report.run()` to call internal `_determine_report()`/`_persist_results()` so the public two-step API can warn independently.
- Update README, demos, docs, and skills to use `run()` (and `run(persist_results=False)` for compute-only/sinkless workflows).
- Migrate tests to `run()` or the internal helpers where deprecation warnings are not the subject under test.
@tombonfert
tombonfert requested a review from a team as a code owner October 14, 2026 10:51
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.22%. Comparing base (aec178e) to head (a490f0e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
+ Coverage   90.21%   90.22%   +0.01%     
==========================================
  Files          66       66              
  Lines        6009     6017       +8     
  Branches      757      757              
==========================================
+ Hits         5421     5429       +8     
  Misses        466      466              
  Partials      122      122              
Flag Coverage Δ
query_engine 86.66% <ø> (ø)
reporting 94.89% <100.00%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
src/impulse_reporting/config/config_parser.py 97.02% <ø> (ø)
src/impulse_reporting/core/report.py 94.16% <100.00%> (+0.12%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ix doc typos

- Clarify that `run(persist_results=False)` leaves lazy DataFrames on the report object, which are unsafe to read after a persisting run because incremental results re-detect against updated gold, capped runs keep only the last batch, and `cleanup_temp_tables` drops their backing temp tables.
- Update API reference, report reference, and skill docs to steer users toward reading gold tables after persistence.
- Fix misplaced admonition text in the report reference and tighten deprecated-method docstrings.
- Adjust integration tests to use internal `_determine_report()`/`_persist_results()` where the test subject is persistence behavior, not the deprecated public API.
…un() telemetry test

- Shift `@telemetry_logger` from deprecated public `persist_results()`/`determine_report()` to their private `_persist_results()`/`_determine_report()` counterparts so `run()` logs per-step tags correctly.
- Adjust deprecation warning `stacklevel` from 3 to 2 now that the wrappers no longer sit between the caller and the warning.
- Add `TestRunTelemetry` verifying that `run()` emits `report/run`, `report/determine_report`, and `report/persist_results` telemetry tags.
@tombonfert
tombonfert merged commit c52f39a into main Oct 15, 2026
6 checks passed
@tombonfert
tombonfert deleted the feature/run_single_entry_point branch October 15, 2026 07:01
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.

Make Report.run() the single entry point; deprecate determine_report() / persist_results()

1 participant