GSoC Idea: Implementing CHAOSS metrics with Perceval
[ This issue for addressing questions and comments related to this GSoC idea, which is one of the ideas proposed by the CHAOSS group for the 2019 edition of GSoC.]
Description
The GMD Working group is proposing some metrics that are computed with information obtained from software development repositories. One of the goals of the working group is to provide reference implementations of those metrics, based on the output produced by Perceval. As an example, still work in progress, check the Python notebook with the reference implementation for changes to the source code.
The aims of this idea are as follows:
-
Producing Python (Jupyter) notebooks with proposals for reference implementations for these metrics. The proposals will follow the usual acceptance mechanism of the working group (based on GitHub issues and pull requests). In general, all reference implementations will build on the output produced by Perceval for the relevant data source, and will explore the peculiarities of the metric and its implementation for that data source.
-
Document the notebooks as much as possible, so that any person trying to implement the metric can understand not only how to implement it, but also the details that should have into account. Documentation should also be suitable for people willing to dig deeper about the details of the metric, with the aim of understanding it (not necesarily implementing it).
-
When needed, propose changes to Perceval, and maybe other components in GrimoireLab, that allow for the implementation of the metric.
-
Participate in the acceptance process of the working group.
The aims will require programming in Python, producing Python notebooks, interaction with other people in the working group to learn about subtle details of the metrics, and producing documentation.
- Difficulty: Medium
- Requirements: Python programming, experience with Python notebooks, skills for producing documentation.
- Recommended: Experience in data analytics with Python, if possible involving the use of Pandas, will be a plus.
- Mentors: @jgbarah and @valeriocos.
Microtasks
For becoming familiar with Perceval, it is useful if you produce retrieve data from several repositories or a FOSS (free, open source software) project, and produce some kind of analysis and/or summary of results, in a Jupyter Notebook. You can start by browsing the GrimoireLab Tutorial, and in particular, the chapter on Perceval.
Once you're familiar with producing analysis, you can exploit the information in the indexes via a Python script presented as a Python Jupyter Notebook. For showing it, you can make it work with MyBinder, and show us its MyBinder link. For the data to be presented in the analysis, you can run Perceval on any FOSS project with at least 5 GitHub or GitLab repositories which include git (at least 1,000 commits in total), issues (at least 200 issues in total) and pull requests / merge requests (at least 200 pull requests / merge requests in total).
-
Microtask 0: Use this notebook implementing the Code_Changes metric (see it in MyBinder) as an example of how to collect the data, producing a single JSON file per data source, with all items (commits, issues, pull/merge requests) in it. Produce one notebook per data source (git, GitHub/GitLab issues, GitHub pull requests / GitLab merge requests) showing a summary of the contents of that file (number of items in it, and number of different identities in it counting authors/committers for git, submitters for issues and pull/merge requests). This microtask is mandatory, to show that you can retrieve data and produde a notebook showing it. In each notebook, include also the list of repositories retrieved, and the date of retrieval, using data available in the JSON file.
-
Microtask 1: Produce a notebook showing (and producing) a list with the activity per quarter: number of new committers, submitters of issues, and submitters of pull/merge requests, number of items (commits, issues, pull/merge requests), number of repositories with new items (all of this per quarter) as a table and as a CSV file. Use plain Python3 (eg, no Pandas) for this.
-
Microtask 2: Like Microtask 1, but now using Pandas.
-
Microtask 3: Produce a notebook with charts showing the distribution of time-to-close for issues already closed, and opened during the last year, for each of the repositories analyzed, and for all of them together. Use Pandas for this, and the Python charting library of your choice (as long as it is a FOSS module).
-
Microtask 4: Produce a listing of repositories, as a table and as CSV file, with the number of commits authored, issues opened, and pull/merge requests opened, during the last three months, ordered by the total number (commits plus issues plus pull requests). Use plain Python3 (eg, no Pandas) for this.
-
Microtask 5: Like Microtask 4, but now using Pandas.
-
Microtask 6: Perform any other analysis you may find interesting, based on the Perceval data you collected.
If you want, you can also:
-
Microtask 7: Produce a pull request for any of the GrimoireLab tools, and try to follow instructions until it gets accepted. Try do do something simple that you consider useful, not necessarily fix to the code: improvement of comments, documentation or testing will usually be easier to get accepted, and very useful for the project. Please, avoid just producing a random pull request just to have another microtask: the objective is not that you get one more microtask done, but that you understand how to interact with developers in the project contributing with something that could be useful).
-
Microtask 8: Like Microtask 7, but for the GMD working group. You may try to fix some error (even grammatical) in the description of a metric, improve the description of a focus area, fix or improve a reference implementation, or even produce a new reference implementation proposal. As in the previous microtask, the goal is not that your contribution is accepted (which of course would be great), or that you just complete yet another microtask, but that you interact with the working group, and you understand its context and procedures.
Of course, there is no need to do all the microtasks, you only need to show that your skills are in good standing for working in this project.
Showing the work you did
If you want to show the work you did, open a GitHub repository, and upload to it:
-
A
README.mdfile explaining what you did, and linking to the results (which will be in the same repository, see below). This will be the main file to show your skills and interest on the project, so try to make it organized and clear, in a way that we can easily understand what you did. -
Python Jupyter notebooks you produced, with enough information (in comments and/or in the
README.mdfile) so that we can run them if needed. Upload Python scripts ready to work assuming GrimoireLab packages are already installed. Upload Jupyter notebooks ready to be seen via the GitHub web interface, but also include links to fully-functional versions of the notebooks in MyBinder. -
Links to the pull request you did (if any), along with any comment you may have about it.
Submitting information for the application process
-
You must complete at least microtask 0, and at least three microtasks, in the case you're interested in this idea.
-
Once you completed at least one microtask, go to the governance repository and create a pull request to add yourself, your information, and a link to your repository with the completed micro-task(s) in the GSoC-interest.md file (see above for the contents of the repository).
-
You are welcome to include in your repository other information that could be of interest, such as open issues or pull requests submitted to the project to which you intend to contribute during GSoC, contributions to other projects, skills, and other related information.
-
You must complete these things by GSoC deadline for proposals. Make sure to also submit the information required by GSoC for applicants (i.e., project proposal), linking to it from your pull request in the GSoC-interest.md file.
Useful documentation
Getting feedback for your proposal & microtasks
Our idea is to have a look at proposals that are registered in the governance repository starting after 25th March, when students can formally apply. But if you have specific doubts, comments, or whatever, use this issue.
In general, we don't want to give advice too specific to one case, because that could give some advantage to some person with respect to the others. Answering questions and addressing comments (if you want, based on your proposal) is not a problem as long as that's done in public, hence the threads in this issue.
Asking for help
If you need help, please use the following channels.
For issues related to GrimoireLab:
- Comments in this issue
- #grimoirelab channel in Freenode IRC
- GrimoireLab mailing list
For general issues related to CHAOSS or CHAOSS metrics
- #chaoss-community channel in Freenode IRC
- CHAOSS mailing list (please use the tag "[GSoC]" in the subject line)
@jgbarah I think the link for the Python notebook with the reference implementation for commits. is incorrect here. Did you meant to point at https://github.com/chaoss/wg-gmd/blob/master/implementations/Code_Changes-Git.ipynb, instead?
Yes, @aswanipranjal thanks for noticing. I'll change that.
Which metrics are we specifically talking about here? Only these metrics (present in wg-gmd repository)? Or is it something else?
Though most metrics are consistent between the chaoss/metrics repository , some are present as archived metrics in the wg-gmd repo. What about such metrics?
We're in the process of defining the metrics in the focus areas directory. Have a look to those files, which are still work in progress.
Produce one notebook per data source (git, GitHub/GitLab issues, GitHub pull requests / GitLab merge requests) showing a summary of the contents of that file
For a given repo we have to produce one notebook right ?? And in that we have to output number of commits, pull request open and merged ??
Is this what is required for microtask0 or any else?
@sarvesh211999 To keep everything tidy, you need to produce a Notebook for each of the data sources that you gather the data for.
Produce one notebook per data source (git, GitHub/GitLab issues, GitHub pull requests / GitLab merge requests)
So the repository that you create can have multiple Notebooks
Ohkkay. I will create a pull request and then you can review it. So if there are any changes I can make it. Thanks for you help
@sarvesh211999 please go through this document to understand how to show CHAOSS what you have done: https://github.com/chaoss/governance/blob/master/GSoC-interest.md
Yeah I was just asking whether it will be reviewed and responsed back if anything is missing ?
@aswanipranjal After analysis of how many data source I have to create pull request for Microtask0?
@sarvesh211999, I apoligize about the late reply:
Yeah I was just asking whether it will be reviewed and responsed back if anything is missing ?
@jgbarah might be better suited to answer this.
After analysis of how many data source I have to create pull request for Microtask0?
The microtask0 is more about you understanding how Grimoirelab tools work and interact with each other. The more data sources that you can produce the reports for, the better you'll understand the systems I'd say.
Thank You Very Much. @aswanipranjal
Can we improve the wording of micro-task 0? I suggest adding information answering the following questions as they have been asked in the comments:
- what exactly is meant by a data source? (A repository ?, or a project with several repos? or the data fetched from a repository like commits, pull requests, etc. ?)
- How many data sources do we fetch the data from? (answered in the comments but would be better to include)
- How many notebooks are to be submitted per data source? (this will become clearer when the first question is answered)
Please have a look @aswanipranjal, @jgbarah.
Hello, I am interested in this project. I have mostly completed microtask0 (analysis of commits), however, I encounter a problem with the rate limits of GitHub being exceeded (If I try to perceval github any large project). I have tried a few ways to get around this but I'm afraid Ive hit a roadblock. Can I just use a smaller project instead? Also, as @Polaris000 said, I find the wording of the task to be unclear as well and we would benefit from further clarification.
HI @s-ankur! Regarding your rate limit, have you tried using the authentication token parameter with perceval?
The rate limit is low for unauthenticated users. Have a look at the documentation
Yes, I did, but I guess the repo I'm trying is too big either way. I think I'll try it with a smaller repo after my timeout is over. Thanks @Polaris000
@s-ankur use sleep-for-rate flag
This should do the trick. Thanks @sarvesh211999.
@sarvesh211999 said:
Yeah I was just asking whether it will be reviewed and responsed back if anything is missing ?
Usually, you upload the results for all the microtasks you do in your own repository, and include that in the pull request you produce (as stated in the /GSoC-interest.md file).
We will go through all the repos in that file when we enter the evaluation period, or earlier (if we find some time to have a look earlier). Of course, you can ask whenever you find some problem. But if you understand what to do, I think you'll know if it is (well) done. Of course, the better documented, and maybe complemented with related stuff, the better. Remember that the idea is to show that you can work with the kind of stuff that you will need during the GSoC.