-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move files from main Submitty repo & switch to most recent nlohmann::…
…json library
- Loading branch information
Showing
20 changed files
with
5,807 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.DS_Store | ||
*.autosave | ||
*.orig* | ||
*~ | ||
*.o | ||
*.pyc | ||
*.aux | ||
*.log | ||
*.out | ||
*.synctex.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
.PHONY: default pull push all compile overall section lab hw test quiz final iclicker zone clean src_clean remove_json_comments | ||
|
||
default: overall | ||
|
||
# ============================================================================= | ||
# This is the helper Makefile | ||
|
||
# Don't directly use this Makefile, it should be included from the | ||
# per-course Makefile with these variables set: | ||
|
||
ifndef USERNAME | ||
$(error Variable USERNAME not set) | ||
endif | ||
|
||
ifndef RAINBOW_GRADES_DIRECTORY | ||
$(error Variable RAINBOW_GRADES_DIRECTORY not set) | ||
endif | ||
|
||
ifndef HWSERVER | ||
$(error Variable HWSERVER not set) | ||
endif | ||
|
||
ifndef REPORTS_DIRECTORY | ||
$(error Variable REPORTS_DIRECTORY not set) | ||
endif | ||
|
||
GRADING_DIRECTORY := $(RAINBOW_GRADES_DIRECTORY)/../grading | ||
|
||
|
||
nlohmann_json_dir=${RAINBOW_GRADES_DIRECTORY}/../vendor/nlohmann/json | ||
|
||
${nlohmann_json_dir}: | ||
mkdir -p ${nlohmann_json_dir} | ||
wget https://github.com/nlohmann/json/releases/download/v3.1.2/include.zip -O ${RAINBOW_GRADES_DIRECTORY}/../vendor/nlohmann_json.zip | ||
unzip -o ${RAINBOW_GRADES_DIRECTORY}/../vendor/nlohmann_json.zip -d ${nlohmann_json_dir} | ||
|
||
|
||
# Grab this file from the main Submitty repo | ||
json_syntax_checker.py = ${RAINBOW_GRADES_DIRECTORY}/../misc_tools/json_syntax_checker.py | ||
${json_syntax_checker.py}: | ||
mkdir -p ${RAINBOW_GRADES_DIRECTORY}/../misc_tools/ | ||
wget https://raw.githubusercontent.com/Submitty/Submitty/master/grading/json_syntax_checker.py -O ${json_syntax_checker.py} | ||
|
||
|
||
# ============================================================================= | ||
|
||
pull: | ||
mkdir -p raw_data/ | ||
rsync -azP ${USERNAME}@${HWSERVER}:${REPORTS_DIRECTORY}/all_grades/ raw_data/ | ||
|
||
push: | ||
rsync -azP individual_summary_html/* ${USERNAME}@${HWSERVER}:${REPORTS_DIRECTORY}/summary_html/ | ||
|
||
flags = -g | ||
memory_debug : memory_flags = -m32 | ||
|
||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Darwin) | ||
flags = -g -std=c++11 | ||
endif | ||
|
||
ifeq ($(UNAME_S),Linux) | ||
flags = -g -std=c++0x | ||
endif | ||
|
||
ifeq ($(findstring CYGWIN,$(UNAME_S)),CYGWIN) | ||
flags = -g -std=c++11 | ||
endif | ||
|
||
json_include = -I${nlohmann_json_dir}/include/ | ||
|
||
|
||
remove_json_comments: customization.json | ||
cpp -xc++ $< | sed -e '/^#/d' > customization_no_comments.json | ||
python3 ${json_syntax_checker.py} customization_no_comments.json | ||
grep '{"file":' customization_no_comments.json > iclicker_file_list.txt || true | ||
python3 ${RAINBOW_GRADES_DIRECTORY}/parsexml.py iclicker_file_list.txt | ||
|
||
process_grades.out: \ | ||
${RAINBOW_GRADES_DIRECTORY}/main.cpp \ | ||
${RAINBOW_GRADES_DIRECTORY}/output.cpp \ | ||
${RAINBOW_GRADES_DIRECTORY}/table.cpp \ | ||
${RAINBOW_GRADES_DIRECTORY}/student.cpp \ | ||
${RAINBOW_GRADES_DIRECTORY}/iclicker.cpp \ | ||
${RAINBOW_GRADES_DIRECTORY}/zone.cpp \ | ||
${RAINBOW_GRADES_DIRECTORY}/benchmark.cpp | ||
g++ -Wall ${flags} ${memory_flags} ${json_include} $^ -g -o $@ | ||
|
||
individual_summary_html all_students_summary_html: | ||
mkdir -p $@ | ||
|
||
compile: remove_json_comments process_grades.out individual_summary_html all_students_summary_html | ||
|
||
clean: | ||
rm -f process_grades.out | ||
|
||
src_clean: clean | ||
rm -f ${json_syntax_checker.py} | ||
rm -rf ${nlohmann_json_dir} | ||
|
||
all: pull overall push | ||
|
||
# ============================================================================= | ||
# the different sorting orders & details of tables | ||
|
||
overall: ${nlohmann_json_dir} ${json_syntax_checker.py} compile | ||
./process_grades.out by_overall | ||
|
||
memory_debug: compile | ||
drmemory -- ./process_grades.out by_overall | ||
# valgrind ./process_grades.out by_overall | ||
|
||
iclicker: compile | ||
./process_grades.out by_iclicker | ||
|
||
name: compile | ||
./process_grades.out by_name | ||
|
||
section: compile | ||
./process_grades.out by_section | ||
|
||
lab: compile | ||
./process_grades.out by_lab | ||
|
||
hw: compile | ||
./process_grades.out by_hw | ||
|
||
test: compile | ||
./process_grades.out by_test | ||
|
||
quiz: compile | ||
./process_grades.out by_quiz | ||
|
||
exam: compile | ||
./process_grades.out by_exam | ||
|
||
reading: compile | ||
./process_grades.out by_reading | ||
|
||
project: compile | ||
./process_grades.out by_project | ||
|
||
participation: compile | ||
./process_grades.out by_participation | ||
|
||
test_exam: compile | ||
./process_grades.out by_test_and_exam | ||
|
||
zone: compile | ||
./process_grades.out by_zone | ||
|
||
|
||
# ============================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ============================================================================= | ||
# EDIT THESE VARIABLES | ||
|
||
USERNAME=username | ||
RAINBOW_GRADES_DIRECTORY=/<PATH_TO_SUBMITTY_REPO>/RainbowGrades | ||
HWSERVER=submitty.cs.rpi.edu | ||
REPORTS_DIRECTORY=/var/local/submitty/courses/<SEMESTER>/<COURSE>/reports | ||
|
||
# ============================================================================= | ||
|
||
include ${RAINBOW_GRADES_DIRECTORY}/MakefileHelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
/* | ||
This JSON is based on the automatically generated customization for | ||
the development course "sample" as of August 15, 2017. | ||
It is intended as a simple example, with additional documentation online. | ||
Going forward we expect more users to use a web interface to generate this file. | ||
*/ | ||
{ | ||
"display_benchmark": [ | ||
"average", | ||
"stddev", | ||
"perfect", | ||
"lowest_a-", | ||
"lowest_b-", | ||
"lowest_c-", | ||
"lowest_d" | ||
], | ||
"section": { | ||
"1": "ta2, ta3", | ||
"2": "manne", | ||
"3": "manne, ta3", | ||
"4": "manne", | ||
"5": "manne", | ||
"6": "manne", | ||
"7": "manne", | ||
"8": "manne", | ||
"9": "TBA", | ||
"10": "TBA" | ||
}, | ||
"messages": [ | ||
"<b>sample Course</b>", | ||
"Note: Please be patient with data entry/grade corrections for the most recent lab, homework, and test.", | ||
"Please contact your graduate lab TA if a grade remains missing or incorrect for more than a week." | ||
], | ||
"display": [ | ||
"instructor_notes", | ||
"grade_summary", | ||
"grade_details" | ||
], | ||
"benchmark_percent": { | ||
"lowest_c-": 0.7, | ||
"lowest_d": 0.6, | ||
"lowest_b-": 0.8, | ||
"lowest_a-": 0.9 | ||
}, | ||
"gradeables": [ | ||
{ | ||
"count": 4, | ||
"percent": 0.75, | ||
"type": "test", | ||
"ids": [ | ||
{ | ||
"max": 5.0, | ||
"id": "future_no_tas_test", | ||
"released": false | ||
}, | ||
{ | ||
"max": 5.0, | ||
"id": "future_tas_test", | ||
"released": false | ||
}, | ||
{ | ||
"max": 5.0, | ||
"id": "grading_test", | ||
"released": false | ||
}, | ||
{ | ||
"max": 5.0, | ||
"id": "grades_released_test" | ||
} | ||
] | ||
}, | ||
{ | ||
"count": 4, | ||
"percent": 0.11, | ||
"type": "lab", | ||
"ids": [ | ||
{ | ||
"max": 2.0, | ||
"id": "future_no_tas_lab", | ||
"released": false | ||
}, | ||
{ | ||
"max": 2.0, | ||
"id": "future_tas_lab", | ||
"released": false | ||
}, | ||
{ | ||
"max": 2.0, | ||
"id": "grading_lab", | ||
"released": false | ||
}, | ||
{ | ||
"max": 2.0, | ||
"id": "grades_released_lab" | ||
} | ||
] | ||
}, | ||
{ | ||
"count": 12, | ||
"percent": 0.14, | ||
"type": "homework", | ||
"ids": [ | ||
{ | ||
"max": 12.0, | ||
"id": "open_homework", | ||
"released": false | ||
}, | ||
{ | ||
"max": 12.0, | ||
"id": "open_team_homework", | ||
"released": false | ||
}, | ||
{ | ||
"max": 12.0, | ||
"id": "closed_homework", | ||
"released": false | ||
}, | ||
{ | ||
"max": 12.0, | ||
"id": "grading_homework", | ||
"released": false | ||
}, | ||
{ | ||
"max": 5.0, | ||
"id": "grades_released_homework_onlyta" | ||
}, | ||
{ | ||
"max": 10, | ||
"id": "grades_released_homework_onlyauto" | ||
}, | ||
{ | ||
"max": 22.0, | ||
"id": "grades_released_homework_autota" | ||
}, | ||
{ | ||
"max": 26.0, | ||
"id": "grades_released_homework_autohiddenEC" | ||
}, | ||
{ | ||
"max": 12.0, | ||
"id": "grades_released_homework_onlytaEC" | ||
}, | ||
{ | ||
"max": 12.0, | ||
"id": "grades_released_homework_onlytaPenalty" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.