Commit ae5fd970 authored by scmalte's avatar scmalte

Updated READMEs

parent 003c781d
...@@ -16,8 +16,12 @@ Argument `--upgrade` (re)installs the package, even if the version number hasn't ...@@ -16,8 +16,12 @@ Argument `--upgrade` (re)installs the package, even if the version number hasn't
**TODO:** Add instructions for how to obtain and prepare the involved data. See also `preprocessing/README.md`. **TODO:** Add instructions for how to obtain and prepare the involved data. See also `preprocessing/README.md`.
**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).
1. Obtain and prepare data, see `preprocessing/README.md`. 1. Obtain and prepare data, see `preprocessing/README.md`.
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).
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"`. 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"`.
`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). `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).
......
...@@ -9,11 +9,53 @@ ...@@ -9,11 +9,53 @@
## Tidying up files and directories ## Tidying up files and directories
### v2 (CX course export with cherrypicked submissions)
* Assumptions:
* `./<exercise>/<user>` are the individual user directories, e.g. `bonus_exercise_1/scmalte`
* Relevant files per submission are `<user>/submission_<timestamp1>/<timestamp2>_details.json` and `<user>/submission_<timestamp1>/project/main.cpp`, whereas all other files and directories can be deleted
* Delete irrelevant files, and directory `cx_description`:
```plain
$ cd ./bonus_exercise_1
$ find -type f ! \( -iname *_details.json -or -iname main.cpp \) -delete -print
$ find . -type d -iname cx_description -print -delete
```
* Move `<user>/submission_<timestamp1>/<timestamp2>_details.json` to `<user>/details.json`
```plain
$ cd ./bonus_exercise_1
$ find . -type f -iname *_details.json -print -execdir mv {} ../details.json \;
```
* Move `<user>/submission_<timestamp1>/project/main.cpp` to `<user>/main.cpp`, and then delete the (now empty) directory `<user>/submission_<timestamp1>`:
```plain
$ cd ./bonus_exercise_1
$ find . -type f -iname main.cpp -print -execdir mv {} ../../main.cpp \;
$ find . -type d -iname submission_* -print -execdir rm -rf \{\} + \;
```
**Note:** The last command may produce errors such as `.../project: No such file or directory`, which can be ignored.
* Now, each `<user>` directory should only have two files in it: `<user>/main.cpp` and `<user>/details.json`
### v1 (Manual export obtained from CX devs)
* `cx-dump_bonus-exercise-1_2020-04-17.zip` contains the latest submission from each user * `cx-dump_bonus-exercise-1_2020-04-17.zip` contains the latest submission from each user
* Execute commands on the level of the user directories, e.g. in `./bonus_exercise_1`, so that, e.g. `./bonus_exercise_1/<user>` are the individual user directories * Execute commands on the level of the user directories, e.g. in `./bonus_exercise_1`, so that, e.g. `./bonus_exercise_1/<user>` are the individual user directories
* Assumption: relevant files per submission are `<user>/details.json` and `<user>/files/main.cpp`, whereas all other files and directories can be deleted: * Assumption: relevant files per submission are `<user>/details.json` and `<user>/files/main.cpp`, whereas all other files and directories can be deleted
* Delete irrelevant files, and directory `cx_data`: * Delete irrelevant files, and directory `cx_data`:
...@@ -50,3 +92,4 @@ ...@@ -50,3 +92,4 @@
``` ```
The script prompts for confirmation before the first renaming is executed. The script prompts for confirmation before the first renaming is executed.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment