Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arubacao/stager
Stager is a tool designed to help ls1intum tutors streamline code homework correction submitted to ArTEMiS
https://github.com/arubacao/stager
artemis git tum
Last synced: 11 days ago
JSON representation
Stager is a tool designed to help ls1intum tutors streamline code homework correction submitted to ArTEMiS
- Host: GitHub
- URL: https://github.com/arubacao/stager
- Owner: arubacao
- License: mit
- Created: 2018-05-23T11:59:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T18:01:46.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T01:54:43.590Z (5 months ago)
- Topics: artemis, git, tum
- Language: Go
- Homepage: https://artemis.ase.in.tum.de/
- Size: 754 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stager
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Travis](https://img.shields.io/travis/arubacao/stager.svg?style=flat-square)](https://travis-ci.org/arubacao/stager)
[![Go Report Card](https://goreportcard.com/badge/github.com/arubacao/stager?style=flat-square)](https://goreportcard.com/report/github.com/arubacao/stager)
[![Godoc](https://godoc.org/github.com/arubacao/stager?status.svg&style=flat-square)](http://godoc.org/github.com/arubacao/stager)`stager` is a tool designed to help [ls1intum](https://wwwbruegge.in.tum.de/lehrstuhl_1/) tutors streamline code homework correction submitted to [ArTEMiS](https://artemis.ase.in.tum.de).
It downloads and prepares a selected list of student repositories to your local machine.## Features
- Download selected list of student repositories
- Append student names to folder names
- Remove code committed after the deadline
- Squash student commits into a single commit
- Rename project names for better overview in Eclipse
- Dead-simple and reusable configuration
- Automatic build pipeline for cross-platform executables [(see here)](http://github.com/arubacao/stager/releases)### More Info
_Note: We do not collect or process any information. Displayed student names and identifiers are fake. We are compliant with the General Data Protection Regulation (GDPR)._
#### Append student names to repo folders
![Rename Repos](/assets/rename-folders.png?raw=true "rename repos")
#### Enforce deadline
Some students try to add more commits after the deadline.
`stager` removes late commits.
_Note: This is not bullet proof, since git timestamps can be manipulated!_
![Enforce deadline](/assets/due-date.png?raw=true "Enforce deadline")#### Squash student commits
Students add code to an existing codebase provided from the instructors.
It is a lot easier to correct their homework, if the changes made by the students are immediately visible.
Therefore, the tools squashes commits after a giving SHA hash. The original history is still available.
![Squash commits](/assets/squash.png?raw=true "Squash student commits")#### Rename Eclipse project names
It is confusing when you open 10 projects with identical names in Eclipse.
Therefore, the tools renames each project and appends the students name and identifier.
![Rename projects](/assets/rename-project.png?raw=true "Rename eclipse project name")## Install
### Pre-compiled executables (recommended)
Get them [here](http://github.com/arubacao/stager/releases).### Source
You need `go` installed and `GOBIN` in your `PATH`. Once that is done, run the
command from the repos root folder:
```shell
$ go get -d -t -v ./...
$ go run main.go
```## Configuration
### config.jsonRename `example.config.json` to `config.json`
```$shell
cp example.config.json config.json
``````$json
{
// Copy & paste the url for the repo from https://artemis.ase.in.tum.de
// The first 2 %s are placeholders for your TUM credentials
// The last %s is a placeholder for the students LRZ id
"url": "https://%s:%[email protected]/scm/eist2018l02bumperss03/eist2018-l02-bumpers-sprint03-exercise-%s.git",
// Your LRZ id
"username": "tutor-lrz-idga12dub",
// Your TUM password
"password": "my-secret-password",
// The homework deadline in 'Y-m-d H:i:s' (DateTime)
"deadline": "2018-29-04 23:59:59",
// The SHA hash of Stephan Krusches last commit
"squash_after": "47ad218377d8b2509c6293823cc6ff2f87ca770a"
}
```### students.csv
Rename `example.students.csv` to `students.csv`
```$shell
cp example.students.csv students.csv
```Open the first and add your students LRZ ids and names
```$csv
name,id
John Doe,ga77ugu
...
```## Usage
1. Place the executable, `config.json` and `students.csv` into a desired folder.
2. a) double click the executable or b) execute from terminal (recommended)
```$bash
$ cd ~/homework3correction
$ ./stager
```
3. ...
4. Profit## Implementation
The different operations have been implement with the help of the strategy pattern (s. illustration below).
By Vanderjoe - Own work, CC BY-SA 4.0, LinkThe different operations/strategies are:
1. PullOperation
PullOperation ensures that each accessible repository is up-to-date
and in a clean state. This is useful for already locally available repo folders.
2. DeadlineOperation
DeadlineOperation ensures that commits after a given deadline are not applied in the local repository.
This is useful, since BitBucket does not enforce any deadline whatsoever.
3. SquashOperation
SquashOperation squashes all commits after a given SHA hash.
This is useful to visualise all changes a student made in a single commit.
4. RenameProjectOperation
RenameProjectOperation renames the project name for better overview in Eclipse.