Package: pylifttk
pylifttkThis is a Python utility library for Princeton COS' LIFT.This library tries to conveniently integrate a collection of educational tech tools used at Princeton's Department of Computer Science, to facilitate exchanges of data between those platforms.Services integrated by this libraryThis library integrates:codePost (roster, grades);Ed Discussion (roster);CSStaff Course API (roster, assignments);TigerFile (roster, assignments, submissions);Gradescope (roster, grades).Configuration fileSince this library integrates the functionality of several platforms, it requires access to credentials for each of those platforms. As such theconfig.yamlfile does a lot of the heavy lifting.Note that each subsection of the file is only loaded if the corresponding submodules are loaded in Python.course:COS126term:F2019csstaff:username:"cos126api"password:""# email csstaff@princeton.educodePost:api_key:""#ed:username:""# credentials for https://us.edstem.orgpassword:""gradescope:username:""# credentials for https://gradescope.compassword:""tigerfile:token:""# token obtained from https://adm.cs.princeton.eduExampleThis snippet computes final grades:importpylifttk.integrations.final_gradesaspyltkfgdefget_late_data():# student_id -> float of late days (including alloted)return{"student1":1.0,"student7":2.5,}# Miscellaneous late data calculationlate_data=get_late_data()student_data=pyltkfg.compute_final_grade_data(course_name="COS126",course_term="F2019",ignore_missing_assessment=False,skipped_assessments=None,override_cutoffs={"A+":100.0,"A":92.49,"A-":89.50,"B+":87.00,"B":82.75,"B-":80.00,"C+":77.00,"C":73.00,"C-":69.00,"D":55.0},late_data=late_data)with the following sample configuration (authentication content blanked out):# Course informationcourse:COS126term:F2019# Authentication credentials and tokenscsstaff:username:"**********"password:"**********"codePost:api_key:"**********"ed:username:"**********"password:"**********"gradescope:username:"**********"password:"**********"tigerfile:token:"**********"labqueue:username:"**********"password:"**********"canvas:token:"**********"# Mappings between the names of various services that this library is integratingnormalizations:-source:runscriptdestination:tigerfilemapping:hello:Helloloops:Loopsnbody:NBodysierpinski:Sierpinskihamming:Hamminglfsr:LFSRguitar:Guitarmarkov:Markovtsp:TSPatomic:Atomic-source:tigerfiledestination:codepostmapping:Hello:HelloLoops:LoopsNBody:NBodySierpinski:SierpinskiHamming:HammingLFSR:LFSRGuitar:GuitarMarkov:MarkovTSP:"TSPP"Atomic:Atomic# Course policy constantspolicy:cutoffs:"A":93"A-":90"B+":87"B":83"B-":80"C+":77"C":73"C-":70"D":60"F":0lateness:allotted:4penalty:0.5grace_minutes:180totals:Hello:4.0Loops:4.0NBody:4.0Sierpinski:4.0Hamming:4.0Programming Exam 1:7.5Written Exam 1:17.5LFSR:5.0Guitar:5.0Markov:5.0TSPP:5.0Programming Exam 2:7.5Written Exam 2:17.5Atomic:10.0weights:-name:"assignments"weight:40.0content:-Hello-Loops-NBody-Sierpinski-Hamming-LFSR-Guitar-Markov-TSPP-name:"finalproject"weight:10.0content:-Atomic-name:"writtenexams"weight:35.0content:-Written Exam 1-Written Exam 2-name:"programmingexams"weight:15.0content:-Programming Exam 1-Programming Exam 2