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: 2 months 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T18:01:46.000Z (over 7 years ago)
- Last Synced: 2025-08-23T19:30:47.945Z (10 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
[](LICENSE.md)
[](https://travis-ci.org/arubacao/stager)
[](https://goreportcard.com/report/github.com/arubacao/stager)
[](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

#### 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!_

#### 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.

#### 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.

## 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.json
Rename `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:%s@repobruegge.in.tum.de/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, Link
The 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.