Skip to content
Snippets Groups Projects
Select Git revision
  • 036f25c16b8f8b9f418ed38fb532c6dacab95f49
  • main default protected
2 results

shamalloc.c

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    autolab_courses.py 3.59 KiB
    from unitgrade_private.autolab.autolab import new_deploy_assignment
    from unitgrade_private.docker_helpers import download_docker_images
    from unitgrade_private.docker_helpers import compile_docker_image
    
    if __name__ == "__main__":
        ## Step 1. Deploy the report file.
        # from report2_test import Report2
        from looping_tests import Report1Flat
        from stones_tests import StoneReport
        from unitgrade_private.hidden_create_files import setup_grade_file_report
        from snipper.snip_dir import snip_dir
        from unitgrade import version
        # print("version", version.__version__)
        # Set up the instructor _grade script and all files needed for the tests.
    
        setup_grade_file_report(Report1Flat, with_coverage=False, bzip=True)
        setup_grade_file_report(StoneReport, with_coverage=False, bzip=True)
        snip_dir("../02105/instructor/week2", "../02105/students/week2", clean_destination_dir=True, exclude=['*.token', 'deploy*.py', '*_grade.py', 'tmp', '*.tar'])
        snip_dir("../02631/instructor/week5", "../02631/students/week5", clean_destination_dir=True, exclude=['*.token', 'deploy*.py', '*_grade.py', 'tmp', '*.tar'])
    
        # Step 1: Download and compile docker grading image. You only need to do this once.  #!s=a
        download_docker_images("./docker") # Download docker images from gitlab (only do this once).
        dockerfile = f"./docker/docker_tango_python/Dockerfile"
        autograde_image = 'tango_python_tue2'  # Tag given to the image in case you have multiple images.
        compile_docker_image(Dockerfile=dockerfile, tag=autograde_image, no_cache=False)  # Compile docker image. #!s
    
        # Step 2: Create the cs102.tar file from the grade scripts. #!s=b
        instructor_base = f"../02105/instructor/week2"
        student_base = "../02105/students/week2"
    
        # INSTRUCTOR_GRADE_FILE =
        description = """ Hand in the file stones.py. You can find the full example, including solution, at https://gitlab.compute.dtu.dk/tuhe/unitgrade_private/-/tree/master/examples/02105/instructor/week2 """
        # description = "This is the stones-problem"
        output_tar = new_deploy_assignment("c02105week2",  # Autolab name of assignment (and name of .tar file)
                                       INSTRUCTOR_BASE=instructor_base,
                                       INSTRUCTOR_GRADE_FILE=f"{instructor_base}/stones_tests_grade.py",
                                       STUDENT_BASE=student_base,
                                       autograde_image_tag=autograde_image,
                                       homework_file="stones.py",
                                       description=description)
    
        instructor_base = f"../02631/instructor/week5"
        student_base = "../02631/students/week5"
    
        # INSTRUCTOR_GRADE_FILE =
        description = """ Hand in the file stones.py. You can find the full example, including solution, at https://gitlab.compute.dtu.dk/tuhe/unitgrade_private/-/tree/master/examples/02631/instructor/week5 """
        # description = "This is the stones-problem"
        output_tar = new_deploy_assignment("c02631week5",  # Autolab name of assignment (and name of .tar file)
                                           INSTRUCTOR_BASE=instructor_base,
                                           INSTRUCTOR_GRADE_FILE=f"{instructor_base}/looping_tests_grade.py",
                                           STUDENT_BASE=student_base,
                                           autograde_image_tag=autograde_image,
                                           homework_file="looping.py",
                                           description=description)
    
        # STUDENT_GRADE_FILE=f"{instructor_base}/stones_tests_grade.py",
        # What can you do? Get a report class from the .token file?