TheCGO / fiscalsim-us

FiscalSim US is a microsimulation model of the US federal and state tax and benefit system relating to households and individuals.
https://thecgo.github.io/fiscalsim-us/
GNU Affero General Public License v3.0
11 stars 12 forks source link

Changed parameter #12

Closed ss7886 closed 1 year ago

ss7886 commented 1 year ago

Fixed variable name in fiscalsim_us/data/datasets/cps/raw_cps.py to fix two failing tests.

rickecon commented 1 year ago

@ss7886. Thanks for finding that error in raw_cps.py. I still can't get the test_microsim.py::test_microsim_runs_cps test to pass. I get the following error.

E   KeyError: "Unable to open object (object 'person_id' doesn't exist)"

I think this is being caused by some data being downloaded from the first version of fiscalsim-us from the following URL in line 18 of cps.py.

url_by_year = {
    2021: "https://github.com/TheCGO/fiscalsim-us/releases/download/v0.0.0/cps_2021.h5",
}

I wonder if the cps_2021.h5 file is not downloading because fiscalsim-us is currently private. The analogous code in the current policyengine-us cps.py is the following:

url_by_year = {
    2020: "https://github.com/PolicyEngine/openfisca-us/releases/download/cps-v0/cps_2020.h5",
    2021: "https://github.com/PolicyEngine/openfisca-us/releases/download/cps-2021-v0/cps_2021.h5",
    2022: "https://github.com/PolicyEngine/openfisca-us/releases/download/cps-2021-v0/cps_2022.h5",
}

Putting this other code into cps.py does not fix the problem.

rickecon commented 1 year ago

@ss7886. I am going to merge your change in. I have found a much bigger solution that solves the test that is not passing. That will go in the next PR.