pylifttk
This 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 library
This library integrates:
- codePost (roster, grades);
- Ed Discussion (roster);
- CSStaff Course API (roster, assignments);
- TigerFile (roster, assignments, submissions);
- Gradescope (roster, grades).
Configuration file
Since this library integrates the functionality of several platforms, it requires access to credentials for each of those platforms. As such the config.yaml file 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: COS126
term: F2019
csstaff:
username: "cos126api"
password: "" # email csstaff@princeton.edu
codePost:
api_key: "" #
ed:
username: "" # credentials for https://us.edstem.org
password: ""
gradescope:
username: "" # credentials for https://gradescope.com
password: ""
tigerfile:
token: "" # token obtained from https://adm.cs.princeton.edu
Example
This snippet computes final grades:
import pylifttk.integrations.final_grades as pyltkfg
def get_late_data():
# student_id -> float of late days (including alloted)
return {
"student1": 1.0,
"student7": 2.5,
}
# Miscellaneous late data calculation
late_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 information
course: COS126
term: F2019
# Authentication credentials and tokens
csstaff:
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 integrating
normalizations:
- source: runscript
destination: tigerfile
mapping:
hello: Hello
loops: Loops
nbody: NBody
sierpinski: Sierpinski
hamming: Hamming
lfsr: LFSR
guitar: Guitar
markov: Markov
tsp: TSP
atomic: Atomic
- source: tigerfile
destination: codepost
mapping:
Hello: Hello
Loops: Loops
NBody: NBody
Sierpinski: Sierpinski
Hamming: Hamming
LFSR: LFSR
Guitar: Guitar
Markov: Markov
TSP: "TSPP"
Atomic: Atomic
# Course policy constants
policy:
cutoffs:
"A" : 93
"A-": 90
"B+": 87
"B" : 83
"B-": 80
"C+": 77
"C" : 73
"C-": 70
"D" : 60
"F" : 0
lateness:
allotted: 4
penalty: 0.5
grace_minutes: 180
totals:
Hello: 4.0
Loops: 4.0
NBody: 4.0
Sierpinski: 4.0
Hamming: 4.0
Programming Exam 1: 7.5
Written Exam 1: 17.5
LFSR: 5.0
Guitar: 5.0
Markov: 5.0
TSPP: 5.0
Programming Exam 2: 7.5
Written Exam 2: 17.5
Atomic: 10.0
weights:
- name: "assignments"
weight: 40.0
content:
- Hello
- Loops
- NBody
- Sierpinski
- Hamming
- LFSR
- Guitar
- Markov
- TSPP
- name: "final project"
weight: 10.0
content:
- Atomic
- name: "written exams"
weight: 35.0
content:
- Written Exam 1
- Written Exam 2
- name: "programming exams"
weight: 15.0
content:
- Programming Exam 1
- Programming Exam 2
Metadata
Release files for pylifttk 0.0.38
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylifttk-0.0.38.tar.gz | 33.3 kB | Without provenance | Details for pylifttk-0.0.38.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylifttk-0.0.38-py3-none-any.whl | Python 3 | none | any | Details for pylifttk-0.0.38-py3-none-any.whl |
Total release size: 78.7 kB
Release files / pylifttk-0.0.38.tar.gz
| Download URL | pylifttk-0.0.38.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82c091eec1f50c46bb3cff0de40af75b60b198b561691e39336b4ac2933c3be6
|
|
BLAKE2b-256 checksum How to use checksums |
c26d89b21e08be3318d4a33f5e0e5ff39fc928cc446c0e30cace58f55db57e42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.5.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / pylifttk-0.0.38-py3-none-any.whl
| Download URL | pylifttk-0.0.38-py3-none-any.whl |
|---|---|
| Size | 45.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61ac2ce2a1a9ad8dc0eced290b201717e3c16413b0148dc602bc5865682237bc
|
|
BLAKE2b-256 checksum How to use checksums |
eece97612459bed95a13e836605768421b3b2de336a4e58efe09e83e7002811c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.5.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Security for pylifttk 0.0.38
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.