README.md 2.01 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
1. Obtain and prepare data, see `preprocessing/README.md`.
scmalte's avatar
scmalte committed
20

scmalte's avatar
scmalte committed
21
1. Run `mu-moss --help` for arguments 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
22

scmalte's avatar
scmalte committed
23
   `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
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

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

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

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

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