Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: N+1 bad query #63

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Fix: N+1 bad query #63

merged 1 commit into from
Mar 14, 2024

Conversation

Reimirno
Copy link

As title.

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py48492%21–22, 67, 75
   forms.py1131587%22–24, 40–42, 67–69, 120–123, 130, 138
   models.py1674275%28, 56, 60, 63, 66, 69, 72–77, 103, 107, 110–119, 122, 125, 139, 142–144, 147, 151, 163, 167, 171, 175–176, 182, 185, 205, 208, 229, 232, 246
   views.py64254216%32, 42–78, 88–122, 133–137, 154–163, 179–196, 207–214, 223–245, 256–269, 278, 289–292, 303–322, 335–359, 368–390, 399–426, 435–444, 453–495, 506–511, 519–522, 530–555, 563–588, 596–624, 632–649, 656, 661–665, 674–676, 681–728, 734–785, 791–802, 807–827, 832–857, 862–877, 882–901, 915, 920, 928–929, 937, 942–946
server/controllers
   __init__.py572949%25–52, 55, 66–75, 78
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py20765%17–18, 23–27
server/services/auth
   __init__.py29679%22, 51, 56–57, 62–63
server/services/canvas
   __init__.py806124%18–25, 29, 33, 37, 43, 55–64, 69–105, 109–124, 128
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py372922%8, 16–17, 34–60, 73–89
   data.py473428%10–15, 19–23, 27–31, 35–37, 41–52, 56–58, 62–63, 67–68
   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__.py352529%17–34, 38–65
   smtp.py441566%16, 28–30, 32–34, 50–57
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py321166%20–33, 39, 44, 50, 56–57, 66, 69
server/utils
   date.py7443%17–19, 30
   misc.py161319%5–9, 13–19, 23
TOTAL1725105339% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 6.881s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py48492%21–22, 67, 75
   forms.py1131587%22–24, 40–42, 67–69, 120–123, 130, 138
   models.py1674275%28, 56, 60, 63, 66, 69, 72–77, 103, 107, 110–119, 122, 125, 139, 142–144, 147, 151, 163, 167, 171, 175–176, 182, 185, 205, 208, 229, 232, 246
   views.py64254216%32, 42–78, 88–122, 133–137, 154–163, 179–196, 207–214, 223–245, 256–269, 278, 289–292, 303–322, 335–359, 368–390, 399–426, 435–444, 453–495, 506–511, 519–522, 530–555, 563–588, 596–624, 632–649, 656, 661–665, 674–676, 681–728, 734–785, 791–802, 807–827, 832–857, 862–877, 882–901, 915, 920, 928–929, 937, 942–946
server/controllers
   __init__.py572949%25–52, 55, 66–75, 78
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py20765%17–18, 23–27
server/services/auth
   __init__.py29679%22, 51, 56–57, 62–63
server/services/canvas
   __init__.py806124%18–25, 29, 33, 37, 43, 55–64, 69–105, 109–124, 128
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py372922%8, 16–17, 34–60, 73–89
   data.py473428%10–15, 19–23, 27–31, 35–37, 41–52, 56–58, 62–63, 67–68
   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__.py352529%17–34, 38–65
   smtp.py441566%16, 28–30, 32–34, 50–57
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py321166%20–33, 39, 44, 50, 56–57, 66, 69
server/utils
   date.py7443%17–19, 30
   misc.py161319%5–9, 13–19, 23
TOTAL1725105339% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 6.726s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py48492%21–22, 67, 75
   forms.py1131587%22–24, 40–42, 67–69, 120–123, 130, 138
   models.py1674275%28, 56, 60, 63, 66, 69, 72–77, 103, 107, 110–119, 122, 125, 139, 142–144, 147, 151, 163, 167, 171, 175–176, 182, 185, 205, 208, 229, 232, 246
   views.py64254216%32, 42–78, 88–122, 133–137, 154–163, 179–196, 207–214, 223–245, 256–269, 278, 289–292, 303–322, 335–359, 368–390, 399–426, 435–444, 453–495, 506–511, 519–522, 530–555, 563–588, 596–624, 632–649, 656, 661–665, 674–676, 681–728, 734–785, 791–802, 807–827, 832–857, 862–877, 882–901, 915, 920, 928–929, 937, 942–946
server/controllers
   __init__.py572949%25–52, 55, 66–75, 78
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py20765%17–18, 23–27
server/services/auth
   __init__.py29679%22, 51, 56–57, 62–63
server/services/canvas
   __init__.py806124%18–25, 29, 33, 37, 43, 55–64, 69–105, 109–124, 128
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py372922%8, 16–17, 34–60, 73–89
   data.py473428%10–15, 19–23, 27–31, 35–37, 41–52, 56–58, 62–63, 67–68
   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__.py352529%17–34, 38–65
   smtp.py441566%16, 28–30, 32–34, 50–57
server/services/email/templates
   __init__.py33197%20
server/services/google
   __init__.py542946%23, 31, 33, 41–44, 48–54, 58–77
server/typings
   exception.py321166%20–33, 39, 44, 50, 56–57, 66, 69
server/utils
   date.py7443%17–19, 30
   misc.py161319%5–9, 13–19, 23
TOTAL1725105339% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 0.837s ⏱️

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 38.95%. Comparing base (6959451) to head (81a3b1d).

Files Patch % Lines
server/views.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
- Coverage   38.97%   38.95%   -0.03%     
==========================================
  Files          27       27              
  Lines        1724     1725       +1     
