Skip to content

Commit

Permalink
Merge branch 'slice-labels-hs-and-pruning-#158671517' into rel-5.2.208
Browse files Browse the repository at this point in the history
  • Loading branch information
Crunch.io Jenkins Account committed Jul 31, 2018
2 parents af602ce + a3c0479 commit 1d6cdc0
Show file tree
Hide file tree
Showing 3 changed files with 405 additions and 15 deletions.
3 changes: 2 additions & 1 deletion tests/integration/fixtures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@ def _load(cube_file):
)
MR_X_CAT_X_MR_PRUNE = _load('mr-x-cat-x-mr-prune.json')
HUFFPOST_ACTIONS_X_HOUSEHOLD = _load('huffpost-actions-x-household.json')
GENDER_X_WEIGHT = _load('gender-x-weight.json')
GENDER_X_WEIGHT = _load('gender-x-weight.json')
CAT_X_CAT_PRUNING_HS = _load('cat-x-cat-pruning-hs.json')
366 changes: 366 additions & 0 deletions tests/integration/fixtures/cubes/cat-x-cat-pruning-hs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,366 @@
{
"query": {
"measures": {
"count": {
"function": "cube_count",
"args": []
}
},
"dimensions": [
{
"variable": "000009"
},
{
"variable": "000000"
}
],
"weight": "http://127.0.0.1:8080/datasets/43f0d19eb1f241a39b7d5c547a0a6b6e/variables/aabdc9db95e540369e6fe9ed945af802/"
},
"query_environment": {
"filter": [
"http://127.0.0.1:8080/datasets/43f0d19eb1f241a39b7d5c547a0a6b6e/filters/38f5bc15591b45d885db9b41aa35cc15/",
"http://127.0.0.1:8080/datasets/43f0d19eb1f241a39b7d5c547a0a6b6e/filters/0477cb6195234daab49a26225c5b48fb/"
]
},
"result": {
"dimensions": [
{
"derived": false,
"references": {
"alias": "MaritalStatus",
"view": {
"show_counts": false,
"show_numeric_values": false,
"transform": {
"insertions": [
{
"function": "subtotal",
"args": [
2,
3,
4
],
"name": "left alone",
"anchor": 1
}
]
},
"include_missing": false,
"column_width": null
},
"description": "What is your marital status?",
"name": "MaritalStatus"
},
"type": {
"ordinal": false,
"class": "categorical",
"categories": [
{
"numeric_value": 1,
"missing": false,
"id": 1,
"name": "Married"
},
{
"numeric_value": 2,
"missing": false,
"id": 2,
"name": "Separated"
},
{
"numeric_value": 3,
"missing": false,
"id": 3,
"name": "Divorced"
},
{
"numeric_value": 4,
"missing": false,
"id": 4,
"name": "Widowed"
},
{
"numeric_value": 5,
"missing": false,
"id": 5,
"name": "Single"
},
{
"numeric_value": 6,
"missing": false,
"id": 6,
"name": "Domestic partnership"
},
{
"numeric_value": 8,
"missing": true,
"id": 8,
"name": "Skipped"
},
{
"numeric_value": 9,
"missing": true,
"id": 9,
"name": "Not Asked"
},
{
"numeric_value": null,
"missing": true,
"id": -1,
"name": "No Data"
}
]
}
},
{
"derived": false,
"references": {
"alias": "ShutdownBlame",
"description": "If President Obama and the Republicans in Congress do not reach a budget agreement in time to avoid a shutdown of the federal government, who do you think will more to blame--President Obama or the Republican Congress?",
"name": "ShutdownBlame",
"view": {
"show_counts": false,
"column_width": null,
"transform": {
"insertions": [
{
"function": "subtotal",
"args": [
1,
2
],
"name": "Obama + Republicans",
"anchor": 1
}
]
},
"include_missing": false,
"show_numeric_values": false
}
},
"type": {
"ordinal": false,
"class": "categorical",
"categories": [
{
"numeric_value": 1,
"missing": false,
"id": 1,
"name": "President Obama"
},
{
"numeric_value": 2,
"missing": false,
"id": 2,
"name": "Republicans in Congress"
},
{
"numeric_value": 3,
"missing": false,
"id": 3,
"name": "Both"
},
{
"numeric_value": 4,
"missing": false,
"id": 4,
"name": "Neither"
},
{
"numeric_value": 5,
"missing": false,
"id": 5,
"name": "Not sure"
},
{
"numeric_value": 8,
"missing": true,
"id": 8,
"name": "Skipped"
},
{
"numeric_value": 9,
"missing": true,
"id": 9,
"name": "Not Asked"
},
{
"numeric_value": null,
"missing": true,
"id": -1,
"name": "No Data"
}
]
}
}
],
"missing": 0,
"measures": {
"count": {
"data": [
28.265438895,
20.2582324092,
10.0090081073,
0.0,
0.9708737864,
0.0,
0.0,
0.0,
1.0309278351,
0.0,
0.9708737864,
0.0,
0.0,
0.0,
0.0,
0.0,
3.0327294565,
4.0036032429,
2.0618556701,
0.0,
2.0018016215,
0.0,
0.0,
0.0,
3.0327294565,
7.9471524372,
4.9144229807,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.9708737864,
0.9708737864,
0.9708737864,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"n_missing": 0,
"metadata": {
"references": {},
"derived": true,
"type": {
"integer": false,
"missing_rules": {},
"missing_reasons": {
"No Data": -1
},
"class": "numeric"
}
}
}
},
"element": "crunch:cube",
"counts": [
28,
20,
10,
0,
1,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
3,
4,
2,
0,
2,
0,
0,
0,
3,
8,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"n": 91
}
}
Loading

0 comments on commit 1d6cdc0

Please sign in to comment.