Skip to content

Commit 9fc8343

Browse files
committed
change tests and percent positive to floats and reorder columns
1 parent 79f7429 commit 9fc8343

File tree

2 files changed

+82
-81
lines changed

2 files changed

+82
-81
lines changed

integrations/server/test_rvdss.py

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_rvdss_repiratory_detections(self):
1212
"""Basic integration test for rvdss endpoint"""
1313
self.cur.execute(
1414
"INSERT INTO `rvdss` (`epiweek`, `time_value`,`time_type`, `issue`, `geo_type`, `geo_value`, `sarscov2_tests`, `sarscov2_positive_tests`, `sarscov2_pct_positive`, `flu_tests`, `flu_positive_tests`, `flu_pct_positive`, `fluah1n1pdm09_positive_tests`, `fluah3_positive_tests`, `fluauns_positive_tests`, `flua_positive_tests`, `flua_tests`, `flua_pct_positive`, `flub_positive_tests`, `flub_tests`, `flub_pct_positive`, `rsv_tests`, `rsv_positive_tests`, `rsv_pct_positive`, `hpiv_tests`, `hpiv1_positive_tests`, `hpiv2_positive_tests`, `hpiv3_positive_tests`, `hpiv4_positive_tests`, `hpivother_positive_tests`, `hpiv_positive_tests`, `hpiv_pct_positive`, `adv_tests`, `adv_positive_tests`, `adv_pct_positive`, `hmpv_tests`, `hmpv_positive_tests`, `hmpv_pct_positive`, `evrv_tests`, `evrv_positive_tests`, `evrv_pct_positive`, `hcov_tests`, `hcov_positive_tests`, `hcov_pct_positive`, `year`) VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
15-
(201212,20120412,"week",20120417,'province','on',10,1,10,20, 10, 50, 1, 1, 1, 5, 20, 25, 4, 20, 20, 30, 3, 10, 40, 2, 2, 2, 1, 1, 8, 20, 40, 16, 40, 10, 2, 20, 1, 0, 0, 24, 3, 12.5, 2012),
15+
(201212,20120412,"week",20120417,'province','on',10.0,1.0,10.0,20.0, 10.0, 50.0, 1.0, 1.0, 1.0, 5.0, 20.0, 25.0, 4.0, 20.0, 20.0, 30.0, 3.0, 10.0, 40.0, 2.0, 2.0, 2.0, 1.0, 1.0, 8.0, 20.0, 40.0, 16.0, 40.0, 10.0, 2.0, 20.0, 1.0, 0.0, 0.0, 24.0, 3.0, 12.5, 2012),
1616
)
1717
self.cnx.commit()
1818

