-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include household_id cols; update sample data (#180)
- Loading branch information
1 parent
00e85f4
commit 4f94992
Showing
12 changed files
with
90 additions
and
39 deletions.
There are no files selected for viewing
Binary file modified
BIN
+3.6 KB
(110%)
...dopeople/data/sample_datasets/american_community_survey/american_community_survey.parquet
Binary file not shown.
Binary file modified
BIN
+10.6 KB
(110%)
...dopeople/data/sample_datasets/current_population_survey/current_population_survey.parquet
Binary file not shown.
Binary file modified
BIN
+86.1 KB
(110%)
src/pseudopeople/data/sample_datasets/decennial_census/decennial_census.parquet
Binary file not shown.
Binary file modified
BIN
+86.3 KB
(110%)
src/pseudopeople/data/sample_datasets/social_security/social_security.parquet
Binary file not shown.
Binary file modified
BIN
+309 KB
(110%)
src/pseudopeople/data/sample_datasets/taxes_1040/taxes_1040.parquet
Binary file not shown.
Binary file modified
BIN
+37.5 KB
(100%)
src/pseudopeople/data/sample_datasets/taxes_dependents/taxes_dependents.parquet
Binary file not shown.
Binary file modified
BIN
+277 KB
(100%)
src/pseudopeople/data/sample_datasets/taxes_w2_and_1099/taxes_w2_and_1099.parquet
Binary file not shown.
Binary file modified
BIN
+2.85 KB
(100%)
...people/data/sample_datasets/women_infants_and_children/women_infants_and_children.parquet
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import pandas as pd | ||
import pytest | ||
|
||
from pseudopeople.schema_entities import COLUMNS, DATASETS | ||
from tests.integration.conftest import _get_common_datasets | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"dataset_name", | ||
[ | ||
DATASETS.census.name, | ||
DATASETS.acs.name, | ||
DATASETS.cps.name, | ||
DATASETS.ssa.name, | ||
DATASETS.tax_w2_1099.name, | ||
DATASETS.wic.name, | ||
"TODO: tax_1040", | ||
], | ||
) | ||
def test_unnoised_id_cols(dataset_name: str, request): | ||
"""Tests that all datasets retain unnoised simulant_id and household_id""" | ||
if "TODO" in dataset_name: | ||
pytest.skip(reason=dataset_name) | ||
unnoised_id_cols = [COLUMNS.simulant_id.name, COLUMNS.household_id.name] | ||
data = request.getfixturevalue(f"sample_data_{dataset_name}") | ||
noised_data = request.getfixturevalue(f"noised_sample_data_{dataset_name}") | ||
check_noised, check_original, _ = _get_common_datasets(dataset_name, data, noised_data) | ||
assert ( | ||
( | ||
check_original.reset_index()[unnoised_id_cols] | ||
== check_noised.reset_index()[unnoised_id_cols] | ||
) | ||
.all() | ||
.all() | ||
) |