Browse Source

docs(commits_stats) correct grammar

pull/1173/head
davhojt 2 years ago committed by Dav Hojt
parent
commit
4aebc1576c
  1. 24
      subjects/commits_stats/README.md

24
subjects/commits_stats/README.md

@ -2,26 +2,13 @@
### 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:
1. Number of commits per author (identified by the GitHub login).
2. The number of commits per author.
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`.
Create two functions:
- `commits_per_author`: which returns a hash map with the number of commits per author.
- `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_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
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)
> 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"`.
### Expected functions
@ -56,3 +43,8 @@ $ cargo run
{"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)

Loading…
Cancel
Save