import argparse

from autograder.controller import setup, grade_project

def main():
    """
    Main method for the autograder
    """
    options = parse_args()

    #Set up for the project
    settings = setup.parse_settings(options)
    setup.setup_logging(settings)
    setup.prepare_enviroment(settings)
    setup.build_tests(settings)

    #Grade the results
    grade_project.grade(settings)

def parse_args():
    """
    Parse the argument file for the appropriate options

    Command line options always override options in the config file
    """
    parser = argparse.ArgumentParser(prog="Auto Grader")
    parser.add_argument('config_file', type=argparse.FileType('r'),
                        help='A path to the main configuration file', required=True)
    return parser.parse_args()

import argparse

from autograder.controller import setup, grade_project

def main():
    """
    Main method for the autograder
    """
    options = parse_args()

    #Set up for the project
    settings = setup.parse_settings(options)
    setup.setup_logging(settings)

    #Grade the results
    grade_project.grade(settings)

def parse_args():
    """
    Parse the argument file for the appropriate options

    Command line options always override options in the config file
    """
    parser = argparse.ArgumentParser(prog="Auto Grader")
    parser.add_argument('config_file', type=argparse.FileType('r'),
                        help='A path to the main configuration file', required=True)
    return parser.parse_args()

if __name__ == "__main__":
    main()

Clean up of main module
Clean up of main module

Moved two commands to the grade_project script.  Added copyright
statement.

  import argparse
  
  from autograder.controller import setup, grade_project
  
  def main():
      """
      Main method for the autograder
      """
      options = parse_args()
  
      #Set up for the project
      settings = setup.parse_settings(options)
      setup.setup_logging(settings)
-     setup.prepare_enviroment(settings)
-     setup.build_tests(settings)
  
      #Grade the results
      grade_project.grade(settings)
  
  def parse_args():
      """
      Parse the argument file for the appropriate options
  
      Command line options always override options in the config file
      """
      parser = argparse.ArgumentParser(prog="Auto Grader")
      parser.add_argument('config_file', type=argparse.FileType('r'),
                          help='A path to the main configuration file', required=True)
      return parser.parse_args()
  
+ if __name__ == "__main__":
+     main()
+ 
Clean up of main module
## Code Before:
import argparse

from autograder.controller import setup, grade_project

def main():
    """
    Main method for the autograder
    """
    options = parse_args()

    #Set up for the project
    settings = setup.parse_settings(options)
    setup.setup_logging(settings)
    setup.prepare_enviroment(settings)
    setup.build_tests(settings)

    #Grade the results
    grade_project.grade(settings)

def parse_args():
    """
    Parse the argument file for the appropriate options

    Command line options always override options in the config file
    """
    parser = argparse.ArgumentParser(prog="Auto Grader")
    parser.add_argument('config_file', type=argparse.FileType('r'),
                        help='A path to the main configuration file', required=True)
    return parser.parse_args()

## Instruction:
Clean up of main module
## Code After:
import argparse

from autograder.controller import setup, grade_project

def main():
    """
    Main method for the autograder
    """
    options = parse_args()

    #Set up for the project
    settings = setup.parse_settings(options)
    setup.setup_logging(settings)

    #Grade the results
    grade_project.grade(settings)

def parse_args():
    """
    Parse the argument file for the appropriate options

    Command line options always override options in the config file
    """
    parser = argparse.ArgumentParser(prog="Auto Grader")
    parser.add_argument('config_file', type=argparse.FileType('r'),
                        help='A path to the main configuration file', required=True)
    return parser.parse_args()

if __name__ == "__main__":
    main()
