uw.local.grad.db package¶
Submodules¶
uw.local.grad.db.bulk_unitapp module¶
uw.local.grad.db.cursor module¶
uw.local.grad.db.notification module¶
uw.local.grad.db.status module¶
uw.local.grad.db.unitapp module¶
uw.local.grad.db.unitapp_get module¶
Unit Application functions.
This module defines helper functions to get certain information for the UnitApplication class from the database. It is also used in the bulk_app_loader to load information for multiple application in one query.
-
uw.local.grad.db.unitapp_get.
get_app_accept_counts
(cursor, where, vardict)[source]¶ Returns a named tuple containing the accept_count and waitlist_count
Parameters: - cursor – Database connection cursor
- where – identification string for the unitapp (e.g. ‘((wa.uw_id, wa.appl_id) = (%(uw_id)s, %(appl_id)s))’
- vardict – dictionnary of variables to pass to the query, the appl_id and uw_id keys are required
-
uw.local.grad.db.unitapp_get.
get_app_applicant
(cursor, where, vardict)[source]¶ - Returns a named tuple with general applicant information including:
- name, gender, birth, address and contact infomation
Parameters: - cursor – Database connection cursor
- where – identification string for the unitapp (e.g. ‘((wa.uw_id, wa.appl_id) = (%(uw_id)s, %(appl_id)s))’
- vardict – dictionnary of variables to pass to the query, the appl_id and uw_id keys are required
-
uw.local.grad.db.unitapp_get.
get_app_education
(cursor, where, vardict)[source]¶ - Returns a list of tuples with the following output for every past institution attended:
- [((‘institution_id’, ‘degree_id’), (named_tuple)) ... ]
Parameters: - cursor – Database connection cursor
- where – identification string for the unitapp (e.g. ‘((wa.uw_id, wa.appl_id) = (%(uw_id)s, %(appl_id)s))’
- vardict – dictionnary of variables to pass to the query, the appl_id and uw_id keys are required
-
uw.local.grad.db.unitapp_get.
get_app_info
(cursor, where, vardict)[source]¶ - Return a named tuple of miscellaneous information like compilation document, reason_description for status etc.
- admit_term is replaced with the termtool object.
Parameters: - cursor – Database connection cursor
- where – identification string for the unitapp (e.g. ‘((wa.uw_id, wa.appl_id) = (%(uw_id)s, %(appl_id)s))’
- vardict – dictionnary of variables to pass to the query, the appl_id and uw_id keys are required
-
uw.local.grad.db.unitapp_get.
get_app_plan_info
(cursor, where, vardict)[source]¶ Returns a named tuple containing plan_code and plan_transcript_description information.
Parameters: - cursor – Database connection cursor
- where – identification string for the unitapp (e.g. ‘((wa.uw_id, wa.appl_id) = (%(uw_id)s, %(appl_id)s))’
- vardict – dictionnary of variables to pass to the query, the appl_id and uw_id keys are required
-
uw.local.grad.db.unitapp_get.
get_app_rating
(cursor, where, vardict)[source]¶ Returns a named tuple containing the rating_code (A-C(+/-), CWD), rating_sequence, rating_colour
Parameters: - cursor – Database connection cursor
- where – identification string for the unitapp (e.g. ‘((wa.uw_id, wa.appl_id) = (%(uw_id)s, %(appl_id)s))’
- vardict – dictionnary of variables to pass to the query, the appl_id and uw_id keys are required
-
uw.local.grad.db.unitapp_get.
get_student_education
(cursor, uw_ids)[source]¶ Query adm_std_academic, uw_ext_org and uw_country to obtain the student’s or a group of students’ institution(s) id as well as the name and country, conbined with attendance, gpa and degree.
Parameters: - cursor – database connection cursor
- uw_ids – array of uw_ids
Returns: A dictionary that maps uw_id to a tuple of tuples which contain a namedtuple of institution information and the list of dictionaries that obtained from the corresponding attendance.
-
uw.local.grad.db.unitapp_get.
get_student_education_attendance
(cursor, uw_ids)[source]¶ Query adm_std_academic_attendance to obtain the student’s or a group of students’ attendance(s) (description, date, status, specialization) associated with one institution, conbined with gpa and degree.
Parameters: - cursor – database connection cursor
- uw_ids – array of uw_ids
Returns: A dictionary that maps (uw_id, ext_org_id) to a list of dictionaries that contain ‘date’, ‘gpa’ and ‘degree’.
Primarily intended for use with
get_student_education()
.
-
uw.local.grad.db.unitapp_get.
get_student_education_degree
(cursor, uw_ids)[source]¶ Query adm_std_academic_degree to obtain the student’s or a group of students’ degrees (description, date, status, specialization) associated with one attendance record.
Parameters: - cursor – database connection cursor
- uw_ids – array of uw_ids
Returns: A dictionary that maps (uw_id, ext_org_id, ext_career_code, ext_career_seq) to a tuple of corresponding degree namedtuples.
Primarily intended for use with
get_student_education_attendance()
.
-
uw.local.grad.db.unitapp_get.
get_student_education_gpa
(cursor, uw_ids)[source]¶ Query adm_std_academic_gpa to obtain the student’s or a group of students’ gpa (gpa, gpa_type) associated with one attendance record.
Parameters: - cursor – database connection cursor
- uw_ids – array of uw_ids
Returns: A dictionary that maps (uw_id, ext_org_id, ext_career_code, ext_career_seq) to a tuple of corresponding gpa namedtuples.
Primarily intended for use with
get_student_education_attendance()
.
Module contents¶
Database interface for Graduate Admissions.
Modules which implement the database interface for Graduate Admissions.