https://github.com/marvinsxtr/2021-ba-sextro
Rust: Usability for a Lifetime? - An Empirical Approach
https://github.com/marvinsxtr/2021-ba-sextro
rust usability usability-study
Last synced: about 2 months ago
JSON representation
Rust: Usability for a Lifetime? - An Empirical Approach
- Host: GitHub
- URL: https://github.com/marvinsxtr/2021-ba-sextro
- Owner: marvinsxtr
- License: mit
- Created: 2022-03-20T00:33:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-20T00:39:06.000Z (about 4 years ago)
- Last Synced: 2025-04-04T07:14:07.829Z (about 1 year ago)
- Topics: rust, usability, usability-study
- Language: Python
- Homepage:
- Size: 2.61 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2021-ba-sextro
This repository contains the thesis "Rust: Usability for a Lifetime? - An Empirical Approach" as well as tools to collect usability metrics from Rust projects on GitHub and for analysis of the results.
## Contents
* [Collector](#collector)
* [Analyzer](#analyzer)
* [Data](#data)
* [Thesis](#thesis)
## General information
The environment variable `DATA_PATH` can be changed to an absolute path, where any data generated by the collector or the analyzer will be saved. By default, this is the `data` folder in this repository. Note that the tools were only tested on Linux.
# Collector
This tool clones the repositories from the `awesome-rust` list, runs a set of tools on them and filters the results.
## Setup
### Install Rust
Install Rust using `rustup` by following [this guide](https://www.rust-lang.org/tools/install).
### Install Clippy
```sh
rustup component add clippy
```
### Install rust-code-analysis-cli
Uninstall any previous version of the CLI.
```shell
cargo uninstall rust-code-analysis-cli
```
Clone the forked rust-code-analysis tool.
```shell
git clone https://github.com/marvinsxtr/rust-code-analysis.git
```
Install the patched version.
```shell
cargo install --path rust-code-analysis/rust-code-analysis-cli
```
## Build and run
For an example usage see the [Example](#example) section.
### Debug
```shell
cd collector
cargo build
./target/debug/collector -h
```
### Release
```shell
cd collector
cargo build --release
./target/release/collector -h
```
## Usage
### Flags
```
-c, --clone_repos
-d, --delete_tmp
-f, --filter_metrics
-m, --collect_metrics
```
### Options
```
-p, --input_path [default: ../data/in/awesome-rust.txt]
-n, --repo_count [default: 1]
-s, --repo_skips [default: 0]
```
## Documentation
```
cargo doc
```
Open `target/doc/collector/index.html` in a browser.
## Logs
The logs can be found in the `log` directory under the `DATA_PATH`.
# Analyzer
Tool to analyze the results of the collector. This includes data aggregation, running statistic tests and generating LaTeX.
## Setup
### Virtual environment
```sh
cd analyzer
python3 -m venv venv
source venv/bin/activate
```
### Install dependencies
```sh
pip3 install -r requirements.txt
```
## Run
```
cd ..
python3 -m analyzer -h
```
For an example usage see the [Example](#example) section.
## Scripts
```
python3 -m analyzer.scripts.
```
## Usage
### Options
```
-n REPO_COUNT, --repo_count REPO_COUNT - Number of repositories to analyze
-s SKIP_REPOS, --skip_repos SKIP_REPOS - Number of repositories to skip
-a, --analyze_repos - Whether to analyze the repositories
-t, --statistic_tests - Whether to conduct the statistical tests
-e EXPERIMENT_NAMES, --experiment_names EXPERIMENT_NAMES - Which experiments to run
```
# Data
## Example
The folder `example` contains a small subset of the actual data set generated with the collector and the analyzer. In order to reproduce the example data, the following commands can be used:
```sh
cd collector
cargo build
./target/debug/collector -n 5 -c -m -f -d
cd ..
python3 -m analyzer -n 5 -a -t
```
Running this should not take much longer than 5 min.
## Complete
The complete data set generated by the tools in this repository and used for the thesis is available on [Nextcloud](https://cloud.teamusec.de/s/oQK84LJRCR82Nrk). The folder structure is the same as in the `data` folder of this repository.
# Thesis
The thesis, which this repository repository is part of, is located in the `thesis` folder as `2021_ba_sextro.pdf` and can also be generated manually:
```sh
cd thesis
make
```
## Citation
```
@thesis{Sextro2021,
author = {Marvin Sextro},
title = {Rust: Usability for a Lifetime? - An Empirical Approach},
year = {2021},
}
```