A Library and CLI Application that aide in getting a clearer view of Git Repository contributions.
This project isn't on crates.io yet because it's still under development.
[dependencies]
git_detective = {git = "https://github.com/NickHackman/git_detective-rs", branch = "development"}
I've graded at Ohio State University for CSE 3901 in which groups work together on projects, from web scraping to standing up a Rails server.
When grading for the course, we distribute a percentage of points based on the overall team coordination and distribution of work. This is great for preventing the one straggler that does nothing all semester, but this is by far the most time consuming in the terms of grading.
git_detective-rs attempts to resolve this problem by showing data of contributions breaking them down by language and type (Blank, Comment, or Code). In an attempt to prevent the ever malicious underachiever that makes 100 commits of single line comments.
Since git_detective-rs
isn't on crates.io, documentation must be generated by cargo locally.
$ git clone https://github.com/NickHackman/git_detective-rs
$ cd git_detective-rs/
$ cargo doc --open --no-deps
use std::fs::remove_dir_all;
use git_detective::{Error, GitDetective};
fn main() -> Result<(), Error> {
let path = "serde-example";
let serde_url = "https://github.com/serde-rs/serde.git";
let mut gd = GitDetective::clone(serde_url, path, true)?;
// NOTE: this operation is very expensive and can take up
// to a few minutes for large repositories
let contributions = gd.final_contributions()?;
for contributor in contributions.contributors() {
println!("{} contributed to the project", contributor);
}
println!("Total lines = {}", contributions.total_lines());
// Clean up repository
let _ = remove_dir_all(path);
Ok(())
}
Benchmarks and pretty graphs needed
The binary portion of this repository licensed under GPLv3
The library portion of this repository licensed under MIT