Commit a8e29c6
committed
feat: comprehensive test coverage improvements and code quality enhancements
- Improve test coverage from 93% to 97% (4,352 statements, 138 missed)
- Add 17 new tests covering previously uncovered functions and error paths
- Fix get_partition cache isolation issue in tests by adding setup_method
- Add comprehensive tests for S3 models (get_presigned_url, validation edge cases, FASTQ pair detection)
- Add tests for run_analysis instance type analysis and error handling
- Add tests for S3 search engine (invalid tokens, buffer overflow, exception handling)
- Add tests for HealthOmics search engine (fallback filtering, error handling)
- Add tests for genomics search orchestrator (cache cleanup, timeout handling, coordination logic)
- Replace magic numbers with centralized constants in consts.py
- Add AWS partition detection with memoization for ARN construction
- Enhance cache management with TTL-based cleanup and size limits
- Add MCP timeout and search documentation to README
- Remove line number references from test docstrings for maintainability
- Fix duplicate fixture definitions and type errors
- Ensure all linting, formatting, type checking, and security checks pass
Total test count: 975 tests (up from 958)
Coverage improvement: +4 percentage points
All quality gates passing: Ruff, Pyright, Bandit, Pytest1 parent ebd02bc commit a8e29c6
File tree
19 files changed
+1619
-78
lines changed- src/aws-healthomics-mcp-server
- awslabs/aws_healthomics_mcp_server
- models
- search
- utils
- tests
- fixtures
19 files changed
+1619
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
| |||
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
| 521 | + | |
519 | 522 | | |
520 | 523 | | |
521 | 524 | | |
| |||
541 | 544 | | |
542 | 545 | | |
543 | 546 | | |
| 547 | + | |
544 | 548 | | |
545 | 549 | | |
546 | 550 | | |
| |||
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
575 | | - | |
| 579 | + | |
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| |||
606 | 610 | | |
607 | 611 | | |
608 | 612 | | |
609 | | - | |
| 613 | + | |
610 | 614 | | |
611 | 615 | | |
612 | 616 | | |
| |||
Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
95 | 175 | | |
96 | 176 | | |
97 | 177 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
197 | 203 | | |
198 | 204 | | |
199 | 205 | | |
| |||
Lines changed: 93 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
20 | 33 | | |
21 | 34 | | |
22 | 35 | | |
| |||
356 | 369 | | |
357 | 370 | | |
358 | 371 | | |
359 | | - | |
360 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
361 | 376 | | |
362 | 377 | | |
363 | 378 | | |
| |||
424 | 439 | | |
425 | 440 | | |
426 | 441 | | |
427 | | - | |
428 | | - | |
| 442 | + | |
| 443 | + | |
429 | 444 | | |
430 | 445 | | |
431 | 446 | | |
| |||
489 | 504 | | |
490 | 505 | | |
491 | 506 | | |
492 | | - | |
| 507 | + | |
493 | 508 | | |
494 | | - | |
495 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
496 | 512 | | |
497 | 513 | | |
498 | 514 | | |
| |||
1003 | 1019 | | |
1004 | 1020 | | |
1005 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1006 | 1026 | | |
1007 | 1027 | | |
1008 | 1028 | | |
| |||
1030 | 1050 | | |
1031 | 1051 | | |
1032 | 1052 | | |
1033 | | - | |
| 1053 | + | |
1034 | 1054 | | |
1035 | 1055 | | |
1036 | 1056 | | |
1037 | | - | |
| 1057 | + | |
1038 | 1058 | | |
1039 | 1059 | | |
1040 | 1060 | | |
1041 | 1061 | | |
1042 | 1062 | | |
1043 | | - | |
| 1063 | + | |
1044 | 1064 | | |
1045 | 1065 | | |
1046 | 1066 | | |
1047 | 1067 | | |
1048 | 1068 | | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1053 | 1073 | | |
1054 | 1074 | | |
1055 | 1075 | | |
| |||
1098 | 1118 | | |
1099 | 1119 | | |
1100 | 1120 | | |
1101 | | - | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1102 | 1140 | | |
1103 | 1141 | | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
1104 | 1178 | | |
1105 | 1179 | | |
1106 | 1180 | | |
| |||
1136 | 1210 | | |
1137 | 1211 | | |
1138 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1139 | 1216 | | |
1140 | 1217 | | |
1141 | 1218 | | |
1142 | 1219 | | |
1143 | 1220 | | |
| 1221 | + | |
1144 | 1222 | | |
1145 | 1223 | | |
0 commit comments