Feat/release ingest - #369
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughChangesThe change adds GitHub Releases ingestion, normalized release records, cadence and staleness analysis, a registered releases pipeline, period-specific charts, dashboard specifications, KPI metrics, web rendering, documentation, and tests. Releases analytics
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 05d93ac3-f36c-486b-a3fd-87018f5f746d
📒 Files selected for processing (20)
README.mdsrc/hiero_analytics/analysis/releases.pysrc/hiero_analytics/dashboard_spec/__init__.pysrc/hiero_analytics/dashboard_spec/metrics.pysrc/hiero_analytics/dashboard_spec/releases.pysrc/hiero_analytics/data_sources/github_ingest/__init__.pysrc/hiero_analytics/data_sources/github_ingest/releases.pysrc/hiero_analytics/data_sources/models.pysrc/hiero_analytics/data_sources/queries/releases.graphqlsrc/hiero_analytics/export/macro_metrics.pysrc/hiero_analytics/pipelines/__init__.pysrc/hiero_analytics/pipelines/releases.pysrc/hiero_analytics/plotting/scatter.pytests/analysis/test_releases.pytests/contracts/test_output_contract.pytests/data_sources/test_github_ingest.pytests/data_sources/test_models.pytests/export/test_macro_metrics.pytests/pipelines/test_releases.pytests/plotting/test_scatter.py
|
Status update: both CodeRabbit findings are addressed.
One note: the Linked Issues check flags the missing Ready for another review. |
|
@exploreriii any update on this |
|
Hi this is a complicated PR to review, please feel free to take on another issue while you wait :) |
exploreriii
left a comment
There was a problem hiding this comment.
Hi @iron-prog
I really like your approach
Just a couple extra requirements
Could you please check using F12 on different screen sizes to see the chart renders as viewable as possible? ideally it would stretch to the viewport so it is not small
Further have you considered cahnging the x axis so it is more human friendly e.g. Nov with 2025 underneath or something?
Ideally we can make the release timeline dynamic - we have time filters in other charts and tables (1 month, 1 year, etc). can we use them so the reader can change what they want to see?
Please also check in dark mode, the colours render with enough contrast
I personally find the second bar chart overwhelming - Shipping repos most overdue relative to their own pace
I actually think it has similar data to the first that the user can 'absorb' visually anyway
So, does the second chart really present a different view, and if it does, in an easy to undesrtand way? I think mathematically it is nice, but for the use case it might not work well
table 3 covers that well too. maybe instead we can delete chart 2, keep table 3 and perhaps make the overdue vs. own pace column more visual? like for example something that is doing late releases can be a certain colour different to the avearge
Another idea is to consider groupign the repos by type - simialr to the network graphs : sdks, core, etc. That might help us gain some insight, but it might be overkill
What are your thoughts? i think its pretty good already! nice work
|
Also please do check hiero hackers will load correctly, and also that each of the new content has a widget url, as introduced by @MonaaEid recently |
|
Thanks for the feedback! I agree with the suggestions. I’ll make the timeline responsive with better date formatting and dark-mode support, and I’ll also address chart problem and make the overdue-vs-own-pace column more visual in the table. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0705ec66-60e5-4558-84a0-f62c471fb49c
📒 Files selected for processing (14)
src/hiero_analytics/analysis/releases.pysrc/hiero_analytics/config/analysis.pysrc/hiero_analytics/dashboard_spec/__init__.pysrc/hiero_analytics/dashboard_spec/releases.pysrc/hiero_analytics/pipelines/releases.pysrc/hiero_analytics/plotting/scatter.pytests/analysis/test_releases.pytests/contracts/test_output_contract.pytests/pipelines/test_releases.pyweb/src/api.tsweb/src/app.cssweb/src/components/FormattedCell.tsxweb/src/test/fixtures.tsweb/src/test/formattedCell.test.tsx
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
MonaaEid
left a comment
There was a problem hiding this comment.
Great work! one question why isn’t there releases analytics for Hiero hackers?
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
…iero-hackers#331) Second layer on top of the ingest/analysis/pipeline commit. - build_release_staleness now also computes median_gap_days and staleness_ratio (days_since_last_release / median_gap_days) -- how many multiples of a repo's own typical gap it's currently overdue by. Null for repos with <2 releases or a zero-day median gap (undefined, not coerced to 0/inf). - Validated against real hiero-ledger data from issues/331: repos with an unremarkable raw days_since_last_release turned out to be the most overdue relative to their own pace (hiero-json-rpc-relay: 38 raw days, 3-day norm, ratio 12.67x -- matches the maintainer's 'quiet repo that used to release every 3 weeks' scenario). - plotting/scatter.py: plot_release_timeline -- dot/strip timeline, y-axis sorted by release count, per-repo count label instead of more dots (the overplotting fix from the prototype, now production code). Deliberately does not show zero-release repos (chart legibility; honest-denominator obligation lives in the staleness CSV instead). Verified: 748 passed, 95.37% coverage, ruff clean. Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Third layer on top of the ingest/analysis/pipeline and staleness_ratio/ chart commits. - dashboard_spec/releases.py: new standalone 'Releases' tab, registered in _FAMILIES. Standalone rather than a Governance sub-section, per the maintainer's redirect earlier in hiero-hackers#331 -- release staleness isn't governance-dependent or period-scoped. - Two chart cards (release timeline, cadence-relative staleness bar) under one section group, plus the release_repo_summary.csv table section with the honest-denominator description carried into the UI copy. - Glossary explains why release count isn't the headline metric and what the staleness ratio means, in plain language. Verified: tests/dashboard_spec/ (strict spec-shape validator) 10/10 passed, ruff clean. Contract suite run deliberately shows one expected failure (test_every_spec_chart_png_is_produced) -- the spec declares release_timeline.png/release_staleness.png but the pipeline doesn't generate them yet; that's the next commit. Signed-off-by: iron-prog <dt915725@gmail.com>
Fourth and final layer -- closes out the feature end to end. - pipelines/releases.py: generates release_timeline.png (windowed to ~18 months) and release_staleness.png (top 20 by staleness_ratio, repos with no established cadence correctly excluded rather than shown unranked). Both skip cleanly when there's nothing to plot. - macro_metrics.py: releases_metrics -- 3 KPI tiles matching the design settled with the maintainer: 'repos with releases' (denominator, factual), 'released last 90d %' and '>3x their own typical gap' (both scoped to repos that have ever released, not the full repo universe -- most zero-release repos are docs/governance/meta, so an unscoped percentage would mostly measure org composition, not health). - metrics.py: tile explainer text for all three, required by test_every_emitted_kpi_tile_explains_itself. - test_output_contract.py: removed release_repo_summary.csv from the placeholder CHART_COMPANION_CSVS set now that it has a real section spec; release_timeline.csv stays (chart companion, no table). Caught and fixed two issues before committing: - A test comment claimed the staleness chart wouldn't be produced for a 2-release repo; checked it against build_release_staleness directly and the comment was wrong (2 releases DO give one computable gap) -- fixed the test to assert the chart exists instead of rationalizing its absence. - The zero-repos-releasing branch of releases_metrics returned a bare 0 instead of the 'X of Y' format the normal branch uses -- would have looked inconsistent on the actual tile across different org states. Verified: 752 passed, 95.40% coverage, ruff clean, full contract suite (8/8, hard-timeout-guarded) green including the two tests that were failing until this commit (test_every_spec_chart_png_is_produced and the KPI-explainer test). Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
f7ef691 to
39e7fb6
Compare
Thanks! This should be fixed now — the latest changes render Releases analytics for Hiero Hackers as well. |
📊 Dashboard previewThe dashboard was built for this PR. ➡️ Download
|
Description:
Add GitHub Releases analytics to track release cadence and repository staleness.
staleness_ratio.Related issue(s):
Fixes #331
Notes for reviewer:
The implementation keeps release data independent from the governance/period-scoped repository overview and preserves repositories with no releases in the summary.
staleness_ratiocompares the current release gap with each repository's historical median release gap, making staleness relative to its own cadence rather than raw days alone.Validated against real
hiero-ledgerdata. The pipeline successfully generated the release timeline/summary CSVs and both release charts.752 passed95.40%coverageChecklist
/assignbefore starting (see [contributing guide](https://github.com/hiero-hackers/analytics/blob/main/CONTRIBUTING.md#workflow))uv run pytestanduv run ruff check src testspass locallysrc/layout)git commit -S -s