docs(commits_stats) correct grammar

This commit is contained in:
davhojt 2022-06-08 10:33:25 +03:00 committed by Dav Hojt
parent f4b37fde93
commit 4aebc1576c
1 changed files with 8 additions and 16 deletions

View File

@ -2,26 +2,13 @@
### Instructions: ### Instructions:
In this exercise you will be provided with a json file `commits.json` with data corresponding to git commits in GitHub (extracted using the GitHub rest API). Your objective is to extract the relevant data and place it in a struct called `CommitData` to get the following information: In this exercise, you will be provided with a json file `commits.json` with data corresponding to git commits in GitHub (extracted using the GitHub rest API). Your objective is to extract the relevant data and place it in a struct called `CommitData`.
1. Number of commits per author (identified by the GitHub login).
2. The number of commits per author.
Create two functions: Create two functions:
- `commits_per_author`: which returns a hash map with the number of commits per author. The auditors will be identified by their GitHub login.
- `commits_per_author`: which returns a hash map with the number of commits per author.
- `commits_per_date`: which returns a hash map with the number of commits per week. - `commits_per_date`: which returns a hash map with the number of commits per week.
- Note: A week is represented by the a year followed by the number of the > A week is represented by the a year followed by the number of the week. For example, January 1, 2020 is in week 1 of 2020 and will be represented by a `String` with the form `"2020-W1"`.
week. For example, January 1, 2020 is in week 1 of 2020 and will be
represented by a String with the form "2020-W1".
### Notions:
- [chrono](https://docs.rs/chrono/0.4.19/chrono)
- [json](https://docs.rs/json/0.12.4/json/index.html)
### Expected functions ### Expected functions
@ -56,3 +43,8 @@ $ cargo run
{"homembaixinho": 2, "mwenzkowski": 3, ... ,"tamirzb": 1, "paul-ri": 2, "RPigott": 1} {"homembaixinho": 2, "mwenzkowski": 3, ... ,"tamirzb": 1, "paul-ri": 2, "RPigott": 1}
$ $
``` ```
### Notions:
- [chrono](https://docs.rs/chrono/0.4.19/chrono)
- [json](https://docs.rs/json/0.12.4/json/index.html)