berkeley-cdss / seating

Exam seating assignments
https://seating-staging-74ac4c6b8c38.herokuapp.com/
Apache License 2.0
1 stars 0 forks source link

Feat: Movable Seats #27

Closed Reimirno closed 9 months ago

Reimirno commented 9 months ago

Overview

This PR introduces the concept of movable seats. They are like normal seats associated with a room, but they only have attributes fields (lefty, righty etc) and do not have position coordinate (x, y), name ("A1", "C5"...), row number, column number etc. Movable seats in the same room with the same set of attributes are basically indistinguishable from each other.

Motivation

Here are some canonical use case for movable seats:

Future Work...

This feature will be more useful if we could allow student to indicate preferences to want/avoid certain rooms (DSP room, for example) - we will build this in the future.

How to add movable seats?

Now (this will be moved to README), how to add movable seats? It is the same as adding a regular seat row in your room google spreadsheet, but leave the "row" and "seat" column blank. (That makes sense - movable seats do not have a row number or seat number). If either of the column is missing, then the parsing algorithm will take it to be a movable seat. Since all movable seats with the same attributes are essentially indistinguishable, we also additionally support "count" column now to make it easier to bulk add movable seats with the same attributes. Simply add a count column in addition to the old room spreadsheet template, and put in the number.

Example: add 1 movable seats with RIGHTY attribute and 2 movable seats with LEFTY attribute.

You can either:

image

OR, using Count column

image

github-actions[bot] commented 9 months ago

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py751383%17–20, 43–45, 85–90
   models.py1462980%28, 56, 59, 62, 88, 92, 95–104, 107, 121, 125, 129, 141, 145, 149, 153–154, 160, 180, 183, 202, 205, 219
   views.py31924523%30–35, 48–49, 67–85, 96–98, 107–114, 123, 134–136, 146–164, 174–197, 208–212, 221–243, 252–254, 262–264, 270–292, 298–322, 328–345, 352, 357–359, 364–388, 393–398, 403–413, 418–433, 438–453, 463, 468, 473, 481–482, 488, 493–497
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13285%17–18
server/services/auth
   __init__.py28486%21, 49, 54–55
server/services/canvas
   __init__.py513531%18–25, 29, 33, 37, 47–80, 84
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py242017%15–53
   data.py1181088%9–31, 35–85, 89–92, 96, 100–113, 117–152
server/services/email
   __init__.py302130%18–59
   smtp.py411173%15, 28–30, 32–34, 50–53
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py17476%17–18, 27, 30
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL120464646% 

Tests Skipped Failures Errors Time
16 0 :zzz: 0 :x: 0 :fire: 0.620s :stopwatch:
github-actions[bot] commented 9 months ago

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py751383%17–20, 43–45, 85–90
   models.py1462980%28, 56, 59, 62, 88, 92, 95–104, 107, 121, 125, 129, 141, 145, 149, 153–154, 160, 180, 183, 202, 205, 219
   views.py31924523%30–35, 48–49, 67–85, 96–98, 107–114, 123, 134–136, 146–164, 174–197, 208–212, 221–243, 252–254, 262–264, 270–292, 298–322, 328–345, 352, 357–359, 364–388, 393–398, 403–413, 418–433, 438–453, 463, 468, 473, 481–482, 488, 493–497
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13285%17–18
server/services/auth
   __init__.py28486%21, 49, 54–55
server/services/canvas
   __init__.py513531%18–25, 29, 33, 37, 47–80, 84
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py242017%15–53
   data.py1181088%9–31, 35–85, 89–92, 96, 100–113, 117–152
server/services/email
   __init__.py302130%18–59
   smtp.py411173%15, 28–30, 32–34, 50–53
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py17476%17–18, 27, 30
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL120464646% 

Tests Skipped Failures Errors Time
16 0 :zzz: 0 :x: 0 :fire: 0.610s :stopwatch:
codecov[bot] commented 9 months ago

Codecov Report

Attention: 55 lines in your changes are missing coverage. Please review.

Comparison is base (1294c88) 46.25% compared to head (5b04c28) 46.34%.

Files Patch % Lines
server/services/core/data.py 6.66% 42 Missing :warning:
server/models.py 71.42% 6 Missing :warning:
server/utils/misc.py 16.66% 5 Missing :warning:
server/views.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #27 +/- ## ========================================== + Coverage 46.25% 46.34% +0.08% ========================================== Files 21 22 +1 Lines 1176 1204 +28 ========================================== + Hits 544 558 +14 - Misses 632 646 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 9 months ago

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py751383%17–20, 43–45, 85–90
   models.py1462980%28, 56, 59, 62, 88, 92, 95–104, 107, 121, 125, 129, 141, 145, 149, 153–154, 160, 180, 183, 202, 205, 219
   views.py31924523%30–35, 48–49, 67–85, 96–98, 107–114, 123, 134–136, 146–164, 174–197, 208–212, 221–243, 252–254, 262–264, 270–292, 298–322, 328–345, 352, 357–359, 364–388, 393–398, 403–413, 418–433, 438–453, 463, 468, 473, 481–482, 488, 493–497
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13285%17–18
server/services/auth
   __init__.py28486%21, 49, 54–55
