To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

README.md 2.81 KB
Newer Older
scmalte's avatar
scmalte committed
1
2
# mossutils

scmalte's avatar
scmalte committed
3
A collection for useful scripts for working with Moss in the context of ETH (eDoz) and Code Expert.
scmalte's avatar
scmalte committed
4
5
6

## Installation

scmalte's avatar
scmalte committed
7
8
9
10
```shell
$ pip install --upgrade git+https://gitlab.ethz.ch/scmalte/mossutils.git
...
Successfully installed [...] mossutils [...]
scmalte's avatar
scmalte committed
11
```
scmalte's avatar
scmalte committed
12
13
14
15
16
17
18

Argument `--upgrade` (re)installs the package, even if the version number hasn't changed.

## Usage

**TODO:** Add instructions for how to obtain and prepare the involved data. See also `preprocessing/README.md`.

scmalte's avatar
scmalte committed
19
20
**NOTE:** Create a directory per exercise to check, and keep the submissions in a subdirectory thereof. E.g. `~/moss_ex1/ex1` (see also step 2 further down).

scmalte's avatar
scmalte committed
21
1. Obtain and prepare data, see `preprocessing/README.md`.
scmalte's avatar
scmalte committed
22

scmalte's avatar
scmalte committed
23
24
1. Open a shell one level above the directory that contains the user submissions, i.e. the `<user>` directories from `preprocessing/README.md`. E.g. if you have `~/moss_ex1/ex1/<user>`, then `cd ~/moss_ex1`. Afterwards, run `mu-init` to create a directory (`_static`) with files necessary for the next steps (e.g. for the final HTML report).

scmalte's avatar
scmalte committed
25
1. Run `mu-moss --help` for options that can/must be configured. Afterwards, run `mu-moss` as desired, e.g. `mu-moss -u 1234 -n 300 "./ex1/*/main.cpp"`.
scmalte's avatar
scmalte committed
26

scmalte's avatar
scmalte committed
27
   `mu-moss` connects to the Moss service, uploads submissions and downloads the generated report. This may take a while, and will probably not work for large `-n` values (3000 worked for me, 10,000 didn't).
scmalte's avatar
scmalte committed
28
29
30
31
32
33
34
35
36

1. Run `mu-revise`.

   **NOTE:** `mu-revise` is not yet configurable and expects `mu-moss` to have used its default file and directory names!

   `mu-revise` improves the previously downloaded HTML report, e.g. by making the table sortable, and generates a CSV file with the report data.

1. Run `mu-cluster`.

scmalte's avatar
scmalte committed
37
   **NOTE:** `mu-cluster` is not yet *fully* configurable and expects `mu-revise` to have used its default file and directory names! Run `mu-cluster --help` for options that can already be configured.
scmalte's avatar
scmalte committed
38
39
40
41
42
43
44
45
46

   `mu-cluster` computes clusters of plagiarism, creates as DOT and SVG files (by running GraphViz, which *must be in the path*), and creates a summarising CSV file.

1. Run `mu-aggr`.

   **NOTE:** `mu-aggr` is not yet configurable and expects `mu-cluster` to have used its default file and directory names!

   `mu-aggr` combines the cluster data with exports from eDoz and Code Expert, and generates a cluster report as an HTML file.

scmalte's avatar
scmalte committed
47
48
49
50
   * Code Expert export: `My Courses -> Students (Student Overview) -> Export to CSV` and save `./cx_students.csv`

   * eDoz exports: **TODO:** `mu-aggr` is currently not reusable, since eDoz export files are hardcoded. Must make them configurable!

scmalte's avatar
scmalte committed
51
52
53
54
55
56
57
## Python Package Tutorials

I've used the following tutorials to get started with developing a Python package:

* https://python-packaging.readthedocs.io/en/latest/minimal.html

* https://dev.to/rf_schubert/how-to-create-a-pip-package-and-host-on-private-github-repo-58pa