Skip to content

Downloads student project repositories for further evaluation. Also analyzes repo contents and version histories.

License

Notifications You must be signed in to change notification settings

prof-rossetti/repo-evaluator-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository Evaluation System

Build Status

Downloads student project repositories for further evaluation. Also:

  • checks for files at specified locations
  • analyzes version histories
  • opens version history URLs in a browser for further inspection

Prerequisites

  • Git
  • Anaconda 3.7
  • Python 3.7
  • Pip

Installation

Install source code:

git clone [email protected]:prof-rossetti/repo-evaluator-py.git
cd repo-evaluator-py/

Create and activate a new virtual environment:

conda create -n repo-eval-env python=3.7 # first time only
conda activate repo-eval-env

Install package dependencies:

pip install -r requirements.txt

Usage

Downloading Repos

Populate db/submissions.csv with entries like the following:

github_username, repository_url
user123, https://github.com/user123/some-repo
user456, https://github.com/user456/another-repo-py/tree/my-branch
"partner1, partner2, partner3", https://github.com/partner2/group-repo

NOTE: The only required header here is repository_url

NOTE: All repository urls are assumed to be valid. It's ok if they point to certain branches (i.e. urls with "repo_name/tree/branch_name")

Download all the repos:

python app/repo_downloader.py # this will populate the `repos` directory!

File Analysis

Populate the db/files_expected.csv file with a list of files and/or directories each repository should contain, for example:

filepath
.env.example
LICENSE
README.md
products_app/app.py
products_app/db/products_default.csv
tests

Analyze contents of each repo to detect presence of files at specified locations:

python app/file_checker.py # this will write a report to `db/file_checks.csv`

History Viewing

View in a browser the version history of each repo:

python -m app.history_viewer

History Analysis

Populate the db/authors_excluded.csv to exclude professor commits in starter repos:

author_name
Polly Professor
Tommy TA

Populate the db/users_authors.csv file to specify a GitHub username for each non-username author name, so commits by the same username under different author names will be rolled-up into the same username:

username, author_name
user123, First User
user456, Nickname Lastname
user456, Fullfirst Lastname
user789, Firstname

Analyze the version history for each repo:

python -m app.history_checker # this will write a report to `db/histories_checked.csv`

Running Tests for Submissions

Run tests for each submission separately:

for dir in ~/Desktop/grading-your-dir-here/*; do (cd "$dir" && pwd && pytest && cd ..); done

# with sleep:
for dir in ~/Desktop/grading-cleanup/*; do (cd "$dir" && pwd && pytest && cd .. && sleep 5); done

Testing

Run tests:

pytest tests/ # specify filepath to exclude tests from downloaded repos

About

Downloads student project repositories for further evaluation. Also analyzes repo contents and version histories.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages