Skip to content

Commit

Permalink
Merge branch 'master' into corp_incidence
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker authored Apr 18, 2024
2 parents a595103 + 10c94ef commit 7cf155e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cs-config/cs_config/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ class MetaParameters(paramtools.Parameters):
},
"data_source": {
"title": "Data Source",
"description": "Data source can be PUF or CPS",
"description": "CPS is currently the only supported data source",
"type": "str",
"value": "PUF",
"validators": {"choice": {"choices": ["PUF", "CPS"]}},
"value": "CPS",
"validators": {"choice": {"choices": ["CPS"]}}
},
"use_full_sample": {
"title": "Use Full Sample",
Expand Down
18 changes: 18 additions & 0 deletions cs-config/cs_config/tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ def test_start_year_with_data_source():
)
assert res["errors_warnings"]["policy"]["errors"].get("year")

# def test_start_year_with_data_source():
# """
# Test interaction between PUF and CPS data sources and the start year.
# """
# data = functions.get_inputs({"data_source": "PUF"})
# assert data["meta_parameters"]["year"]["validators"]["choice"]["choices"][0] == 2013
# data = functions.get_inputs({"data_source": "CPS"})
# assert data["meta_parameters"]["year"]["validators"]["choice"]["choices"][0] == 2014

# ew = {
# "policy": {"errors": {}, "warnings": {}},
# "behavior": {"errors": {}, "warnings": {}},
# }
# res = functions.validate_inputs(
# {"data_source": "CPS", "year": 2013}, {"policy": {}, "behavior": {}}, ew
# )
# assert res["errors_warnings"]["policy"]["errors"].get("year")


class TestFunctions1(CoreTestFunctions):
get_version = functions.get_version
Expand Down

0 comments on commit 7cf155e

Please sign in to comment.