From 8d5d963ec3a50e8d9cd4ddd0a2888462209f4867 Mon Sep 17 00:00:00 2001 From: h1alexbel Date: Mon, 15 Apr 2024 11:36:42 +0300 Subject: [PATCH] doc(#227): fetch topics too, document /steps in steps/README.md --- steps/README.md | 15 +++++++++++++++ steps/discover-repos.rb | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 steps/README.md diff --git a/steps/README.md b/steps/README.md new file mode 100644 index 00000000..2dca8c0b --- /dev/null +++ b/steps/README.md @@ -0,0 +1,15 @@ +### How it Works? +The entire process of gathering metrics from GitHub repos consists of these +steps: +* **Discovering**. Get the list of repos from GitHub and then create directories for them. +* **Polishing**. Delete directories that don't exist in the list of required repositories. +* **Unregistering**. Clean directories from the CSV register if their clones are absent. +* **Cloning**. In this step we run `git clone` on found repositories. +* **JPEEK**. Here, we build those gathered repositories and run +[jpeek](https://github.com/cqfn/jpeek) on them. +* **Filtering**. Is where we apply [all the filters](https://github.com/yegor256/cam/tree/master/filters) +in order to get rid of irrelevant classes (such as `*Test`, `*ITCase`, invalid +files and so on). Whole filtering process will be printed in the final report, +you can check it [here](http://cam.yegor256.com/cam-2024-03-02.pdf). +* **Measuring**. We calculate metrics for each file using these [metrics](https://github.com/yegor256/cam/tree/master/metrics). +* **Aggregating**. Finally, we aggregate all metrics in summary CSV files. diff --git a/steps/discover-repos.rb b/steps/discover-repos.rb index acae423f..28cc9c39 100755 --- a/steps/discover-repos.rb +++ b/steps/discover-repos.rb @@ -88,7 +88,8 @@ created_at: i[:created_at].iso8601, size: i[:size], open_issues_count: i[:open_issues_count], - description: i[:description] + description: i[:description], + topics: i[:topics] } puts "Found #{i[:full_name].inspect} GitHub repo ##{found.count} \ (#{i[:forks_count]} forks, #{i[:stargazers_count]} stars)"