Septimana Octum
Week 8
The past week, I moved back to university to start my third year. It was a little hectic, but I carried on adding the reference implementations and tests. The Coding Period is coming to a close, with only two weeks remaining.
Tasks for the week
- Continue adding tests
- Continue adding non-pandas implementations
- Allow for adding charts to analysis script
- Continue with issue metric reference implementations
Summary for the week
-
Continue adding tests (#211 #212 #228)
Not much to say here! I added tests for several metric modules. -
Continue with issue metric reference implementations (#232 #235 #236)
Pull requests for Issue metrics hierarchy. -
Continue with non-pandas hierarchy of metrics(#223 #210 #227)
Among others, I added non-pandas reference implementations odeChangesLines, Reviews, Reviews Accepted, Reviews Declined -
Clean up metrics and rename them
With the changes to the import system made by Valerio, the newer reference implementations have to be updated accordingly. These changes will be done once his pull request is finalized. -
Allow for adding charts to analyze script(#207)
Added the chart functionality using the FPDF library.
Meeting details
The weekly IRC meeting with my mentors held on Tuesday (the 6th) is summarized below.
Agenda
- Creating reference implementations for Issue metrics
- The output formats for the analysis script
- Adding a plotting method to each class
- The structure of the tests directory
Summary
-
Creating reference implementations for Issue metrics
Most of the issue metrics released as of now have areopen_as_new
parameter. Basically, it means that any issue which is reopened in a given period would be considered as a new issue. By default, it isFalse
.Also, the Issues Active metric requires calculating the number of active issues in a given period, which comes down to checking if a particular issue had an “event” in that period. The
reopen_as_new
mentioned above also requires finding the date of reopening, which is again, an event.Perceval does not have support for issue events as of now. So for now, we are going with a naive implementation of
reopen_as_new
which would beFalse
. The reference implementation of Issues Active is put on hold now. -
The output formats for the analysis As of now, the analysis script, which would, for a given repository, calculate the values of all metrics, outputs a pdf report. Support for JSON, markdown as well as only chart images will be added the coming week.
-
Adding a plotting method to each class Each metric implementation produces a chart based on the timeseries for that metric, which is basically a list of values of the metric over regular intervals of time, like months or weeks. Adding a
plot_timeseries
method would allow for easier plotting and customization.import matplotlib.pyplot as plt def plot_timeseries(self, plt_title, x, y): self.df.plot(x=x, y=y) plt.title(plt_title) plt.show()
An
__str__
method will also be added. -
The structure of the tests directory The structure of the tests directory will be changed to:
tests/ - tests_df - tests - data - run_tests.py
$ \ $
- Tasks for the next week
-
Carry on with non-pandas implementations
-
Continue with tests
-
Continue with implementations
-
Update pull requests to recently merged changes.
-
Add JSON and markdown support to the analysis script
-
The log for this meeting can be found here.
For older GSoC posts, please click here.