README.md 2.68 KB
Newer Older
1
# Personal Prof
Markus Klinik's avatar
Markus Klinik committed
2
3
4

Rascal implementation of a simple rule checker for student Java assignments.

Markus Klinik's avatar
README    
Markus Klinik committed
5
6
7


## Running the rule checker
Markus Klinik's avatar
Markus Klinik committed
8
9
10
11
12
13
14

1. Download the latest rascal-shell-unstable.jar from the rascal website and
   put it next to the run.sh script
   http://update.rascal-mpl.org/console/rascal-shell-unstable.jar

1. Run the script

Markus Klinik's avatar
Markus Klinik committed
15
        $ ./run.sh <two-digit-assignment-nr> <absolute-path-to-student-project>
Markus Klinik's avatar
README    
Markus Klinik committed
16

Markus Klinik's avatar
Markus Klinik committed
17
18
   For example

Markus Klinik's avatar
Markus Klinik committed
19
20
21
22
        $ ./run.sh 02 /home/mkl/radboud/teaching/object-orientation/oo-grading-2019/assignment02/thout/70827-16116\ -\ Asgn\ CS\ Group\ 125\ -\ Jordy\ Schoolmeesters\ -\ Feb\ 10\,\ 2019\ 22_55/
        Version: 0.13.0-SNAPSHOT
        error("All I/O should happen in the view class",|java+class:///a2/Gallows|)
        error("Always explicitly specify access modifiers: public, protected, or private",|java+field:///a2/User/input|)
Markus Klinik's avatar
README    
Markus Klinik committed
23
24


Markus Klinik's avatar
README    
Markus Klinik committed
25
26


Markus Klinik's avatar
README    
Markus Klinik committed
27
28
29
30
31
32
33
34
## Running the test cases

There are some test projects and test cases to check that the rules give
correct error messages. To run the tests, use the test script. The test script
looks for all files `*Spec.rsc` and executes them

        $ ./test.sh

Markus Klinik's avatar
README    
Markus Klinik committed
35
To test only specific files, specify them on the command line.
Markus Klinik's avatar
README    
Markus Klinik committed
36
37
38
39

        $ ./test.sh Assignment02RulesSpec.rsc Assignment03RulesSpec.rsc


Markus Klinik's avatar
README    
Markus Klinik committed
40
41
42
43
44
45
46
47
48


## Developing the rules

To develop rascal code, use eclipse-rcp. Follow the instructions here:
https://www.rascal-mpl.org/start/



Markus Klinik's avatar
README    
Markus Klinik committed
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Running The Brightspace Integration

1. Clone repository

        $ git clone --recurse-submodules https://gitlab.science.ru.nl/mklinik/personal-prof.git
        $ cd personal-prof

3. Optional: Run tests

        $ ./test.sh

4. Create config directories

        $ mkdir -p ~/.config/grading-tools
        $ mkdir -p ~/.config/personal-prof

5. Copy config files to config direcotries

        $ cd brightspace-integration
        $ cp app.json.config ~/.config/personal-prof
        $ cp brightspace-grading-tool/grading-tool-python/app.json.config.default ~/.config/grading-tools/app.json.config

6. Edit config files

        $ vim ~/.config/personal-prof/app.json.config
        $ vim ~/.config/grading-tools/app.json.config

7. Install d2lvalence python module

        $ pip3 install D2LValence

8. Log in

        $ cd brightspace-grading-tool/grading-tool-python/
        $ ./no-bs login-manual

9. See if it works

        $ ./no-bs list-courses
        $ ./no-bs list-folders <course-id>

9. Start the server

        $ export PYTHONPATH=`readlink -f brightspace-grading-tool/grading-tool-python`
        $ screen
        $ ./personal-prof run ...

Markus Klinik's avatar
README    
Markus Klinik committed
96

Markus Klinik's avatar
README    
Markus Klinik committed
97
98
99
100
101
## References

- Rascal official website https://www.rascal-mpl.org/
- Rascal github https://github.com/usethesource/rascal
- Rascal documentation http://tutor.rascal-mpl.org/Rascal/Rascal.html