==========================================
  Hits          672      672              
- Misses       1052     1053       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py481079%13, 16–22, 27, 67, 75
   forms.py1131587%22–24, 40–42, 67–69, 120–123, 130, 138
   models.py1674474%27–30, 56, 60, 63, 66, 69, 72–77, 103, 107, 110–119, 122, 125, 139, 142–144, 147, 151, 163, 167, 171, 175–176, 182, 185, 205, 208, 229, 232, 246
   views.py64254515%31–33, 42–78, 88–122, 133–137, 154–163, 179–196, 207–214, 223–245, 256–269, 278, 289–292, 303–322, 335–359, 368–390, 399–426, 435–444, 453–495, 506–511, 519–522, 530–555, 563–588, 596–624, 632–649, 656, 661–665, 674–676, 681–728, 734–785, 791–802, 807–827, 832–857, 862–877, 882–901, 910, 915, 920, 928–929, 937, 942–946
server/controllers
   __init__.py572949%25–52, 55, 66–75, 78
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py201240%8, 13–18, 23–27
server/services/auth
   __init__.py29679%22, 51, 56–57, 62–63
server/services/canvas
   __init__.py806124%18–25, 29, 33, 37, 43, 55–64, 69–105, 109–124, 128
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py372922%8, 16–17, 34–60, 73–89
   data.py473428%10–15, 19–23, 27–31, 35–37, 41–52, 56–58, 62–63, 67–68
   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__.py352529%17–34, 38–65
   smtp.py443130%16, 25–57
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.py321166%20–33, 39, 44, 50, 56–57, 66, 69
server/utils
   date.py7443%17–19, 30
   misc.py161319%5–9, 13–19, 23
TOTAL1725110736% 

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 33.760s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py481079%13, 16–22, 27, 67, 75
   forms.py1131587%22–24, 40–42, 67–69, 120–123, 130, 138
   models.py1674474%27–30, 56, 60, 63, 66, 69, 72–77, 103, 107, 110–119, 122, 125, 139, 142–144, 147, 151, 163, 167, 171, 175–176, 182, 185, 205, 208, 229, 232, 246
   views.py64254515%31–33, 42–78, 88–122, 133–137, 154–163, 179–196, 207–214, 223–245, 256–269, 278, 289–292, 303–322, 335–359, 368–390, 399–426, 435–444, 453–495, 506–511, 519–522, 530–555, 563–588, 596–624, 632–649, 656, 661–665, 674–676, 681–728, 734–785, 791–802, 807–827, 832–857, 862–877, 882–901, 910, 915, 920, 928–929, 937, 942–946
server/controllers
   __init__.py572949%25–52, 55, 66–75, 78
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py201240%8, 13–18, 23–27
server/services/auth
   __init__.py29679%22, 51, 56–57, 62–63
server/services/canvas
   __init__.py806124%18–25, 29, 33, 37, 43, 55–64, 69–105, 109–124, 128
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py372922%8, 16–17, 34–60, 73–89
   data.py473428%10–15, 19–23, 27–31, 35–37, 41–52, 56–58, 62–63, 67–68
   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__.py352529%17–34, 38–65
   smtp.py443130%16, 25–57
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.py321166%20–33, 39, 44, 50, 56–57, 66, 69
server/utils
   date.py7443%17–19, 30
   misc.py161319%5–9, 13–19, 23
TOTAL1725110736% 

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 38.399s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py481079%13, 16–22, 27, 67, 75
   forms.py1131587%22–24, 40–42, 67–69, 120–123, 130, 138
   models.py1674474%27–30, 56, 60, 63, 66, 69, 72–77, 103, 107, 110–119, 122, 125, 139, 142–144, 147, 151, 163, 167, 171, 175–176, 182, 185, 205, 208, 229, 232, 246
   views.py64254515%31–33, 42–78, 88–122, 133–137, 154–163, 179–196, 207–214, 223–245, 256–269, 278, 289–292, 303–322, 335–359, 368–390, 399–426, 435–444, 453–495, 506–511, 519–522, 530–555, 563–588, 596–624, 632–649, 656, 661–665, 674–676, 681–728, 734–785, 791–802, 807–827, 832–857, 862–877, 882–901, 910, 915, 920, 928–929, 937, 942–946
server/controllers
   __init__.py572949%25–52, 55, 66–75, 78
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py201240%8, 13–18, 23–27
server/services/auth
   __init__.py29679%22, 51, 56–57, 62–63
server/services/canvas
   __init__.py806124%18–25, 29, 33, 37, 43, 55–64, 69–105, 109–124, 128
   fake_canvas.py392633%9, 12, 15, 20–25, 28–29, 37–46, 49–56
server/services/core
   assign.py372922%8, 16–17, 34–60, 73–89
   data.py473428%10–15, 19–23, 27–31, 35–37, 41–52, 56–58, 62–63, 67–68
   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__.py352529%17–34, 38–65
   smtp.py443130%16, 25–57
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.py321166%20–33, 39, 44, 50, 56–57, 66, 69
server/utils
   date.py7443%17–19, 30
   misc.py161319%5–9, 13–19, 23
TOTAL1725110736% 

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 53.895s ⏱️

@Reimirno Reimirno merged commit 42f4680 into main Mar 14, 2024
14 of 16 checks passed
@Reimirno Reimirno deleted the fix-n+1 branch March 14, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant