Skip to content
Snippets Groups Projects
Commit 0325767a authored by Tue Herlau's avatar Tue Herlau
Browse files

Refactoring

parent c71c8f9b
No related branches found
No related tags found
No related merge requests found
Showing
with 151 additions and 48 deletions
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<module type="PYTHON_MODULE" version="4"> <module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<content url="file://$MODULE_DIR$/../unitgrade_private" />
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="TestRunnerService"> <component name="TestRunnerService">
<option name="projectConfiguration" value="py.test" />
<option name="PROJECT_TEST_RUNNER" value="py.test" /> <option name="PROJECT_TEST_RUNNER" value="py.test" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -2,12 +2,21 @@ ...@@ -2,12 +2,21 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5c346737-53d8-4e87-88c5-7be2c8e7baeb" name="Default" comment=""> <list default="true" id="5c346737-53d8-4e87-88c5-7be2c8e7baeb" name="Default" comment="">
<change afterPath="$PROJECT_DIR$/cs101courseware_example/cs101report1_grade.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/setup.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/unitgrade.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/unitgrade.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cs101courseware/cs101report1.py" beforeDir="false" afterPath="$PROJECT_DIR$/cs101courseware/cs101report1.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unitgrade/example/report0.py" beforeDir="false" afterPath="$PROJECT_DIR$/unitgrade/example/report0.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cs101courseware/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/cs101courseware_example/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cs101courseware/cs101report1.py" beforeDir="false" afterPath="$PROJECT_DIR$/cs101courseware_example/cs101report1.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cs101courseware/cs101report1_grade.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cs101courseware/homework1.py" beforeDir="false" afterPath="$PROJECT_DIR$/cs101courseware_example/homework1.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unitgrade/hidden_create_files.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/unitgrade/hidden_gather_upload.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/unitgrade/payloads/Report0/Report0.report" beforeDir="false" afterPath="$PROJECT_DIR$/unitgrade/payloads/Report0/Report0.report" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unitgrade/unitgrade.py" beforeDir="false" afterPath="$PROJECT_DIR$/unitgrade/unitgrade.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unitgrade_demo.mp4" beforeDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
...@@ -55,6 +64,14 @@ ...@@ -55,6 +64,14 @@
</file> </file>
</leaf> </leaf>
</component> </component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
<option value="Setup Script" />
</list>
</option>
</component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
...@@ -85,6 +102,7 @@ ...@@ -85,6 +102,7 @@
<option name="width" value="2066" /> <option name="width" value="2066" />
<option name="height" value="1122" /> <option name="height" value="1122" />
</component> </component>
<component name="ProjectId" id="1lVfx839vMJ5L98EHMDAmSH8B58" />
<component name="ProjectView"> <component name="ProjectView">
<navigator proportions="" version="1"> <navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
...@@ -109,25 +127,28 @@ ...@@ -109,25 +127,28 @@
</pane> </pane>
</panes> </panes>
</component> </component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../unitgrade_private" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="configurable.group.appearance" /> <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PythonContentEntriesConfigurable" />
</component> </component>
<component name="RunDashboard"> <component name="RecentsManager">
<option name="ruleStates"> <key name="CopyFile.RECENT_KEYS">
<list> <recent name="C:\Users\tuhe\Documents\unitgrade_private" />
<RuleState> </key>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" /> <key name="MoveFile.RECENT_KEYS">
</RuleState> <recent name="C:\Users\tuhe\Documents\unitgrade_private" />
<RuleState> </key>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component> </component>
<component name="RunManager" selected="Python.cs101report1"> <component name="RunManager" selected="Python.deploy_cs101 (1)">
<configuration name="cs101report1" type="PythonConfigurationType" factoryName="Python" temporary="true"> <configuration name="cs101report1" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="unitgrade" /> <module name="unitgrade" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
...@@ -146,6 +167,9 @@ ...@@ -146,6 +167,9 @@
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" /> <option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration> </configuration>
<configuration name="cs101report1_grade" type="PythonConfigurationType" factoryName="Python" temporary="true"> <configuration name="cs101report1_grade" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="unitgrade" /> <module name="unitgrade" />
...@@ -165,8 +189,11 @@ ...@@ -165,8 +189,11 @@
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" /> <option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration> </configuration>
<configuration name="homework1" type="PythonConfigurationType" factoryName="Python" temporary="true"> <configuration name="deploy_cs101 (1)" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="unitgrade" /> <module name="unitgrade" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" /> <option name="PARENT_ENVS" value="true" />
...@@ -174,30 +201,79 @@ ...@@ -174,30 +201,79 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
</envs> </envs>
<option name="SDK_HOME" value="" /> <option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/cs101courseware" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/../unitgrade_private/cs101courseware" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/../unitgrade_private/cs101courseware/deploy_cs101.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/cs101courseware/homework1.py" />
<option name="PARAMETERS" value="" /> <option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" /> <option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="deploy_cs101" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="unitgrade" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/../unitgrade_private/cs101courseware" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="C:\Users\tuhe\Documents\unitgrade_private\cs101courseware\deploy_cs101.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="unitgrade" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="unitgrade" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/unitgrade" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/unitgrade/unitgrade.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration> </configuration>
<list> <list>
<item itemvalue="Python.homework1" />
<item itemvalue="Python.cs101report1" /> <item itemvalue="Python.cs101report1" />
<item itemvalue="Python.cs101report1_grade" /> <item itemvalue="Python.cs101report1_grade" />
<item itemvalue="Python.unitgrade" />
<item itemvalue="Python.deploy_cs101" />
<item itemvalue="Python.deploy_cs101 (1)" />
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python.deploy_cs101 (1)" />
<item itemvalue="Python.deploy_cs101" />
<item itemvalue="Python.unitgrade" />
<item itemvalue="Python.cs101report1" /> <item itemvalue="Python.cs101report1" />
<item itemvalue="Python.cs101report1_grade" /> <item itemvalue="Python.cs101report1_grade" />
<item itemvalue="Python.homework1" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="SvnConfiguration"> <component name="SvnConfiguration">
<configuration /> <configuration />
</component> </component>
...@@ -242,12 +318,39 @@ ...@@ -242,12 +318,39 @@
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" /> <option name="version" value="1" />
</component> </component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsContentAnnotationSettings"> <component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" /> <option name="myLimit" value="2678400000" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
<option name="time" value="5" /> <breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/../unitgrade_private/unitgrade_private/hidden_create_files.py</url>
<line>104</line>
<option name="timeStamp" value="10" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/../unitgrade_private/cs101courseware/deploy_cs101.py</url>
<line>6</line>
<option name="timeStamp" value="12" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/unitgrade/unitgrade.py</url>
<line>154</line>
<option name="timeStamp" value="13" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager> </breakpoint-manager>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
......
...@@ -56,15 +56,3 @@ Once students are happy with the result, they run an alternative, not-easy-to-ta ...@@ -56,15 +56,3 @@ Once students are happy with the result, they run an alternative, not-easy-to-ta
python report1_grade.py python report1_grade.py
``` ```
This runs the same tests, and generates a file `cs101report1.token` which they upload to campusnet. This file contains the results of the report evaluation, the script output, and so on. This runs the same tests, and generates a file `cs101report1.token` which they upload to campusnet. This file contains the results of the report evaluation, the script output, and so on.
## How to develop tests
The framework is build around the build-in `unittest` framework in python. Using the framework therefore also familiarizes students with the use of automatic testing.
A unittest normally consist of three things:
- The result of the users code,
- The expected result,
- A comparison operation of the two which may either fail or succeed.
The comparisons are build on top of pythons `unittest` framework to obtain a wide variety of well-documented comparisons, and it is easy to write your own.
To get the expected result, one option (which is certainly possible) is to specify it yourself, however the recommended (and much easier option) is to maintain a working branch of the code with all the funtionality the students must implement and then **automatically** compute the expected output. In other words, we save the step of specifying the expected result, which also has the benefit we don't need to update expected output when the scripts change. The video contains a full working example of how a test is developed.
File deleted
File deleted
'''WARNING: Modifying, decompiling or otherwise tampering with this script, it's data or the resulting .token file will be investigated as a cheating attempt.
Note we perform manual and static analysis of the uploaded results.
'''
import bz2, base64
exec(bz2.decompress(base64.b64decode('QlpoOTFBWSZTWbrikToABTVfgERQUv9/8////+6////6YAYvvO5c7jLO7O3dmgOgNbCSJKeRo0ymjIynoMFPSPInqeobU0bKbTU0PU0PUyGg0Sp4GTTQT0p6NIybU9IxANAAADQAAcwmgNAaNGEaDEaYmTE0GEaBkAyYDTIkyaJpopsoNAAB6gGhkNB6gDR+qBoHMJoDQGjRhGgxGmJkxNBhGgZAMmAkSEaEMQpqenqYyJlGEDRiMjI0eoNAPU09JEki1Ky6nS8mVOu5Bg3D9atp3uURr6Pthb3I4Ve7xlqUIQFqSNpDVup9K3A6x6WjSv4veDelorZWW+UQBv0zDcBYDOfmQEQjOVWykFk0JEYUmM/FWypUZzYCkFbLkm9cdNAwGE54SQogbJByLdLhMLq22QYIbuAIa+SNCwQseSy1rqCjBvGgQNOix3wMNu5gckwk87XmVFMqBrA36O6W41D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OpWXLmDwM5UbDSyM6dcldgHsSQGIXMVAzYdXL7ZTfxXhiYNqVwemmFgBFlC0G+1JE6TNiikqRBEv9kYN3QKiRZBZbsVFfN0gXJNRgg+CgSViauYOBq8I7Ti7UkAzSZ/mrceb394tEdQcptyo0OwnNjhy48RsLaLyBURm3KVJ1grInVG8S325sU/BNM9HOeTR0HMr7eg3iTSZxYlCRtEzSdfsyhub4Yyk23hndzZdOUWb59VmIyQUPOIqipNcW42bQZaD8qZdwXYGnBGhaaHfEetVSCisQiGinHs5ErtZzlW0yjgsdTWqbmN9aSAp11PNoUIMGdCJS2k1IMvCT5+RZ1A0DYa0iRCRrW7GXntsWp7YNTLGr2BHHlEStLCkj0DJ0YRNA4oEZGvGw0XjRhUgPeJeaFZRBDLojAqpUEPnVFwrQrSgVtmE4iU/EQWME15SHkgK3iAy6xOrAO+mZZAyoK8lAoTXO2AxW+tJAZpKWoBEJneooEVTBEFxwJXdLeAAKhWrrRYlrmrVrivnUYN2aTtaqp3/F3JFOFCQuuKROg')))
\ No newline at end of file
File added
File moved
File added
File added
from unitgrade.unitgrade import QuestionGroup, Report, QPrintItem from unitgrade.unitgrade import QuestionGroup, Report, QPrintItem
from unitgrade.unitgrade_helpers import evaluate_report_student from unitgrade.unitgrade_helpers import evaluate_report_student
from unitgrade.hidden_create_files import setup_answers, setup_grade_file_report # from unitgrade.hidden_create_files import setup_answers, setup_grade_file_report
class ListReversalQuestion(QuestionGroup): class ListReversalQuestion(QuestionGroup):
title = "Reversal of list" title = "Reversal of list"
...@@ -8,7 +8,7 @@ class ListReversalQuestion(QuestionGroup): ...@@ -8,7 +8,7 @@ class ListReversalQuestion(QuestionGroup):
class ListReversalItem(QPrintItem): class ListReversalItem(QPrintItem):
l = [1, 3, 5, 1, 610] l = [1, 3, 5, 1, 610]
def compute_answer_print(self): def compute_answer_print(self):
from cs101courseware.homework1 import reverse_list from cs101courseware_example.homework1 import reverse_list
return reverse_list(self.l) return reverse_list(self.l)
class ListReversalWordsItem(ListReversalItem): class ListReversalWordsItem(ListReversalItem):
...@@ -21,7 +21,7 @@ class LinearRegressionQuestion(QuestionGroup): ...@@ -21,7 +21,7 @@ class LinearRegressionQuestion(QuestionGroup):
tol = 0.03 tol = 0.03
def compute_answer_print(self): def compute_answer_print(self):
from cs101courseware.homework1 import boston_linear from cs101courseware_example.homework1 import boston_linear
boston_linear() boston_linear()
def process_output(self, res, txt, numbers): def process_output(self, res, txt, numbers):
...@@ -31,13 +31,13 @@ class LinearRegressionQuestion(QuestionGroup): ...@@ -31,13 +31,13 @@ class LinearRegressionQuestion(QuestionGroup):
def process_output(self, res, txt, numbers): def process_output(self, res, txt, numbers):
return numbers[-1] return numbers[-1]
from cs101courseware import homework1 from cs101courseware_example import homework1
class Report0(Report): class Report0(Report):
title = "CS 101 Report 1" title = "CS 101 Report 1"
questions = [(ListReversalQuestion, 5), (LinearRegressionQuestion, 13)] questions = [(ListReversalQuestion, 5), (LinearRegressionQuestion, 13)]
pack_imports = [homework1] # Include this file in .token file pack_imports = [homework1] # Include this file in .token file
if __name__ == "__main__": if __name__ == "__main__":
setup_answers(Report0()) # hidden for students # setup_answers(Report0()) # hidden for students
setup_grade_file_report(Report0,minify=True, bzip=True, obfuscate=True) # setup_grade_file_report(Report0,minify=True, bzip=True, obfuscate=True)
evaluate_report_student(Report0()) evaluate_report_student(Report0())
'''WARNING: Modifying, decompiling or otherwise tampering with this script, it's data or the resulting .token file will be investigated as a cheating attempt.
Note we perform manual and static analysis of the uploaded results.
'''
import bz2, base64
exec(bz2.decompress(base64.b64decode('QlpoOTFBWSZTWW6lBO8ABNJfgERQWv9////nf+/////+YAY99d69edu9XpmV0aHvYA6fDJCMhpU8nqnsknpiPUeqH5CmnkE8U2k09J6gaNDTE9QGiaiYaU/TSZNRhoRp6mgaaAGhoAaDQAANCaaqe9KmaRk9Q0Gg0aAAZNA0AAAAAYSJJ6anoh6p6nqM0CNNAAYjaATAjTQ8p5JkHDQyaaGmRoaZGQZGRoZAYmjJ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K1XpjftGQGQfgE7HcyslUC7LfXnC47cmgOcr0brjiUoTiGYXKWh2Qt8NE2yoqbWgsIknmyijAOd5ahPBR6VWi8LBKrcOtciqqbBmbwlc1gRZuSLbs6rIeSJELtAiHuxqgSUCha9bM6CJQs4beZsOLggdHR4EHvvFAwRYKL0aiHuWYX8RjNICGf0CoLxqYl2tcsM1WxJATFkauBrLzZOvonTugoWNlvsjvSQGg7m4mUN+ZVaaAJKJwMGmFoyWOHb7dTT2zqIJbcgDTCxEs0yoB0T0IOpVLgr00h0pIDAzrrOJcVbgBIDeqsi2C+NmtHCXMhhL3xVeQMlwVsUgMujY3VU3AnEjMtNwFlEABIqGA0kT9IiDMahaxQcTDYcZYNKBkQJsTosMzkqmqGDqzDqIF+YwlIBlCmmsjBwGrQhecTZmM/aqb9X/aVMRzhoMbpNEGKB7YBr7N56j4kc6BX0n06jJctuZFyvwLNr37tGtNnn2HzW7DUrJ7DWJNJnDcSImImd/bfBuL2Zoxbbvnqu23Qu10dFKeVJARD4UnWIrRWcOmaeGIMmD8yZXsXeG3Ii1XyOgR9iqSCSpQiDRLPjzVsWchtKm1qIFLiTdZgpcrG6PXM8tqggtZtRGOJQohf4ijn5lfUBaNh4EiJBIzrRdHzfCkLsWXMpasYEOR54zKSMT0jKEOKCEKAecwupL6zqSQEFaysYeQS8sFOSCDLIOFpWqJAhKjAeEOgNEgN63YjzI15Eo8+GNINO/W8iXvIH69ZdcDq6cbkNcisIwFBNdDYDFO41evFJSa10qtRDZkfCgSVp7kkBfx1bEkBgfKkgMLZdJDzm4qizwleRAoxdyRThQkG6lBO8=')))
\ No newline at end of file
File moved
setup.py 0 → 100644
from setuptools import setup
setup(
name='unitgrade',
version='0.01',
packages=['unitgrade', 'cs101courseware_example'],
url='https://lab.compute.dtu.dk/tuhe/unitgrade',
license='Apache',
author='Tue Herlau',
author_email='tuhe@dtu.dk',
description='A lightweight student evaluation framework build on unittest'
)
No preview for this file type
File deleted
File deleted
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment