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 'code_changes' metric #284

Merged
merged 1 commit into from
May 28, 2019
Merged

Conversation

parthsharma2
Copy link
Member

Implemented 'code_changes' metric with the following optional parameters:

  • period:
    • Specifies the periodicity.
    • Can be set to 'day', 'week', 'month' or 'year'.
    • Defaults to 'day'
  • begin_date:
    • Specifies the beginning date.
    • Possible values: '2018', '2018-05', '2019-05-01', ..., ' 2017-03-02 05:34:19'
    • Defaults to '1970-1-1 0:0:0'
  • end_date:
    • Specifies the ending date.
    • Possible values: '2018', '2018-05', '2019-05-01', ..., ' 2017-03-02 05:34:19'
    • Defaults to the current date and time

Example Output:
ag.code_changes('augur', period='year')

commit_date count
0 2017-01-01 00:00:00+00:00 1525
1 2018-01-01 00:00:00+00:00 5140
2 2019-01-01 00:00:00+00:00 711

ag.code_changes('augur', period='month', begin_date='2018', end_date='2018-06')

commit_date count
0 2018-01-01 00:00:00+00:00 99
1 2018-02-01 00:00:00+00:00 55
2 2018-03-01 00:00:00+00:00 105
3 2018-04-01 00:00:00+00:00 235
4 2018-05-01 00:00:00+00:00 506

Signed-off-by: Parth Sharma parth261297@gmail.com

Signed-off-by: Parth Sharma <parth261297@gmail.com>
@gabe-heim
Copy link
Contributor

Looks good! Thank you Parth

@gabe-heim gabe-heim merged commit 4159104 into chaoss:broker May 28, 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.

2 participants