@@ -21,51 +21,52 @@ def test_rvdss_repiratory_detections(self):
2121
response,
2222
{
2323
"epidata": [
24-
{ "epiweek":201212,
25-
"time_value":20120412,
24+
{ "geo_type":"province",
25+
"geo_value":"on",
2626
"time_type":"week",
27+
"epiweek":201212,
28+
"time_value":20120412,
2729
"issue":20120417,
28-
"geo_type":"province",
29-
"geo_value":"on",
30-
"sarscov2_tests":10,
31-
"sarscov2_positive_tests":1,
32-
"sarscov2_pct_positive":10,
33-
"flu_tests":20,
34-
"flu_positive_tests":10,
35-
"flu_pct_positive":50,
36-
"fluah1n1pdm09_positive_tests":1,
37-
"fluah3_positive_tests":1,
38-
"fluauns_positive_tests":1,
39-
"flua_positive_tests":5,
40-
"flua_tests":20,
41-
"flua_pct_positive":25,
42-
"flub_positive_tests":4,
43-
"flub_tests":20,
44-
"flub_pct_positive":25,
45-
"rsv_tests":30,
46-
"rsv_positive_tests":3,
47-
"rsv_pct_positive":10,
48-
"hpiv_tests":40,
49-
"hpiv1_positive_tests":2,
50-
"hpiv2_positive_tests":2,
51-
"hpiv3_positive_tests":2,
52-
"hpiv4_positive_tests":1,
53-
"hpivother_positive_tests":1,
54-
"hpiv_positive_tests":8,
55-
"hpiv_pct_positive":20,
56-
"adv_tests":40,
57-
"adv_positive_tests":16,
58-
"adv_pct_positive":40,
59-
"hmpv_tests":10,
60-
"hmpv_positive_tests":2,
61-
"hmpv_pct_positive":20,
62-
"evrv_tests":1,
63-
"evrv_positive_tests":0,
64-
"evrv_pct_positive":0,
65-
"hcov_tests":24,
66-
"hcov_positive_tests":3,
30+
"year":2012,
31+
"adv_pct_positive":40.0,
32+
"adv_positive_tests":16.0,
33+
"adv_tests":40.0,
34+
"evrv_pct_positive":0.0,
35+
"evrv_positive_tests":0.0,
36+
"evrv_tests":1.0,
37+
"flu_pct_positive":50.0,
38+
"flu_positive_tests":10.0,
39+
"flu_tests":20.0,
40+
"flua_pct_positive":25.0,
41+
"flua_positive_tests":5.0,
42+
"flua_tests":20.0,
43+
"fluah1n1pdm09_positive_tests":1.0,
44+
"fluah3_positive_tests":1.0,
45+
"fluauns_positive_tests":1.0,
46+
"flub_pct_positive":20.0,
47+
"flub_positive_tests":4.0,
48+
"flub_tests":20.0,
6749
"hcov_pct_positive":12.5,
68-
"year":2012
50+
"hcov_positive_tests":3.0,
51+
"hcov_tests":24.0,
52+
"hmpv_pct_positive":20.0,
53+
"hmpv_positive_tests":2.0,
54+
"hmpv_tests":10.0,
55+
"hpiv1_positive_tests":2.0,
56+
"hpiv2_positive_tests":2.0,
57+
"hpiv3_positive_tests":2.0,
58+
"hpiv4_positive_tests":1.0,
59+
"hpiv_pct_positive":20.0,
60+
"hpiv_positive_tests":8.0,
61+
"hpiv_tests":40.0,
62+
"hpivother_positive_tests":1.0,
63+
"rsv_pct_positive":10.0,
64+
"rsv_positive_tests":3.0,
65+
"rsv_tests":30.0,
66+
"sarscov2_pct_positive":10.0,
67+
"sarscov2_positive_tests":1.0,
68+
"sarscov2_tests":10.0
69+
6970
}
7071
],
7172
"result": 1,

src/ddl/rvdss.sql

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,44 @@ CREATE TABLE `rvdss` (
1111
`issue` int(8) NOT NULL,
1212
`geo_type` char(8) NOT NULL,
1313
`geo_value` char(35) NOT NULL,
14-
`sarscov2_tests` int(10),
15-
`sarscov2_positive_tests` int(10),
16-
`sarscov2_pct_positive` int(10),
17-
`flu_tests` int(10),
18-
`flua_tests` int(10),
19-
`flub_tests` int(10),
20-
`flu_positive_tests` int(10),
21-
`flu_pct_positive` int(10),
22-
`fluah1n1pdm09_positive_tests` int(10),
23-
`fluah3_positive_tests` int(10),
24-
`fluauns_positive_tests` int(10),
25-
`flua_positive_tests` int(10),
26-
`flua_pct_positive` int(10),
27-
`flub_positive_tests` int(10),
28-
`flub_pct_positive` int(10),
29-
`rsv_tests` int(10),
30-
`rsv_positive_tests` int(10),
31-
`rsv_pct_positive` int(10),
32-
`hpiv_tests` int(10),
33-
`hpiv1_positive_tests` int(10),
34-
`hpiv2_positive_tests` int(10),
35-
`hpiv3_positive_tests` int(10),
36-
`hpiv4_positive_tests` int(10),
37-
`hpivother_positive_tests` int(10),
38-
`hpiv_positive_tests` int(10),
39-
`hpiv_pct_positive` int(10),
40-
`adv_tests` int(10),
41-
`adv_positive_tests` int(10),
42-
`adv_pct_positive` int(10),
43-
`hmpv_tests` int(10),
44-
`hmpv_positive_tests` int(10),
45-
`hmpv_pct_positive` int(10),
46-
`evrv_tests` int(10),
47-
`evrv_positive_tests` int(10),
48-
`evrv_pct_positive` int(10),
49-
`hcov_tests` int(10),
50-
`hcov_positive_tests` int(10),
51-
`hcov_pct_positive` int(10),
14+
`sarscov2_tests` float(10),
15+
`sarscov2_positive_tests` float(10),
16+
`sarscov2_pct_positive` float(10),
17+
`flu_tests` float(10),
18+
`flua_tests` float(10),
19+
`flub_tests` float(10),
20+
`flu_positive_tests` float(10),
21+
`flu_pct_positive` float(10),
22+
`fluah1n1pdm09_positive_tests` float(10),
23+
`fluah3_positive_tests` float(10),
24+
`fluauns_positive_tests` float(10),
25+
`flua_positive_tests` float(10),
26+
`flua_pct_positive` float(10),
27+
`flub_positive_tests` float(10),
28+
`flub_pct_positive` float(10),
29+
`rsv_tests` float(10),
30+
`rsv_positive_tests` float(10),
31+
`rsv_pct_positive` float(10),
32+
`hpiv_tests` float(10),
33+
`hpiv1_positive_tests` float(10),
34+
`hpiv2_positive_tests` float(10),
35+
`hpiv3_positive_tests` float(10),
36+
`hpiv4_positive_tests` float(10),
37+
`hpivother_positive_tests` float(10),
38+
`hpiv_positive_tests` float(10),
39+
`hpiv_pct_positive` float(10),
40+
`adv_tests` float(10),
41+
`adv_positive_tests` float(10),
42+
`adv_pct_positive` float(10),
43+
`hmpv_tests` float(10),
44+
`hmpv_positive_tests` float(10),
45+
`hmpv_pct_positive` float(10),
46+
`evrv_tests` float(10),
47+
`evrv_positive_tests` float(10),
48+
`evrv_pct_positive` float(10),
49+
`hcov_tests` float(10),
50+
`hcov_positive_tests` float(10),
51+
`hcov_pct_positive` float(10),
5252
`year` int(4),
5353
PRIMARY KEY (`id`),
5454
UNIQUE KEY `date` (`epiweek`, `time_value`,`issue`, `geo_type`,`geo_value`),

0 commit comments

Comments
 (0)