stager
is a tool designed to help ls1intum tutors streamline code homework correction submitted to ArTEMiS.
It downloads and prepares a selected list of student repositories to your local machine.
- 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)
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).
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!
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.
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.
Get them here.
You need go
installed and GOBIN
in your PATH
. Once that is done, run the
command from the repos root folder:
$ go get -d -t -v ./...
$ go run main.go
Rename example.config.json
to config.json
cp example.config.json config.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"
}
Rename example.students.csv
to students.csv
cp example.students.csv students.csv
Open the first and add your students LRZ ids and names
name,id
John Doe,ga77ugu
...
- Place the executable,
config.json
andstudents.csv
into a desired folder. - a) double click the executable or b) execute from terminal (recommended)
$ cd ~/homework3correction $ ./stager
- ...
- Profit
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:
- 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. - 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. - SquashOperation
SquashOperation squashes all commits after a given SHA hash. This is useful to visualise all changes a student made in a single commit. - RenameProjectOperation
RenameProjectOperation renames the project name for better overview in Eclipse.