Repository navigation
fix: Add bounded distribution Excel example - #113
emmy-devop wants to merge 4 commits into
Conversation
|
Addressed both blocking findings in e2e3adf: Retry-After is now reader-wide and fatal wait/header/budget conditions stop every later send; UNIQUE_DAILY requires both row fields and response totals, with blanks + explicit partial exits and no daily-to-monthly distinct summation. Six-second distribution pacing remains in place from the guide follow-up. 204 source tests, 72 isolated published-SDK example tests, and all four exact independent-review regressions pass; lint/format/build pass. README and workbook methodology updated. No live extraction, permission changes or merge. Please re-review the new head; HIGH tier remains. |
|
Implemented @drafty’s requested correction on the same branch/PR in b6a1d66.
No live customer calls, permissions/production changes, merge or release. Ready for independent review, not independently approved. |
Requested by @drafty
🔴 Review tier: HIGH — human review required
--start/--stopor optional--month; workbook adds metadata and selected bounds. No SDK/API runtime contract changes.fix:follow-up may select a patch release despite being examples-only. Human merge/release ownership remains unchanged.What / why
Maintained standalone exact-domain Excel report under
examples/distribution_report, revised on the same PR/branch at @drafty's request. No package runtime changes, version bumps, workflow edits, permission changes, deployments or customer data.--startand--stop: explicit timezone-aware ISO8601, inclusive start/exclusive stop, normalized to UTC; no silent month expansion.--month YYYY-MMremains an optional mutually exclusive shorthand. Reject invalid/naive/nonzero-fractional inputs and cross-month UTC ranges before credentials or requests. Full month with exclusive next-month midnight works.sdk.news.get_articles(article_ids=batch, full_text=False)in batches of <=100. UUID joins, exact URL-host AND metadata-domain checks, duplicate/unrequested ID guards, metadata fields including title/pub_date/language/classification/sentiment/entities/keywords/reporting_voice/key_points. Missing retained-index IDs/metadata stay blank without losing event counts. No full-text fetch or per-article fanout.Publisher guide and scoped SDK exceptions
Re-read the rendered https://docs.asknews.app/en/publisher on 2026-10-10, including all four Python recipes. Recipes 1–3 expressly use authenticated
sdk.client.request; released 0.14.6 has no named ranking/share/unique helpers. Recipe 4 has the real named article method and is now implemented, correcting its earlier omission.Internal metric helpers exist, but their DTOs drop grounded fields; raw response is retained for that narrow fidelity reason. Named index helper drops timezone offsets, so index transport preserves explicit UTC. These exceptions are documented, not a claim all SDK helpers are missing. No invented local wrapper is presented as an SDK method, and no duplicate named/raw requests merely demonstrate helper use.
Safety / interpretation
stop - 1s: fractional events between that instant and stop are omitted. Index repeats that gap at every clipped UTC-day stop. One-second index clips cannot form a server bucket and are skipped/flagged. No exact coverage claim.--allow-partialis needed for actual section failures/missing IDs (exit 2); expected unsupported partial-month distincts alone are a documented caveat, not a fabricated total. Atomic no-overwrite output; literal cells/no formulas, hyperlinks or external links.Request counts
Successful no-retry data sends:
P_surface + P_citation + P_grounded + 1 + I*(2 + 2F) + ceil(U/100) + DPincludes terminal empty ranking pages;I=1only with internal flag;F=1only for a full UTC month;Uis unique validated IDs across rankings;Dis clipped UTC-day index windows lasting >=2 seconds. Actual HTTP sends add OAuth token sends and extra retry attempts; failures/caps can stop early. With one page per metric and 1–100 IDs: week 12 public / 14 internal; September 35 public / 39 internal. All sends consume the shared budget.README includes explicit Sep 1–Sep 8 week and Sep 1–Oct 1 month commands, credentials guidance and precise caveats.
How tested
b6a1d6680916cd17d8f28dfdbf685b7b921b40f1(SDK Python 3.8–3.12). Push run needed one failed-job rerun after unchangedtests/test_security.py::test_load_save_token_diskraisedInvalidToken; no unrelated runtime/test fix was made. Unchanged CI does not run optional Excel examples; those were separately tested above.Risk / rollback
Examples/documentation only; no runtime package, dependency lockfile, version or workflow changes. Source-inspected service contracts are not evidence of deployed customer authorization/schema. Revert the follow-up to undo this correction; do not merge until independent human review. No merge, release, live extraction or production/permission change performed.