import os
import yaml


class GraderConfigException(Exception):
    pass


class GraderConfig(object):
    CONFIG_FILE_NAME = "grader.yml"

    @classmethod
    def new(cls, path, course_name, course_id):
        config_path = os.path.join(path, cls.CONFIG_FILE_NAME)
        header = "# grader configuration for {}\n\n".format(course_name)
        config = {
            "course-id": course_id,
            "course-name": course_name,
        }

        with open(config_path, 'w') as config_file:
            config_file.write(header)
            config_file.write(yaml.dump(config, default_flow_style=False))

    @property
    def file_path(self):
        return os.path.join(self.path, self.__class__.CONFIG_FILE_NAME)

    def __init__(self, path):
        self.path = path

        if not os.path.exists(self.file_path):
            raise GraderConfigException("Grader configuration file doesn't exist!")

        with open(self.file_path) as config_file:
            self.data = yaml.load(config_file)

    def __getitem__(self, name):
        return self.data[name]

@@ -78,27 +78,283 @@
 ass 
-GraderConfig(object
+AssignmentConfigException(Exception):%0A    pass%0A%0A%0Aclass Config(object):%0A%0A    @property%0A    def file_path(self):%0A        return os.path.join(self.path, self.__class__.CONFIG_FILE_NAME)%0A%0A    def __getitem__(self, name):%0A        return self.data%5Bname%5D%0A%0A%0Aclass GraderConfig(Config
 ):%0A 
@@ -566,18 +566,16 @@
 for %7B%7D%5Cn
-%5Cn
 %22.format
@@ -868,113 +868,27 @@
     
-@property%0A    def file_path(self):%0A        return os.path.join(self.path, self.__class__.CONFIG_FILE_NAME
+    return cls(path
 )%0A%0A 
@@ -1176,38 +1176,651 @@
 e)%0A%0A
-    def __getitem__(self, name
+%0Aclass AssignmentConfig(Config):%0A    CONFIG_FILE_NAME = %22assignment.yml%22%0A%0A    @classmethod%0A    def new(cls, path, assignment_name):%0A        config_path = os.path.join(path, cls.CONFIG_FILE_NAME)%0A        header = %22# assignment configuration for %7B%7D%5Cn%22.format(assignment_name)%0A        config = %7B%0A            %22assignment-name%22: assignment_name%0A        %7D%0A%0A        with open(config_path, 'w') as config_file:%0A            config_file.write(header)%0A            config_file.write(yaml.dump(config, default_flow_style=False))%0A%0A        return cls(path)%0A%0A    def __init__(self, path):%0A        self.path = path%0A%0A        if not os.path.exists(self.file_path
 ):%0A 
@@ -1826,31 +1826,190 @@
         
+ 
-return self.data%5Bname%5D
+   raise AssignmentConfigException(%22Assignment configuration file doesn't exist!%22)%0A%0A        with open(self.file_path) as config_file:%0A            self.data = yaml.load(config_file)
 %0A

Add AssignmentConfig class