server/services/canvas
   __init__.py513531%18–25, 29, 33, 37, 47–80, 84
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py242017%15–53
   data.py1181088%9–31, 35–85, 89–92, 96, 100–113, 117–152
server/services/email
   __init__.py302130%18–59
   smtp.py411173%15, 28–30, 32–34, 50–53
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py17476%17–18, 27, 30
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL120464646% 

Tests Skipped Failures Errors Time
16 0 :zzz: 0 :x: 0 :fire: 5.701s :stopwatch:
github-actions[bot] commented 9 months ago

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py751383%17–20, 43–45, 85–90
   models.py1463179%27–30, 56, 59, 62, 88, 92, 95–104, 107, 121, 125, 129, 141, 145, 149, 153–154, 160, 180, 183, 202, 205, 219
   views.py31924523%30–35, 48–49, 67–85, 96–98, 107–114, 123, 134–136, 146–164, 174–197, 208–212, 221–243, 252–254, 262–264, 270–292, 298–322, 328–345, 352, 357–359, 364–388, 393–398, 403–413, 418–433, 438–453, 463, 468, 473, 481–482, 488, 493–497
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py28679%21, 49, 54–55, 60–61
server/services/canvas
   __init__.py513531%18–25, 29, 33, 37, 47–80, 84
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py242017%15–53
   data.py1181088%9–31, 35–85, 89–92, 96, 100–113, 117–152
server/services/email
   __init__.py302130%18–59
   smtp.py412929%15, 23–53
server/services/email/templates
   __init__.py332330%9–11, 14–17, 20, 30–41, 45–47
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py17476%17–18, 27, 30
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL120470142% 

Tests Skipped Failures Errors Time
8 0 :zzz: 0 :x: 0 :fire: 18.553s :stopwatch:
github-actions[bot] commented 9 months ago

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py751383%17–20, 43–45, 85–90
   models.py1463179%27–30, 56, 59, 62, 88, 92, 95–104, 107, 121, 125, 129, 141, 145, 149, 153–154, 160, 180, 183, 202, 205, 219
   views.py31924523%30–35, 48–49, 67–85, 96–98, 107–114, 123, 134–136, 146–164, 174–197, 208–212, 221–243, 252–254, 262–264, 270–292, 298–322, 328–345, 352, 357–359, 364–388, 393–398, 403–413, 418–433, 438–453, 463, 468, 473, 481–482, 488, 493–497
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py28679%21, 49, 54–55, 60–61
server/services/canvas
   __init__.py513531%18–25, 29, 33, 37, 47–80, 84
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py242017%15–53
   data.py1181088%9–31, 35–85, 89–92, 96, 100–113, 117–152
server/services/email
   __init__.py302130%18–59
   smtp.py412929%15, 23–53
server/services/email/templates
   __init__.py332330%9–11, 14–17, 20, 30–41, 45–47
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py17476%17–18, 27, 30
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL120470142% 

Tests Skipped Failures Errors Time
8 0 :zzz: 0 :x: 0 :fire: 17.705s :stopwatch:
github-actions[bot] commented 9 months ago

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py751383%17–20, 43–45, 85–90
   models.py1463179%27–30, 56, 59, 62, 88, 92, 95–104, 107, 121, 125, 129, 141, 145, 149, 153–154, 160, 180, 183, 202, 205, 219
   views.py31924523%30–35, 48–49, 67–85, 96–98, 107–114, 123, 134–136, 146–164, 174–197, 208–212, 221–243, 252–254, 262–264, 270–292, 298–322, 328–345, 352, 357–359, 364–388, 393–398, 403–413, 418–433, 438–453, 463, 468, 473, 481–482, 488, 493–497
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py28679%21, 49, 54–55, 60–61
server/services/canvas
   __init__.py513531%18–25, 29, 33, 37, 47–80, 84
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py242017%15–53
   data.py1181088%9–31, 35–85, 89–92, 96, 100–113, 117–152
server/services/email
   __init__.py302130%18–59
   smtp.py412929%15, 23–53
server/services/email/templates
   __init__.py332330%9–11, 14–17, 20, 30–41, 45–47
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py17476%17–18, 27, 30
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL120470142% 

Tests Skipped Failures Errors Time
8 0 :zzz: 0 :x: 0 :fire: 32.350s :stopwatch: