berkeley-cdss / seating

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

Feat: CSV Import and Export #32

Closed Reimirno closed 9 months ago

Reimirno commented 9 months ago

This PR:

Please note that the csv import and export are NOT symmetric. The export feature is only for humans to keep track of or for archiving purposes. The exported csv cannot be fed into csv import again.

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.py881089%18–20, 45–47, 97–100
   models.py1533378%28, 56, 59, 62, 88, 92, 95–104, 107, 110, 124, 127–129, 132, 136, 148, 152, 156, 160–161, 167, 187, 190, 211, 214, 228
   views.py41233020%33–38, 51–52, 70–88, 99–101, 110–117, 126, 137–140, 150–169, 181–205, 213–235, 247–251, 260–282, 291–293, 301–304, 312–337, 345–370, 378–406, 414–431, 438, 443–447, 456–458, 463–511, 516–521, 526–546, 551–566, 571–586, 596, 601, 606, 614–615, 621, 626–630
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__.py685125%18–25, 29, 33, 37, 47–80, 84–99, 103
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py252020%16–60
   data.py261638%10–15, 19–23, 27–29, 33–34, 38–39
   export.py8625%8–21
   room.py61568%11–33, 41–89
   student.py41387%9–54
server/services/csv
   __init__.py181233%11–12, 19–22, 29–34
server/services/email
   __init__.py302130%18–59
   smtp.py391172%15, 27–29, 31–33, 49–52
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py25964%16–29, 35, 41–42, 51, 54
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL137777344% 

Tests Skipped Failures Errors Time
16 0 :zzz: 0 :x: 0 :fire: 0.686s :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.py881089%18–20, 45–47, 97–100
   models.py1533378%28, 56, 59, 62, 88, 92, 95–104, 107, 110, 124, 127–129, 132, 136, 148, 152, 156, 160–161, 167, 187, 190, 211, 214, 228
   views.py41233020%33–38, 51–52, 70–88, 99–101, 110–117, 126, 137–140, 150–169, 181–205, 213–235, 247–251, 260–282, 291–293, 301–304, 312–337, 345–370, 378–406, 414–431, 438, 443–447, 456–458, 463–511, 516–521, 526–546, 551–566, 571–586, 596, 601, 606, 614–615, 621, 626–630
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__.py685125%18–25, 29, 33, 37, 47–80, 84–99, 103
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py252020%16–60
   data.py261638%10–15, 19–23, 27–29, 33–34, 38–39
   export.py8625%8–21
   room.py61568%11–33, 41–89
   student.py41387%9–54
server/services/csv
   __init__.py181233%11–12, 19–22, 29–34
server/services/email
   __init__.py302130%18–59
   smtp.py391172%15, 27–29, 31–33, 49–52
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py25964%16–29, 35, 41–42, 51, 54
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL137777344% 

Tests Skipped Failures Errors Time
16 0 :zzz: 0 :x: 0 :fire: 5.702s :stopwatch:
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.py881089%18–20, 45–47, 97–100
   models.py1533378%28, 56, 59, 62, 88, 92, 95–104, 107, 110, 124, 127–129, 132, 136, 148, 152, 156, 160–161, 167, 187, 190, 211, 214, 228
   views.py41233020%33–38, 51–52, 70–88, 99–101, 110–117, 126, 137–140, 150–169, 181–205, 213–235, 247–251, 260–282, 291–293, 301–304, 312–337, 345–370, 378–406, 414–431, 438, 443–447, 456–458, 463–511, 516–521, 526–546, 551–566, 571–586, 596, 601, 606, 614–615, 621, 626–630
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__.py685125%18–25, 29, 33, 37, 47–80, 84–99, 103
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py252020%16–60
   data.py261638%10–15, 19–23, 27–29, 33–34, 38–39
   export.py8625%8–21
   room.py61568%11–33, 41–89
   student.py41387%9–54
server/services/csv
   __init__.py181233%11–12, 19–22, 29–34
server/services/email
   __init__.py302130%18–59
   smtp.py391172%15, 27–29, 31–33, 49–52
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py25964%16–29, 35, 41–42, 51, 54
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL137777344% 

Tests Skipped Failures Errors Time
16 0 :zzz: 0 :x: 0 :fire: 0.705s :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.py881089%18–20, 45–47, 97–100
   models.py1533577%27–30, 56, 59, 62, 88, 92, 95–104, 107, 110, 124, 127–129, 132, 136, 148, 152, 156, 160–161, 167, 187, 190, 211, 214, 228
   views.py41233020%33–38, 51–52, 70–88, 99–101, 110–117, 126, 137–140, 150–169, 181–205, 213–235, 247–251, 260–282, 291–293, 301–304, 312–337, 345–370, 378–406, 414–431, 438, 443–447, 456–458, 463–511, 516–521, 526–546, 551–566, 571–586, 596, 601, 606, 614–615, 621, 626–630
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__.py685125%18–25, 29, 33, 37, 47–80, 84–99, 103
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py252020%16–60
   data.py261638%10–15, 19–23, 27–29, 33–34, 38–39
   export.py8625%8–21
   room.py61568%11–33, 41–89
   student.py41387%9–54
server/services/csv
   __init__.py181233%11–12, 19–22, 29–34
server/services/email
   __init__.py302130%18–59
   smtp.py392731%15, 24–52
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.py25964%16–29, 35, 41–42, 51, 54
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL137782640% 

Tests Skipped Failures Errors Time
8 0 :zzz: 0 :x: 0 :fire: 18.799s :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.py881089%18–20, 45–47, 97–100
   models.py1533577%27–30, 56, 59, 62, 88, 92, 95–104, 107, 110, 124, 127–129, 132, 136, 148, 152, 156, 160–161, 167, 187, 190, 211, 214, 228
   views.py41233020%33–38, 51–52, 70–88, 99–101, 110–117, 126, 137–140, 150–169, 181–205, 213–235, 247–251, 260–282, 291–293, 301–304, 312–337, 345–370, 378–406, 414–431, 438, 443–447, 456–458, 463–511, 516–521, 526–546, 551–566, 571–586, 596, 601, 606, 614–615, 621, 626–630
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__.py685125%18–25, 29, 33, 37, 47–80, 84–99, 103
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py252020%16–60
   data.py261638%10–15, 19–23, 27–29, 33–34, 38–39
   export.py8625%8–21
   room.py61568%11–33, 41–89
   student.py41387%9–54
server/services/csv
   __init__.py181233%11–12, 19–22, 29–34
server/services/email
   __init__.py302130%18–59
   smtp.py392731%15, 24–52
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.py25964%16–29, 35, 41–42, 51, 54
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL137782640% 

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

Codecov Report

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

Comparison is base (98b56a5) 45.41% compared to head (bfa967a) 43.86%.

Files Patch % Lines
server/views.py 14.10% 67 Missing :warning:
server/services/core/room.py 8.19% 56 Missing :warning:
server/services/core/student.py 7.31% 38 Missing :warning:
server/services/canvas/__init__.py 5.88% 16 Missing :warning:
server/services/core/data.py 40.90% 13 Missing :warning:
server/services/csv/__init__.py 33.33% 12 Missing :warning:
server/services/core/export.py 25.00% 6 Missing :warning:
server/forms.py 83.33% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== - Coverage 45.41% 43.86% -1.55% ========================================== Files 22 26 +4 Lines 1264 1377 +113 ========================================== + Hits 574 604 +30 - Misses 690 773 +83 ```

: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 e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py881089%18–20, 45–47, 97–100
   models.py1533577%27–30, 56, 59, 62, 88, 92, 95–104, 107, 110, 124, 127–129, 132, 136, 148, 152, 156, 160–161, 167, 187, 190, 211, 214, 228
   views.py41233020%33–38, 51–52, 70–88, 99–101, 110–117, 126, 137–140, 150–169, 181–205, 213–235, 247–251, 260–282, 291–293, 301–304, 312–337, 345–370, 378–406, 414–431, 438, 443–447, 456–458, 463–511, 516–521, 526–546, 551–566, 571–586, 596, 601, 606, 614–615, 621, 626–630
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__.py685125%18–25, 29, 33, 37, 47–80, 84–99, 103
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py252020%16–60
   data.py261638%10–15, 19–23, 27–29, 33–34, 38–39
   export.py8625%8–21
   room.py61568%11–33, 41–89
   student.py41387%9–54
server/services/csv
   __init__.py181233%11–12, 19–22, 29–34
server/services/email
   __init__.py302130%18–59
   smtp.py392731%15, 24–52
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.py25964%16–29, 35, 41–42, 51, 54
server/utils
   date.py7443%17–19, 30
   misc.py6517%5–9
TOTAL137782640% 

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