CHG update example configuration in docs
@@ -6,26 +6,31 @@ Example Configuration
.. code-block:: python
:caption: Example configuration
+
+ # Anubis Live Shell Assignment
+ # Generated: 2022-12-04 23:48:37.338640
+ # See documentation at https://anubis-lms.io/autograde/
+
import re
from anubis_autograde.models import Exercise, FileSystemCondition, ExistState
- start_message: str = '''echo hello world
- mkdir exercise1
- cd exercise1
- echo hello world > exercise.txt'''
+ start_message: str = ''''''
end_message: str = '''Congratulations! You have finished this assignment.'''
exercises: list[Exercise] = [
Exercise(
name='helloworld',
- hint_message='\ntype: echo "hello world"',
+ start_message='Write a command to print out hello "world"',
+ hint_message='echo "hello world"',
command_regex=re.compile(r'echo \'?"?[Hh]ello\s[Ww]orld!?\'?"?'),
output_regex=re.compile(r'[Hh]ello\s[Ww]orld!?'),
),
Exercise(
name='mkdir exercise1',
+ start_message='Create a "exercise1" directory',
+ hint_message='mkdir exercise1',
command_regex=re.compile(r'mkdir \'?"?exercise1?\'?"?'),
filesystem_conditions=[
FileSystemCondition(
@@ -37,10 +42,14 @@ Example Configuration
),
Exercise(
name='cd exercise1',
+ start_message='Change directory into the exercise1 directory',
+ hint_message='cd exercise1',
command_regex=re.compile(r'cd \'?"?exercise1\'?"?'),
),
Exercise(
name='pipe hello world',
+ start_message='Use the print command from earlier to pipe "hello world" into a file "exercise.txt"',
+ hint_message='echo hello world > exercise.txt',
command_regex=re.compile(r'echo \'?"?[Hh]ello\s[Ww]orld!?\'?"? > exercise.txt'),
cwd_regex=re.compile(r'.*/exercise1$'),
filesystem_conditions=[
@@ -53,4 +62,3 @@ Example Configuration
),
]
-
