diff --git a/scf/load.py b/scf/load.py index 931dd32..9f33181 100644 --- a/scf/load.py +++ b/scf/load.py @@ -14,7 +14,7 @@ def scf_url(year: int): :rtype: str """ assert year in VALID_YEARS, "The SCF is not available for " + str(year) - return ('https://www.federalreserve.gov/econres/files/scfp' + + return ('https://www.federalreserve.gov/econres/files/scfp' + str(year) + 's.zip') diff --git a/scf/tests/test_load.py b/scf/tests/test_load.py index 9f2754e..bd59d94 100644 --- a/scf/tests/test_load.py +++ b/scf/tests/test_load.py @@ -4,6 +4,7 @@ def equal_elements(l1, l2): return set(l1) == set(l2) + def test_load_multiple_years(): YEARS = [2016, 2019] res = scf.load(YEARS, ['income', 'networth']) @@ -11,6 +12,7 @@ def test_load_multiple_years(): assert equal_elements(res.columns, ['income', 'networth', 'wgt', 'year']) assert equal_elements(res.year.unique().tolist(), YEARS) + def test_load_single_year(): # Test with a single year and single column. res = scf.load(2016, 'networth') diff --git a/setup.py b/setup.py index 7fedc0b..1dd4bc0 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,8 @@ setup( name="scf", version="0.1.0", - description="Python package for working with the Survey of Consumer Finances microdata.", + description=("Python package for working with the Survey of Consumer " + + "Finances microdata."), url="http://github.com/maxghenis/scf", author="Max Ghenis", author_email="mghenis@gmail.com",