Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Add Kebechet metrics class and cli option #332

Merged
merged 7 commits into from
Mar 1, 2021

Conversation

xtuchyna
Copy link
Member

@xtuchyna xtuchyna commented Feb 18, 2021

Related Issues and Dependencies

This is a split of #323 with only the kebechet metrics part.
Related PRs:

This introduces a breaking change

  • Yes
  • No

This Pull Request implements

Kebechet stats for repository. Use option -K or --kebechet with cli to launch.

Description

Stats preview:
path: ./srcopsmetrics/metrics/thoth-station/mi/kebechet_update_manager_2021-02-18.json
data:

{
    "results": {
        "overall": {
            "created_pull_requests": 151,
            "rejected": 11,
            "rejected_by_kebechet_bot": 3,
            "rejected_by_other": 8,
            "merged": 140,
            "merged_by_kebechet_bot": 68,
            "merged_by_other": 72
        },
        "daily": {
            "created_pull_requests": 0,
            "rejected": 0,
            "rejected_by_kebechet_bot": 0,
            "rejected_by_other": 0,
            "merged": 0,
            "merged_by_kebechet_bot": 0,
            "merged_by_other": 0
        }
    }
}

@todo
Copy link

todo bot commented Feb 18, 2021

include stats of reviewers?

# TODO: include stats of reviewers?
# reviewers = [pr["reviews"][r]["author"] for r in pr["reviews"]]
review_times = [int(pr["reviews"][r]["submitted_at"]) for r in pr["reviews"]]
ttfr = min(review_times) - created_at if review_times else None
reviews = [r for r in pr["reviews"].values()]


This comment was generated by todo based on a TODO comment in 1ee561b in #332. cc @xtuchyna.

@sesheta sesheta added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 18, 2021
srcopsmetrics/cli.py Show resolved Hide resolved
srcopsmetrics/cli.py Outdated Show resolved Hide resolved
srcopsmetrics/cli.py Outdated Show resolved Hide resolved
srcopsmetrics/kebechet_metrics.py Show resolved Hide resolved
@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2021
@pacospace
Copy link
Contributor

/hold

@sesheta sesheta added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 18, 2021
@pacospace pacospace self-requested a review February 18, 2021 14:46
@pacospace pacospace removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2021
@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2021
srcopsmetrics/kebechet_metrics.py Outdated Show resolved Hide resolved
srcopsmetrics/kebechet_metrics.py Show resolved Hide resolved
@sesheta sesheta added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 19, 2021
@sesheta sesheta removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 19, 2021
@xtuchyna xtuchyna requested review from pacospace and removed request for pacospace February 19, 2021 10:58
@todo
Copy link

todo bot commented Feb 19, 2021

consider adding median_time to every day statistics (rolling windown maybe?)

# TODO consider adding median_time to every day statistics (rolling windown maybe?)
if self.today:
median_time = prs[prs["days"] == today]["ttm"].median()
day["median_ttm"] = median_time if not np.isnan(median_time) else 0
return day


This comment was generated by todo based on a TODO comment in 577ba97 in #332. cc @xtuchyna.

@xtuchyna
Copy link
Member Author

Everything in mi regarding the issue should be done, last bits remain to mi-scheduler ( thoth-station/mi-scheduler#76 )

Copy link
Contributor

@pacospace pacospace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@sesheta
Copy link
Member

sesheta commented Feb 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacospace

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pacospace pacospace changed the title Add kebechet metrics class and cli option Add metrics class and cli option Feb 22, 2021
@pacospace pacospace changed the title Add metrics class and cli option Add Kebechet metrics class and cli option Feb 22, 2021
@xtuchyna
Copy link
Member Author

xtuchyna commented Mar 1, 2021

/unhold

@sesheta sesheta removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2021
@xtuchyna
Copy link
Member Author

xtuchyna commented Mar 1, 2021

/retest

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants