diff --git a/src/unitgrade_private/hidden_gather_upload.py b/src/unitgrade_private/hidden_gather_upload.py index 773afee9af8f3a789263ca913b4b498696713af3..6ce9fa61876108bc55a02a44ba6ba37a767b1c0f 100644 --- a/src/unitgrade_private/hidden_gather_upload.py +++ b/src/unitgrade_private/hidden_gather_upload.py @@ -115,7 +115,6 @@ def gather_upload_to_campusnet(report, output_dir=None, token_include_plaintext_ s = f.read() from unitgrade.utils import checkout_remote_results - results = checkout_remote_results(report.remote_url, s.strip()) if results['html'] is None: print("""Oy! I failed to download the verified results. @@ -137,7 +136,7 @@ for more information about what happened to your evaluation. Please don't contac print("These scores are based on our internal tests.") print("To see all your results, visit:") print(">", results['url']) - print("Your total score was", results['total']) + print("Your total score was", results['score']) sys.exit() # import tabulate # print( tabulate.tabulate(df, showindex=False) ) diff --git a/src/unitgrade_private/pipelines/dummy_handins.py b/src/unitgrade_private/pipelines/dummy_handins.py index f294c2d69be0b0d7fdbde8f54aae320ad2051a70..7466bb9f6c7942532f0041d3b11335d87c2d8c39 100644 --- a/src/unitgrade_private/pipelines/dummy_handins.py +++ b/src/unitgrade_private/pipelines/dummy_handins.py @@ -4,37 +4,30 @@ import shutil import numpy as np import glob import subprocess +import tempfile + def make_dummies(zip_file_path="zip1.zip", n_handins=3, screwups=4, student_base_dir=None, student_grade_file=None, instructor_base_dir=None): # I am dum-dum. dir = os.path.dirname(__file__) - import tempfile - # tmp = tempfile.tempdir - with tempfile.TemporaryDirectory() as tmp: - # tmp = dir + "/tmp" if os.path.isdir(tmp): shutil.rmtree(tmp) os.mkdir(tmp) print("Working in directory", tmp) - # now we got a temp dir. # Deploy to this dir and create handins. Turn it all into a .zip file and return it. np.random.seed(42) - manifests = {} def copy_and_mutate(): if os.path.isdir(tmp + "/students"): shutil.rmtree(tmp + "/students") - shutil.copytree(student_base_dir, tmp + "/students",dirs_exist_ok=True) # Copy instructor files over and mutate. for file in glob.glob(student_base_dir +"/**/*.py"): - # print(file) - rel = os.path.relpath(file, student_base_dir) with open(tmp +"/students/"+rel, 'r') as f: st_f = f.read() @@ -96,17 +89,3 @@ def make_dummies(zip_file_path="zip1.zip", n_handins=3, screwups=4, student_base shutil.make_archive(zip_file_path[:-4], 'zip', tmp + "/zip", '') return zip_file_path, manifests - - - # zipfolder('zip1', tmp + "/zip/"+handin_folder) # insert your variables here - # sys.exit() - - # - # import zipfile - # - # with zipfile.ZipFile(zip_file_path, 'w') as zip: - # zip. - # - # - # a = 234 - # pass \ No newline at end of file diff --git a/src/unitgrade_private/version.py b/src/unitgrade_private/version.py index 6d389d766ffd9af8e060cd8b7e0326c77dd9c1ac..cc97862eb7630756540e299a2b26c419e2bffd32 100644 --- a/src/unitgrade_private/version.py +++ b/src/unitgrade_private/version.py @@ -1,2 +1,2 @@ -__version__ = "0.1.55" +__version__ = "0.1.56"