{"id":957,"date":"2022-10-30T21:44:26","date_gmt":"2022-10-30T19:44:26","guid":{"rendered":"https:\/\/www.juustila.com\/antti\/?p=957"},"modified":"2022-10-30T21:44:26","modified_gmt":"2022-10-30T19:44:26","slug":"simple-analytics-for-several-git-projects","status":"publish","type":"post","link":"https:\/\/www.juustila.com\/antti\/2022\/10\/30\/simple-analytics-for-several-git-projects\/","title":{"rendered":"Simple analytics for several Git projects"},"content":{"rendered":"\n<p>Last year I had 299 students working on their individual git projects in Data structures and algorithms course. It is a challenge to keep up with the status of each student to guide them ahead in the course!<\/p>\n\n\n\n<p>Thinking about this today, I decided to see if I could create some tooling to help me out in keeping in touch on how students proceed in their course projects.<\/p>\n\n\n\n<p>First tool is a bash script to clone or update the projects from GitLab to my local computer. These scripts were written already 2-3 years ago.<\/p>\n\n\n\n<p>Second (new) script goes through the student repositories on my local computer and creates a git log file for each project, with some specific settings:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git log --numstat --branches --date=iso8601 --output=&lt;file><\/code><\/pre>\n\n\n\n<p>Then I have this Swift\/SwiftUI app using the new <a href=\"https:\/\/developer.apple.com\/documentation\/Charts\">Swift Charts<\/a> API to generate a status view for all the student projects from the log files. When I press the Load logs button, all project log files are parsed and simple statistics for each repository is then created from the log files.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" src=\"https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23-1024x557.png\" alt=\"\" class=\"wp-image-958\" srcset=\"https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23-1024x557.png 1024w, https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23-300x163.png 300w, https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23-768x418.png 768w, https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23-1536x835.png 1536w, https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23-1200x652.png 1200w, https:\/\/www.juustila.com\/antti\/wp-content\/uploads\/2022\/10\/Nayttokuva-2022-10-30-kello-21.29.23.png 1946w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption>My tool app and visualisation of some of my own projects<\/figcaption><\/figure>\n\n\n\n<p>The green bar shows the number of added lines of code so far, the red one shows the number of removed lines of code.<\/p>\n\n\n\n<p>Anonymize -button puts random strings in place of the repository names, in case I need to show the statistics to others that are not supposed to see the student id&#8217;s.<\/p>\n\n\n\n<p>Tomorrow starts this Fall implementation of Data Structures and Algorithms. Let&#8217;s see if this tool is of any use to us teachers&#8230;<\/p>\n\n\n\n<p>When this basic functionality works, I could also add a line chart showing a timeline of individual projects, how lines of code were added when the course proceeds. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year I had 299 students working on their individual git projects in Data structures and algorithms course. It is a challenge to keep up with the status of each student to guide them ahead in the course! Thinking about this today, I decided to see if I could create some tooling to help me &hellip; <a href=\"https:\/\/www.juustila.com\/antti\/2022\/10\/30\/simple-analytics-for-several-git-projects\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Simple analytics for several Git projects&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[2],"tags":[19,70,46,101,47,12],"class_list":["post-957","post","type-post","status-publish","format-standard","hentry","category-coding","tag-git","tag-programming","tag-swift","tag-swift-charts","tag-swiftui","tag-teaching"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/posts\/957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/comments?post=957"}],"version-history":[{"count":1,"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/posts\/957\/revisions"}],"predecessor-version":[{"id":959,"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/posts\/957\/revisions\/959"}],"wp:attachment":[{"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/media?parent=957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/categories?post=957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.juustila.com\/antti\/wp-json\/wp\/v2\/tags?post=957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}