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

[GSoC] Issue with compute_timeseries method in dataframe reference implementations #175

Closed
Polaris000 opened this issue Jun 18, 2019 · 2 comments

Comments

@Polaris000
Copy link
Contributor

compute_timeseries method in the commit-related metric classes can be improved. The main issue is not exactly with the current implementation of compute_timeseries, rather, It is because the self.since and self.until parameters have to be set to particular values. This leads to them being assigned values in the __init__ method of the classes.

@Polaris000
Copy link
Contributor Author

The current implemention of compute_timeseries of Code_Changes metric is like this:

  • create a dataframe by grouping data based on year, followed by month of creation and then aggregating them with count.
  • create a dataframe with rows representing every possible interval of time between the since and until parameters. For example, if the period is "month", then the second dataframe will have each year, followed by each month for that year between the date_range dates as rows.
  • merge the two dataframes above

It is clear that creating the second dataframe will require a definite since and until date. The advantage of this method is that it allows for easier plotting of graphs, say, the number of commits per month. Only grouping the first dataframe would mean that months without commits will not be included at all, making a plot based on this dataframe skewed.

@Polaris000
Copy link
Contributor Author

Polaris000 commented Jun 28, 2019

Closing this since this was addressed in #176

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

No branches or pull requests

1 participant