Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Evolution & Risk Metrics #300

Merged
merged 12 commits into from
Jun 20, 2019
Merged

Implement Evolution & Risk Metrics #300

merged 12 commits into from
Jun 20, 2019

Conversation

parthsharma2
Copy link
Member

Implemented the following metrics:

  • Evolution

    • Issue Duration: returns the duration of all closed issues
    • Issues Active: returns a timeseries of the number of issues active per period (day, week, month, year). An issue is active if an issue event occurs.
  • Risk [Need Feedback]

    • CII Best Practices Badge: returns the badge level.
    • Languages: returns the implementation languages. In this implementation, data is fetched from the repo_badging table. [Alternative source: repo table i.e. GitHub API based, but only stores primary language]
    • License Declared: returns the license declared. In this implementation, data is fetched from the repo_badging table. [Alternative source: repo_info table i.e. GitHub API based]

Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
@parthsharma2 parthsharma2 changed the title Implement metrics Implement Evolution & Risk Metrics Jun 20, 2019
@sgoggins
Copy link
Member

@parthsharma2 : I think we should pull the primary github declared language. The badging app does not have very good coverage. Can you make that change?

@sgoggins
Copy link
Member

sgoggins commented Jun 20, 2019

I guess to do that, we would need to add something to pull that data placed into the GitHub worker. Since @gabe-heim is actively debugging that worker right now, we should get his input. Do you know what API gets called to pull the primary language?

Alternately, I have a version of the database for which I've done a full language analysis using the SCC project ... Lets see what @gabe-heim says about getting that data from the GitHub endpoint. Here's the current augur_github_worker: https://github.com/chaoss/augur/blob/dev/workers/augur_worker_github/augur_worker_github/worker.py ... Take a look and see what you think.

I do not recall if we intend to add additional endpoints from GitHub to the same worker, or have separate workers. My guess is that all the "data anomaly handling" logic Gabe's written around issues is a lot more complex than the logic required for pulling the GitHub primary language, since I don't think it requires corresponding API calls for x_events, x_comments or contributors.

@parthsharma2
Copy link
Member Author

@sgoggins api.github.com/repos/:owner/:repo endpoint can be used to get the primary language, it can also be used to get data (such as forks, stars, license, etc.) for the repo_info table. If you want to get all the languages you can use api.github.com/repos/:owner/:repo/languages

Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
Signed-off-by: Parth Sharma <parth261297@gmail.com>
@parthsharma2
Copy link
Member Author

parthsharma2 commented Jun 20, 2019

@sgoggins I've made the changes to the 'languages' metric implementation. I used git rebase to edit the particular commit to make changes. I've somehow become a co-author of certain commits although locally none of those commits mention me as an author. Any way to solve this 😕 @gabe-heim @sgoggins ?

EDIT: fixed it

@gabe-heim
Copy link
Contributor

Btw this can definitely be added to the github worker, it would just be in a separate method of the worker and probably be viewed as a different "model" that the worker can fulfill

@parthsharma2
Copy link
Member Author

@sgoggins @gabe-heim maybe I can give it a try?

@gabe-heim
Copy link
Contributor

@parthsharma2 Definitely! Go for it

@gabe-heim
Copy link
Contributor

Depending on what @sgoggins wants

@gabe-heim gabe-heim merged commit e9c74ec into chaoss:dev Jun 20, 2019
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.

3 participants