@@ -39,6 +39,22 @@ instructor/cs101/deploy.py # A private file to deploy the tests
...
@@ -39,6 +39,22 @@ instructor/cs101/deploy.py # A private file to deploy the tests
### The homework
### The homework
The homework is just any old python code you would give to the students. For instance:
The homework is just any old python code you would give to the students. For instance:
```python
```python
defreverse_list(mylist):#!f
"""
Given a list 'mylist' returns a list consisting of the same elements in reverse order. E.g.
reverse_list([1,2,3]) should return [3,2,1] (as a list).
"""
returnlist(reversed(mylist))
defadd(a,b):#!f
""" Given two numbers `a` and `b` this function should simply return their sum:
> add(a,b) = a+b """
returna+b
if__name__=="__main__":
# Example usage:
print(f"Your result of 2 + 2 = {add(2,2)}")
print(f"Reversing a small list",reverse_list([2,3,5,7]))
```
```
### The test:
### The test:
...
@@ -60,6 +76,28 @@ class Week1(unittest.TestCase):
...
@@ -60,6 +76,28 @@ class Week1(unittest.TestCase):
```
```
A number of tests can be collected into a `Report`, which will allow us to assign points to the tests and use the more advanced features of the framework later. A complete, minimal example:
A number of tests can be collected into a `Report`, which will allow us to assign points to the tests and use the more advanced features of the framework later. A complete, minimal example:
@@ -5,8 +5,8 @@ Unitgrade is an automatic report and exam evaluation framework that enables inst
...
@@ -5,8 +5,8 @@ Unitgrade is an automatic report and exam evaluation framework that enables inst
Unitgrade is build on pythons `unittest` framework so that the tests can be specified in a familiar syntax and will integrate with any modern IDE. What it offers beyond `unittest` is the ability to collect tests in reports (for automatic evaluation) and an easy and 100% safe mechanism for verifying the students results and creating additional, hidden tests. A powerful cache system allows instructors to automatically create test-answers based on a working solution.
Unitgrade is build on pythons `unittest` framework so that the tests can be specified in a familiar syntax and will integrate with any modern IDE. What it offers beyond `unittest` is the ability to collect tests in reports (for automatic evaluation) and an easy and 100% safe mechanism for verifying the students results and creating additional, hidden tests. A powerful cache system allows instructors to automatically create test-answers based on a working solution.
- 100% Python `unittest` compatible
- 100% Python `unittest` compatible
- No external configuration files: Just write a `unittest`
- No configuration files
- No unnatural limitations: Use any package or framework. If you can `unittest` it, it works.
- No limitations: If you can `unittest` it, it works
- Tests are quick to run and will integrate with your IDE
- Tests are quick to run and will integrate with your IDE
- Cache and hint-system makes tests easy to develop
- Cache and hint-system makes tests easy to develop
- Granular security model:
- Granular security model:
...
@@ -39,7 +39,7 @@ instructor/cs101/deploy.py # A private file to deploy the tests
...
@@ -39,7 +39,7 @@ instructor/cs101/deploy.py # A private file to deploy the tests
### The homework
### The homework
The homework is just any old python code you would give to the students. For instance:
The homework is just any old python code you would give to the students. For instance:
The test consists of individual problems and a report-class. The tests themselves are just regular Unittest (we will see a slightly smarter idea in a moment). For instance:
The test consists of individual problems and a report-class. The tests themselves are just regular Unittest (we will see a slightly smarter idea in a moment). For instance:
...
@@ -60,14 +60,14 @@ class Week1(unittest.TestCase):
...
@@ -60,14 +60,14 @@ class Week1(unittest.TestCase):
```
```
A number of tests can be collected into a `Report`, which will allow us to assign points to the tests and use the more advanced features of the framework later. A complete, minimal example:
A number of tests can be collected into a `Report`, which will allow us to assign points to the tests and use the more advanced features of the framework later. A complete, minimal example:
```python
```python
{{example_simplest_instructor_report1_py}}
{{example_simplest_instructor_cs101_report1_py}}
```
```
### Deployment
### Deployment
The above is all you need if you simply want to use the framework as a self-check: Students can run the code and see how well they did.
The above is all you need if you simply want to use the framework as a self-check: Students can run the code and see how well they did.
In order to begin using the framework for evaluation we need to create a bit more structure. We do that by deploying the report class as follows:
In order to begin using the framework for evaluation we need to create a bit more structure. We do that by deploying the report class as follows:
```python
```python
{{example_simplest_instructor_deploy_py}}
{{example_simplest_instructor_cs101_deploy_py}}
```
```
- The first line creates the `report1_grade.py` script and any additional data files needed by the tests (none in this case)
- The first line creates the `report1_grade.py` script and any additional data files needed by the tests (none in this case)
- The second line set up the students directory (remember, we have included the solutions!) and remove the students solutions. You can check the results in the students folder.
- The second line set up the students directory (remember, we have included the solutions!) and remove the students solutions. You can check the results in the students folder.