From 596013fbcae8210c3c11a6758726d8b5a011f7ff Mon Sep 17 00:00:00 2001 From: martinholmer Date: Tue, 7 Mar 2017 18:42:57 -0500 Subject: [PATCH 01/10] Move simtax code/test to taxcalc/validation/taxsim --- .coveragerc | 1 + taxcalc/__init__.py | 1 - taxcalc/tests/test_taxcalcio.py | 20 +++++++++++-------- .../{ => validation/taxsim}/simpletaxio.py | 9 +++++---- .../validation/taxsim/simtax.py | 2 +- taxcalc/validation/taxsim/test | 4 ++-- .../taxsim}/test_simpletaxio.py | 5 +++-- 7 files changed, 24 insertions(+), 18 deletions(-) rename taxcalc/{ => validation/taxsim}/simpletaxio.py (99%) rename simtax.py => taxcalc/validation/taxsim/simtax.py (99%) rename taxcalc/{tests => validation/taxsim}/test_simpletaxio.py (98%) diff --git a/.coveragerc b/.coveragerc index 0fd642d79..9595c2664 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,3 +5,4 @@ omit = taxcalc/_version.py taxcalc/functions.py taxcalc/*.json + taxcalc/validation/taxsim/* diff --git a/taxcalc/__init__.py b/taxcalc/__init__.py index 51088c52c..49dca1239 100755 --- a/taxcalc/__init__.py +++ b/taxcalc/__init__.py @@ -6,7 +6,6 @@ from .growfactors import * from .growdiff import * from .records import * -from .simpletaxio import * from .taxcalcio import * from .utils import * from .decorators import * diff --git a/taxcalc/tests/test_taxcalcio.py b/taxcalc/tests/test_taxcalcio.py index 693869ab4..9b8a94ea1 100644 --- a/taxcalc/tests/test_taxcalcio.py +++ b/taxcalc/tests/test_taxcalcio.py @@ -289,7 +289,7 @@ def assumpfile2(): except OSError: pass # sometimes we can't remove a generated temporary file - +@pytest.mark.one def test_3(rawinputfile, reformfile1, assumpfile1): """ Test TaxCalcIO calculate method with output writing but no aging, @@ -363,11 +363,15 @@ def test_4(reformfile2, assumpfile2): assert output == EXPECTED_OUTPUT +# old test_5 and test_6 have been replaced by expanded test_3 + + +""" def test_5(rawinputfile, reformfile1): - """ + Test TaxCalcIO calculate method with no output writing and no aging and no reform, using the output_records option. - """ + taxyear = 2020 tcio = TaxCalcIO(input_data=rawinputfile.name, tax_year=taxyear, @@ -379,13 +383,13 @@ def test_5(rawinputfile, reformfile1): csv_dump=False) tcio.output_records(writing_output_file=False) assert tcio.tax_year() == taxyear - - +""" +""" def test_6(rawinputfile): - """ + Test TaxCalcIO calculate method with no output writing and no aging and no reform, using the csv_dump option. - """ + taxyear = 2021 tcio = TaxCalcIO(input_data=rawinputfile.name, tax_year=taxyear, @@ -397,7 +401,7 @@ def test_6(rawinputfile): csv_dump=True) tcio.csv_dump(writing_output_file=False) assert tcio.tax_year() == taxyear - +""" LUMPSUM_REFORM_CONTENTS = """ { diff --git a/taxcalc/simpletaxio.py b/taxcalc/validation/taxsim/simpletaxio.py similarity index 99% rename from taxcalc/simpletaxio.py rename to taxcalc/validation/taxsim/simpletaxio.py index e0463fe1f..7d389eaee 100644 --- a/taxcalc/simpletaxio.py +++ b/taxcalc/validation/taxsim/simpletaxio.py @@ -1,5 +1,5 @@ """ -Tax-Calculator simple tax input-output class. +Tax-Calculator simple tax input-output class used in TAXSIM validation work. """ # CODING-STYLE CHECKS: # pep8 --ignore=E402 simpletaxio.py @@ -10,9 +10,10 @@ import re import six import pandas as pd -from .policy import Policy -from .records import Records -from .calculate import Calculator +CUR_PATH = os.path.abspath(os.path.dirname(__file__)) +sys.path.append(os.path.join(CUR_PATH, '..', '..', '..')) +# pylint: disable=wrong-import-position,import-error +from taxcalc import Policy, Records, Calculator class SimpleTaxIO(object): diff --git a/simtax.py b/taxcalc/validation/taxsim/simtax.py similarity index 99% rename from simtax.py rename to taxcalc/validation/taxsim/simtax.py index 3a0d3c9b4..503faa438 100644 --- a/simtax.py +++ b/taxcalc/validation/taxsim/simtax.py @@ -7,7 +7,7 @@ import argparse import sys -from taxcalc import SimpleTaxIO +from simpletaxio import SimpleTaxIO def main(): diff --git a/taxcalc/validation/taxsim/test b/taxcalc/validation/taxsim/test index 73d45ad01..2da562f9f 100755 --- a/taxcalc/validation/taxsim/test +++ b/taxcalc/validation/taxsim/test @@ -35,12 +35,12 @@ YY=${LYY:1:2} tclsh ../taxsim_in.tcl 20$YY $L > $LYY.in # Generate simtax.py OUTPUT for specified INPUT and REFORM if [[ "$REFORM" == "." ]] ; then - python ../../../simtax.py --taxsim2441 $LYY.in + python simtax.py --taxsim2441 $LYY.in SUFFIX="" OVAR4="" else RJSON="reform-$REFORM.json" - python ../../../simtax.py --taxsim2441 --reform $RJSON $LYY.in + python simtax.py --taxsim2441 --reform $RJSON $LYY.in SUFFIX="-reform-$REFORM" OVAR4="--ovar4" fi diff --git a/taxcalc/tests/test_simpletaxio.py b/taxcalc/validation/taxsim/test_simpletaxio.py similarity index 98% rename from taxcalc/tests/test_simpletaxio.py rename to taxcalc/validation/taxsim/test_simpletaxio.py index 325da2083..5e4051c74 100644 --- a/taxcalc/tests/test_simpletaxio.py +++ b/taxcalc/validation/taxsim/test_simpletaxio.py @@ -1,5 +1,6 @@ """ -Tests for Tax-Calculator SimpleTaxIO class. +Tests for SimpleTaxIO class invoked with "py.test" in this directory. + """ # CODING-STYLE CHECKS: # pep8 --ignore=E402 test_simpletaxio.py @@ -8,7 +9,7 @@ import os import tempfile import pytest -from taxcalc import SimpleTaxIO # pylint: disable=import-error +from simpletaxio import SimpleTaxIO NUM_INPUT_LINES = 4 From b4dc2c63160999fd0cf3cceec41d0eefb93e496e Mon Sep 17 00:00:00 2001 From: martinholmer Date: Tue, 7 Mar 2017 18:50:26 -0500 Subject: [PATCH 02/10] Clean up test_taxcalcio.py file --- taxcalc/tests/test_taxcalcio.py | 39 +-------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/taxcalc/tests/test_taxcalcio.py b/taxcalc/tests/test_taxcalcio.py index 9b8a94ea1..e02ab8ec0 100644 --- a/taxcalc/tests/test_taxcalcio.py +++ b/taxcalc/tests/test_taxcalcio.py @@ -289,7 +289,7 @@ def assumpfile2(): except OSError: pass # sometimes we can't remove a generated temporary file -@pytest.mark.one + def test_3(rawinputfile, reformfile1, assumpfile1): """ Test TaxCalcIO calculate method with output writing but no aging, @@ -366,43 +366,6 @@ def test_4(reformfile2, assumpfile2): # old test_5 and test_6 have been replaced by expanded test_3 -""" -def test_5(rawinputfile, reformfile1): - - Test TaxCalcIO calculate method with no output writing and no aging and - no reform, using the output_records option. - - taxyear = 2020 - tcio = TaxCalcIO(input_data=rawinputfile.name, - tax_year=taxyear, - reform=reformfile1.name, - assump=None, - aging_input_data=False, - exact_calculations=False, - output_records=True, - csv_dump=False) - tcio.output_records(writing_output_file=False) - assert tcio.tax_year() == taxyear -""" -""" -def test_6(rawinputfile): - - Test TaxCalcIO calculate method with no output writing and no aging and - no reform, using the csv_dump option. - - taxyear = 2021 - tcio = TaxCalcIO(input_data=rawinputfile.name, - tax_year=taxyear, - reform=None, - assump=None, - aging_input_data=False, - exact_calculations=False, - output_records=False, - csv_dump=True) - tcio.csv_dump(writing_output_file=False) - assert tcio.tax_year() == taxyear -""" - LUMPSUM_REFORM_CONTENTS = """ { "policy": { From 2e6dce470f31d2b758d85029a836612cb9a7d32c Mon Sep 17 00:00:00 2001 From: martinholmer Date: Tue, 7 Mar 2017 18:57:48 -0500 Subject: [PATCH 03/10] Clean up test_simpletaxio.py --- taxcalc/validation/taxsim/test_simpletaxio.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/taxcalc/validation/taxsim/test_simpletaxio.py b/taxcalc/validation/taxsim/test_simpletaxio.py index 5e4051c74..1daf4ef98 100644 --- a/taxcalc/validation/taxsim/test_simpletaxio.py +++ b/taxcalc/validation/taxsim/test_simpletaxio.py @@ -1,6 +1,5 @@ """ -Tests for SimpleTaxIO class invoked with "py.test" in this directory. - +Tests for SimpleTaxIO class. """ # CODING-STYLE CHECKS: # pep8 --ignore=E402 test_simpletaxio.py From 09ef1021ab0b15411d114364890761560fb46a59 Mon Sep 17 00:00:00 2001 From: martinholmer Date: Tue, 7 Mar 2017 19:02:35 -0500 Subject: [PATCH 04/10] Add back test_5 and test_6 to increase code coverage --- taxcalc/tests/test_taxcalcio.py | 35 ++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/taxcalc/tests/test_taxcalcio.py b/taxcalc/tests/test_taxcalcio.py index e02ab8ec0..693869ab4 100644 --- a/taxcalc/tests/test_taxcalcio.py +++ b/taxcalc/tests/test_taxcalcio.py @@ -363,7 +363,40 @@ def test_4(reformfile2, assumpfile2): assert output == EXPECTED_OUTPUT -# old test_5 and test_6 have been replaced by expanded test_3 +def test_5(rawinputfile, reformfile1): + """ + Test TaxCalcIO calculate method with no output writing and no aging and + no reform, using the output_records option. + """ + taxyear = 2020 + tcio = TaxCalcIO(input_data=rawinputfile.name, + tax_year=taxyear, + reform=reformfile1.name, + assump=None, + aging_input_data=False, + exact_calculations=False, + output_records=True, + csv_dump=False) + tcio.output_records(writing_output_file=False) + assert tcio.tax_year() == taxyear + + +def test_6(rawinputfile): + """ + Test TaxCalcIO calculate method with no output writing and no aging and + no reform, using the csv_dump option. + """ + taxyear = 2021 + tcio = TaxCalcIO(input_data=rawinputfile.name, + tax_year=taxyear, + reform=None, + assump=None, + aging_input_data=False, + exact_calculations=False, + output_records=False, + csv_dump=True) + tcio.csv_dump(writing_output_file=False) + assert tcio.tax_year() == taxyear LUMPSUM_REFORM_CONTENTS = """ From 0bb30c90f8e6e25ace38b95dc185df119460db1a Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 8 Mar 2017 07:17:21 -0500 Subject: [PATCH 05/10] Move away from relative imports per PEP8 --- taxcalc/__init__.py | 28 ++++++++++---------- taxcalc/behavior.py | 4 +-- taxcalc/calculate.py | 12 ++++----- taxcalc/consumption.py | 6 ++--- taxcalc/decorators.py | 2 +- taxcalc/dropq/__init__.py | 10 ++++---- taxcalc/dropq/dropq.py | 22 ++++++++-------- taxcalc/filings/__init__.py | 2 +- taxcalc/filings/forms/__init__.py | 40 ++++++++++++++--------------- taxcalc/filings/forms/tax_form.py | 2 +- taxcalc/filings/forms/us1040.py | 2 +- taxcalc/filings/forms/us1040sa.py | 2 +- taxcalc/filings/forms/us1040sb.py | 2 +- taxcalc/filings/forms/us1040sc.py | 2 +- taxcalc/filings/forms/us1040sd.py | 2 +- taxcalc/filings/forms/us1040se.py | 2 +- taxcalc/filings/forms/us1040seic.py | 2 +- taxcalc/filings/forms/us1040sr.py | 2 +- taxcalc/filings/forms/us1040sse.py | 2 +- taxcalc/filings/forms/us2441.py | 2 +- taxcalc/filings/forms/us3800.py | 2 +- taxcalc/filings/forms/us4137.py | 2 +- taxcalc/filings/forms/us4255.py | 2 +- taxcalc/filings/forms/us4952.py | 2 +- taxcalc/filings/forms/us5695.py | 2 +- taxcalc/filings/forms/us6251.py | 2 +- taxcalc/filings/forms/us8801.py | 2 +- taxcalc/filings/forms/us8863.py | 2 +- taxcalc/functions.py | 2 +- taxcalc/growdiff.py | 4 +-- taxcalc/growfactors.py | 2 +- taxcalc/policy.py | 4 +-- taxcalc/records.py | 4 +-- taxcalc/taxcalcio.py | 16 ++++++------ 34 files changed, 98 insertions(+), 98 deletions(-) diff --git a/taxcalc/__init__.py b/taxcalc/__init__.py index 49dca1239..c3bf24969 100755 --- a/taxcalc/__init__.py +++ b/taxcalc/__init__.py @@ -1,17 +1,17 @@ -from .calculate import * -from .policy import * -from .behavior import * -from .consumption import * -from .filings import * -from .growfactors import * -from .growdiff import * -from .records import * -from .taxcalcio import * -from .utils import * -from .decorators import * -from .macro_elasticity import * -from .dropq import * +from calculate import * +from policy import * +from behavior import * +from consumption import * +from filings import * +from growfactors import * +from growdiff import * +from records import * +from taxcalcio import * +from utils import * +from decorators import * +from macro_elasticity import * +from dropq import * -from ._version import get_versions +from _version import get_versions __version__ = get_versions()['version'] del get_versions diff --git a/taxcalc/behavior.py b/taxcalc/behavior.py index 0af2eaf5e..f250aa6ec 100644 --- a/taxcalc/behavior.py +++ b/taxcalc/behavior.py @@ -7,8 +7,8 @@ import copy import numpy as np -from .policy import Policy -from .parameters import ParametersBase +from taxcalc.policy import Policy +from taxcalc.parameters import ParametersBase class Behavior(ParametersBase): diff --git a/taxcalc/calculate.py b/taxcalc/calculate.py index f0b6bf611..f415224a4 100644 --- a/taxcalc/calculate.py +++ b/taxcalc/calculate.py @@ -15,12 +15,12 @@ import re import copy import numpy as np -from .utils import * -from .functions import * -from .policy import Policy -from .records import Records -from .behavior import Behavior -from .consumption import Consumption +from taxcalc.utils import * +from taxcalc.functions import * +from taxcalc.policy import Policy +from taxcalc.records import Records +from taxcalc.behavior import Behavior +from taxcalc.consumption import Consumption # import pdb diff --git a/taxcalc/consumption.py b/taxcalc/consumption.py index 1c0961f18..3a861c9cb 100644 --- a/taxcalc/consumption.py +++ b/taxcalc/consumption.py @@ -5,9 +5,9 @@ # pep8 --ignore=E402 consumption.py # pylint --disable=locally-disabled consumption.py -from .parameters import ParametersBase -from .policy import Policy -from .records import Records +from taxcalc.parameters import ParametersBase +from taxcalc.policy import Policy +from taxcalc.records import Records class Consumption(ParametersBase): diff --git a/taxcalc/decorators.py b/taxcalc/decorators.py index 641a9eb77..2423a8114 100644 --- a/taxcalc/decorators.py +++ b/taxcalc/decorators.py @@ -9,7 +9,7 @@ import inspect import toolz from six import StringIO -from .policy import Policy +from taxcalc.policy import Policy def id_wrapper(*dec_args, **dec_kwargs): # pylint: disable=unused-argument diff --git a/taxcalc/dropq/__init__.py b/taxcalc/dropq/__init__.py index 323d87b63..ed48bb66f 100644 --- a/taxcalc/dropq/__init__.py +++ b/taxcalc/dropq/__init__.py @@ -1,5 +1,5 @@ -from .dropq import (run_model, run_nth_year_model, check_user_mods, - run_gdp_elast_model, run_nth_year_gdp_elast_model, - calculate_baseline_and_reform, - chooser, drop_records, - format_macro_results, groupby_means_and_comparisons) +from dropq import (run_model, run_nth_year_model, check_user_mods, + run_gdp_elast_model, run_nth_year_gdp_elast_model, + calculate_baseline_and_reform, + chooser, drop_records, + format_macro_results, groupby_means_and_comparisons) diff --git a/taxcalc/dropq/dropq.py b/taxcalc/dropq/dropq.py index 262aa69ed..bd81abf1b 100644 --- a/taxcalc/dropq/dropq.py +++ b/taxcalc/dropq/dropq.py @@ -11,17 +11,17 @@ import numpy as np from pandas import DataFrame import pandas as pd -from .dropq_utils import create_dropq_difference_table as dropq_diff_table -from .dropq_utils import create_dropq_distribution_table as dropq_dist_table -from .dropq_utils import (WEBAPP_INCOME_BINS, - add_income_bins, - add_weighted_income_bins, - create_distribution_table, - create_json_table) -from .. import (Calculator, Growfactors, Records, - Policy, Consumption, Behavior, Growdiff, - proportional_change_gdp, - TABLE_LABELS, TABLE_COLUMNS, STATS_COLUMNS) +from dropq_utils import create_dropq_difference_table as dropq_diff_table +from dropq_utils import create_dropq_distribution_table as dropq_dist_table +from dropq_utils import (WEBAPP_INCOME_BINS, + add_income_bins, + add_weighted_income_bins, + create_distribution_table, + create_json_table) +from taxcalc import (Calculator, Growfactors, Records, + Policy, Consumption, Behavior, Growdiff, + proportional_change_gdp, + TABLE_LABELS, TABLE_COLUMNS, STATS_COLUMNS) # specify constants diff --git a/taxcalc/filings/__init__.py b/taxcalc/filings/__init__.py index ac7d28162..cd5be0db1 100644 --- a/taxcalc/filings/__init__.py +++ b/taxcalc/filings/__init__.py @@ -1 +1 @@ -from .forms import * +from forms import * diff --git a/taxcalc/filings/forms/__init__.py b/taxcalc/filings/forms/__init__.py index ccf8f87ea..a623c1705 100644 --- a/taxcalc/filings/forms/__init__.py +++ b/taxcalc/filings/forms/__init__.py @@ -1,20 +1,20 @@ -from .errors import * -from .tax_form import TaxForm -from .us1040 import US1040 -from .us1040sa import US1040SA -from .us1040sb import US1040SB -from .us1040sc import US1040SC -from .us1040sd import US1040SD -from .us1040se import US1040SE -from .us1040seic import US1040SEIC -from .us1040sr import US1040SR -from .us1040sse import US1040SSE -from .us2441 import US2441 -from .us3800 import US3800 -from .us4137 import US4137 -from .us4255 import US4255 -from .us4952 import US4952 -from .us5695 import US5695 -from .us6251 import US6251 -from .us8801 import US8801 -from .us8863 import US8863 +from errors import * +from tax_form import TaxForm +from us1040 import US1040 +from us1040sa import US1040SA +from us1040sb import US1040SB +from us1040sc import US1040SC +from us1040sd import US1040SD +from us1040se import US1040SE +from us1040seic import US1040SEIC +from us1040sr import US1040SR +from us1040sse import US1040SSE +from us2441 import US2441 +from us3800 import US3800 +from us4137 import US4137 +from us4255 import US4255 +from us4952 import US4952 +from us5695 import US5695 +from us6251 import US6251 +from us8801 import US8801 +from us8863 import US8863 diff --git a/taxcalc/filings/forms/tax_form.py b/taxcalc/filings/forms/tax_form.py index c71f9a036..1463ad3d2 100644 --- a/taxcalc/filings/forms/tax_form.py +++ b/taxcalc/filings/forms/tax_form.py @@ -1,6 +1,6 @@ import six -from .errors import UnsupportedFormYearError +from errors import UnsupportedFormYearError from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040.py b/taxcalc/filings/forms/us1040.py index 150e8d483..cd623c284 100644 --- a/taxcalc/filings/forms/us1040.py +++ b/taxcalc/filings/forms/us1040.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040sa.py b/taxcalc/filings/forms/us1040sa.py index ea81bbcf4..79b85fc63 100644 --- a/taxcalc/filings/forms/us1040sa.py +++ b/taxcalc/filings/forms/us1040sa.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040sb.py b/taxcalc/filings/forms/us1040sb.py index d0da7b751..db118beda 100644 --- a/taxcalc/filings/forms/us1040sb.py +++ b/taxcalc/filings/forms/us1040sb.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US1040SB(TaxForm): diff --git a/taxcalc/filings/forms/us1040sc.py b/taxcalc/filings/forms/us1040sc.py index 1592bb134..eef380d20 100644 --- a/taxcalc/filings/forms/us1040sc.py +++ b/taxcalc/filings/forms/us1040sc.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US1040SC(TaxForm): diff --git a/taxcalc/filings/forms/us1040sd.py b/taxcalc/filings/forms/us1040sd.py index 5b604541d..0a30ba8ab 100644 --- a/taxcalc/filings/forms/us1040sd.py +++ b/taxcalc/filings/forms/us1040sd.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US1040SD(TaxForm): diff --git a/taxcalc/filings/forms/us1040se.py b/taxcalc/filings/forms/us1040se.py index d1c3dd4b5..0d496c011 100644 --- a/taxcalc/filings/forms/us1040se.py +++ b/taxcalc/filings/forms/us1040se.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040seic.py b/taxcalc/filings/forms/us1040seic.py index ec840c328..135ae5fc0 100644 --- a/taxcalc/filings/forms/us1040seic.py +++ b/taxcalc/filings/forms/us1040seic.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US1040SEIC(TaxForm): diff --git a/taxcalc/filings/forms/us1040sr.py b/taxcalc/filings/forms/us1040sr.py index f6f3af86d..1b5e4bdba 100644 --- a/taxcalc/filings/forms/us1040sr.py +++ b/taxcalc/filings/forms/us1040sr.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US1040SR(TaxForm): diff --git a/taxcalc/filings/forms/us1040sse.py b/taxcalc/filings/forms/us1040sse.py index c75961756..5673faa1e 100644 --- a/taxcalc/filings/forms/us1040sse.py +++ b/taxcalc/filings/forms/us1040sse.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US1040SSE(TaxForm): diff --git a/taxcalc/filings/forms/us2441.py b/taxcalc/filings/forms/us2441.py index b3287c0af..db76bffb5 100644 --- a/taxcalc/filings/forms/us2441.py +++ b/taxcalc/filings/forms/us2441.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US2441(TaxForm): diff --git a/taxcalc/filings/forms/us3800.py b/taxcalc/filings/forms/us3800.py index f7789afd8..d4e9cf487 100644 --- a/taxcalc/filings/forms/us3800.py +++ b/taxcalc/filings/forms/us3800.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US3800(TaxForm): diff --git a/taxcalc/filings/forms/us4137.py b/taxcalc/filings/forms/us4137.py index 0bca4ec86..ab291978d 100644 --- a/taxcalc/filings/forms/us4137.py +++ b/taxcalc/filings/forms/us4137.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US4137(TaxForm): diff --git a/taxcalc/filings/forms/us4255.py b/taxcalc/filings/forms/us4255.py index 19481087b..95f37e047 100644 --- a/taxcalc/filings/forms/us4255.py +++ b/taxcalc/filings/forms/us4255.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US4255(TaxForm): diff --git a/taxcalc/filings/forms/us4952.py b/taxcalc/filings/forms/us4952.py index 9c7bb192c..3ff0291cc 100644 --- a/taxcalc/filings/forms/us4952.py +++ b/taxcalc/filings/forms/us4952.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US4952(TaxForm): diff --git a/taxcalc/filings/forms/us5695.py b/taxcalc/filings/forms/us5695.py index 343fffa50..5114c79d5 100644 --- a/taxcalc/filings/forms/us5695.py +++ b/taxcalc/filings/forms/us5695.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US5695(TaxForm): diff --git a/taxcalc/filings/forms/us6251.py b/taxcalc/filings/forms/us6251.py index f3f9f8844..524cdd1b8 100644 --- a/taxcalc/filings/forms/us6251.py +++ b/taxcalc/filings/forms/us6251.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US6251(TaxForm): diff --git a/taxcalc/filings/forms/us8801.py b/taxcalc/filings/forms/us8801.py index 39acfa959..c4375e17a 100644 --- a/taxcalc/filings/forms/us8801.py +++ b/taxcalc/filings/forms/us8801.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US8801(TaxForm): diff --git a/taxcalc/filings/forms/us8863.py b/taxcalc/filings/forms/us8863.py index 1179760c5..810e676b2 100644 --- a/taxcalc/filings/forms/us8863.py +++ b/taxcalc/filings/forms/us8863.py @@ -1,4 +1,4 @@ -from .tax_form import TaxForm +from tax_form import TaxForm class US8863(TaxForm): diff --git a/taxcalc/functions.py b/taxcalc/functions.py index 452a9b530..32d33fc0e 100644 --- a/taxcalc/functions.py +++ b/taxcalc/functions.py @@ -13,7 +13,7 @@ import math import copy import numpy as np -from .decorators import iterate_jit, jit +from taxcalc.decorators import iterate_jit, jit @iterate_jit(nopython=True) diff --git a/taxcalc/growdiff.py b/taxcalc/growdiff.py index e9ae5ea8b..1e46d920d 100644 --- a/taxcalc/growdiff.py +++ b/taxcalc/growdiff.py @@ -6,8 +6,8 @@ # pylint --disable=locally-disabled growdiff.py import numpy as np -from .policy import Policy -from .parameters import ParametersBase +from taxcalc.policy import Policy +from taxcalc.parameters import ParametersBase class Growdiff(ParametersBase): diff --git a/taxcalc/growfactors.py b/taxcalc/growfactors.py index eeabc60b8..d133bb964 100644 --- a/taxcalc/growfactors.py +++ b/taxcalc/growfactors.py @@ -8,7 +8,7 @@ import os import six import pandas as pd -from .utils import read_egg_csv +from taxcalc.utils import read_egg_csv class Growfactors(object): diff --git a/taxcalc/policy.py b/taxcalc/policy.py index 9d6926463..2f8dfb56c 100644 --- a/taxcalc/policy.py +++ b/taxcalc/policy.py @@ -5,8 +5,8 @@ # pep8 --ignore=E402 policy.py # pylint --disable=locally-disabled policy.py -from .parameters import ParametersBase -from .growfactors import Growfactors +from taxcalc.parameters import ParametersBase +from taxcalc.growfactors import Growfactors class Policy(ParametersBase): diff --git a/taxcalc/records.py b/taxcalc/records.py index b2294550a..62bf667cb 100644 --- a/taxcalc/records.py +++ b/taxcalc/records.py @@ -9,8 +9,8 @@ import six import numpy as np import pandas as pd -from .growfactors import Growfactors -from .utils import read_egg_csv +from taxcalc.growfactors import Growfactors +from taxcalc.utils import read_egg_csv PUFCSV_YEAR = 2009 diff --git a/taxcalc/taxcalcio.py b/taxcalc/taxcalcio.py index 0f0a8a960..b36268baa 100644 --- a/taxcalc/taxcalcio.py +++ b/taxcalc/taxcalcio.py @@ -10,14 +10,14 @@ import copy import six import pandas as pd -from .policy import Policy -from .records import Records -from .consumption import Consumption -from .behavior import Behavior -from .growdiff import Growdiff -from .growfactors import Growfactors -from .calculate import Calculator -from .utils import ce_aftertax_income +from taxcalc.policy import Policy +from taxcalc.records import Records +from taxcalc.consumption import Consumption +from taxcalc.behavior import Behavior +from taxcalc.growdiff import Growdiff +from taxcalc.growfactors import Growfactors +from taxcalc.calculate import Calculator +from taxcalc.utils import ce_aftertax_income class TaxCalcIO(object): From 59476cd029660307d118e5e75e0c7b3504d11b6d Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 8 Mar 2017 07:34:13 -0500 Subject: [PATCH 06/10] Edit taxcalc/__init__.py --- taxcalc/__init__.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/taxcalc/__init__.py b/taxcalc/__init__.py index c3bf24969..83fe67380 100755 --- a/taxcalc/__init__.py +++ b/taxcalc/__init__.py @@ -1,17 +1,17 @@ -from calculate import * -from policy import * -from behavior import * -from consumption import * -from filings import * -from growfactors import * -from growdiff import * -from records import * -from taxcalcio import * -from utils import * -from decorators import * -from macro_elasticity import * -from dropq import * +from taxcalc.calculate import * +from taxcalc.policy import * +from taxcalc.behavior import * +from taxcalc.consumption import * +from taxcalc.filings import * +from taxcalc.growfactors import * +from taxcalc.growdiff import * +from taxcalc.records import * +from taxcalc.taxcalcio import * +from taxcalc.utils import * +from taxcalc.decorators import * +from taxcalc.macro_elasticity import * +from taxcalc.dropq import * -from _version import get_versions +from taxcalc._version import get_versions __version__ = get_versions()['version'] del get_versions From 7587767e6710b266cd34387d8f0e67d7da77fc8b Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 8 Mar 2017 07:55:29 -0500 Subject: [PATCH 07/10] Revise filings __init__.py files --- taxcalc/filings/__init__.py | 2 +- taxcalc/filings/forms/__init__.py | 40 +++++++++++++------------- taxcalc/validation/taxsim/d15.taxdiffs | 13 --------- 3 files changed, 21 insertions(+), 34 deletions(-) diff --git a/taxcalc/filings/__init__.py b/taxcalc/filings/__init__.py index cd5be0db1..b798dac16 100644 --- a/taxcalc/filings/__init__.py +++ b/taxcalc/filings/__init__.py @@ -1 +1 @@ -from forms import * +from taxcalc.filings.forms import * diff --git a/taxcalc/filings/forms/__init__.py b/taxcalc/filings/forms/__init__.py index a623c1705..c9513ff40 100644 --- a/taxcalc/filings/forms/__init__.py +++ b/taxcalc/filings/forms/__init__.py @@ -1,20 +1,20 @@ -from errors import * -from tax_form import TaxForm -from us1040 import US1040 -from us1040sa import US1040SA -from us1040sb import US1040SB -from us1040sc import US1040SC -from us1040sd import US1040SD -from us1040se import US1040SE -from us1040seic import US1040SEIC -from us1040sr import US1040SR -from us1040sse import US1040SSE -from us2441 import US2441 -from us3800 import US3800 -from us4137 import US4137 -from us4255 import US4255 -from us4952 import US4952 -from us5695 import US5695 -from us6251 import US6251 -from us8801 import US8801 -from us8863 import US8863 +from taxcalc.filings.forms.errors import * +from taxcalc.filings.forms.tax_form import TaxForm +from taxcalc.filings.forms.us1040 import US1040 +from taxcalc.filings.forms.us1040sa import US1040SA +from taxcalc.filings.forms.us1040sb import US1040SB +from taxcalc.filings.forms.us1040sc import US1040SC +from taxcalc.filings.forms.us1040sd import US1040SD +from taxcalc.filings.forms.us1040se import US1040SE +from taxcalc.filings.forms.us1040seic import US1040SEIC +from taxcalc.filings.forms.us1040sr import US1040SR +from taxcalc.filings.forms.us1040sse import US1040SSE +from taxcalc.filings.forms.us2441 import US2441 +from taxcalc.filings.forms.us3800 import US3800 +from taxcalc.filings.forms.us4137 import US4137 +from taxcalc.filings.forms.us4255 import US4255 +from taxcalc.filings.forms.us4952 import US4952 +from taxcalc.filings.forms.us5695 import US5695 +from taxcalc.filings.forms.us6251 import US6251 +from taxcalc.filings.forms.us8801 import US8801 +from taxcalc.filings.forms.us8863 import US8863 diff --git a/taxcalc/validation/taxsim/d15.taxdiffs b/taxcalc/validation/taxsim/d15.taxdiffs index b5f09a677..e69de29bb 100644 --- a/taxcalc/validation/taxsim/d15.taxdiffs +++ b/taxcalc/validation/taxsim/d15.taxdiffs @@ -1,13 +0,0 @@ -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 7 1 1 0.01 [11965] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 9 4 0 0.90 [16808] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 14 604 604 -1.28 [2349] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 15 604 604 1.28 [56716] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 17 146 0 25000.00 [66962] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 18 750 604 -12400.00 [66962] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 19 1382 1236 -1415.00 [41106] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 24 142 0 -1030.00 [41106] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 25 3 3 0.01 [12248] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 26 151 0 -17702.00 [86307] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 27 1606 1606 -0.43 [2168] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 28 1344 1202 -1030.00 [41106] -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 4 703 703 -0.01 [647] From 6a8d11e4e9f1e561e17b3c77e741be7d31f6efc2 Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 8 Mar 2017 08:07:15 -0500 Subject: [PATCH 08/10] Absolute imports in forms files --- taxcalc/filings/forms/tax_form.py | 2 +- taxcalc/filings/forms/us1040.py | 2 +- taxcalc/filings/forms/us1040sa.py | 2 +- taxcalc/filings/forms/us1040sb.py | 2 +- taxcalc/filings/forms/us1040sc.py | 2 +- taxcalc/filings/forms/us1040sd.py | 2 +- taxcalc/filings/forms/us1040se.py | 2 +- taxcalc/filings/forms/us1040seic.py | 2 +- taxcalc/filings/forms/us1040sr.py | 2 +- taxcalc/filings/forms/us1040sse.py | 2 +- taxcalc/filings/forms/us2441.py | 2 +- taxcalc/filings/forms/us3800.py | 2 +- taxcalc/filings/forms/us4137.py | 2 +- taxcalc/filings/forms/us4255.py | 2 +- taxcalc/filings/forms/us4952.py | 2 +- taxcalc/filings/forms/us5695.py | 2 +- taxcalc/filings/forms/us6251.py | 2 +- taxcalc/filings/forms/us8801.py | 2 +- taxcalc/filings/forms/us8863.py | 2 +- taxcalc/validation/taxsim/d15.taxdiffs | 13 +++++++++++++ 20 files changed, 32 insertions(+), 19 deletions(-) diff --git a/taxcalc/filings/forms/tax_form.py b/taxcalc/filings/forms/tax_form.py index 1463ad3d2..2d0ca15e3 100644 --- a/taxcalc/filings/forms/tax_form.py +++ b/taxcalc/filings/forms/tax_form.py @@ -1,6 +1,6 @@ import six -from errors import UnsupportedFormYearError +from taxcalc.filings.forms.errors import UnsupportedFormYearError from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040.py b/taxcalc/filings/forms/us1040.py index cd623c284..7633a961a 100644 --- a/taxcalc/filings/forms/us1040.py +++ b/taxcalc/filings/forms/us1040.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040sa.py b/taxcalc/filings/forms/us1040sa.py index 79b85fc63..59480b0f4 100644 --- a/taxcalc/filings/forms/us1040sa.py +++ b/taxcalc/filings/forms/us1040sa.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040sb.py b/taxcalc/filings/forms/us1040sb.py index db118beda..1c4d37e46 100644 --- a/taxcalc/filings/forms/us1040sb.py +++ b/taxcalc/filings/forms/us1040sb.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US1040SB(TaxForm): diff --git a/taxcalc/filings/forms/us1040sc.py b/taxcalc/filings/forms/us1040sc.py index eef380d20..b0a77d560 100644 --- a/taxcalc/filings/forms/us1040sc.py +++ b/taxcalc/filings/forms/us1040sc.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US1040SC(TaxForm): diff --git a/taxcalc/filings/forms/us1040sd.py b/taxcalc/filings/forms/us1040sd.py index 0a30ba8ab..6d6682816 100644 --- a/taxcalc/filings/forms/us1040sd.py +++ b/taxcalc/filings/forms/us1040sd.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US1040SD(TaxForm): diff --git a/taxcalc/filings/forms/us1040se.py b/taxcalc/filings/forms/us1040se.py index 0d496c011..e19d5d482 100644 --- a/taxcalc/filings/forms/us1040se.py +++ b/taxcalc/filings/forms/us1040se.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm from taxcalc.utils import string_to_number diff --git a/taxcalc/filings/forms/us1040seic.py b/taxcalc/filings/forms/us1040seic.py index 135ae5fc0..308ba8d01 100644 --- a/taxcalc/filings/forms/us1040seic.py +++ b/taxcalc/filings/forms/us1040seic.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US1040SEIC(TaxForm): diff --git a/taxcalc/filings/forms/us1040sr.py b/taxcalc/filings/forms/us1040sr.py index 1b5e4bdba..57b19c7b4 100644 --- a/taxcalc/filings/forms/us1040sr.py +++ b/taxcalc/filings/forms/us1040sr.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US1040SR(TaxForm): diff --git a/taxcalc/filings/forms/us1040sse.py b/taxcalc/filings/forms/us1040sse.py index 5673faa1e..c7bb4909d 100644 --- a/taxcalc/filings/forms/us1040sse.py +++ b/taxcalc/filings/forms/us1040sse.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US1040SSE(TaxForm): diff --git a/taxcalc/filings/forms/us2441.py b/taxcalc/filings/forms/us2441.py index db76bffb5..9bbed4199 100644 --- a/taxcalc/filings/forms/us2441.py +++ b/taxcalc/filings/forms/us2441.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US2441(TaxForm): diff --git a/taxcalc/filings/forms/us3800.py b/taxcalc/filings/forms/us3800.py index d4e9cf487..4bd544a2c 100644 --- a/taxcalc/filings/forms/us3800.py +++ b/taxcalc/filings/forms/us3800.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US3800(TaxForm): diff --git a/taxcalc/filings/forms/us4137.py b/taxcalc/filings/forms/us4137.py index ab291978d..ca89e189b 100644 --- a/taxcalc/filings/forms/us4137.py +++ b/taxcalc/filings/forms/us4137.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US4137(TaxForm): diff --git a/taxcalc/filings/forms/us4255.py b/taxcalc/filings/forms/us4255.py index 95f37e047..8354ea4b0 100644 --- a/taxcalc/filings/forms/us4255.py +++ b/taxcalc/filings/forms/us4255.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US4255(TaxForm): diff --git a/taxcalc/filings/forms/us4952.py b/taxcalc/filings/forms/us4952.py index 3ff0291cc..f90f0c0d3 100644 --- a/taxcalc/filings/forms/us4952.py +++ b/taxcalc/filings/forms/us4952.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US4952(TaxForm): diff --git a/taxcalc/filings/forms/us5695.py b/taxcalc/filings/forms/us5695.py index 5114c79d5..c5f0a08bd 100644 --- a/taxcalc/filings/forms/us5695.py +++ b/taxcalc/filings/forms/us5695.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US5695(TaxForm): diff --git a/taxcalc/filings/forms/us6251.py b/taxcalc/filings/forms/us6251.py index 524cdd1b8..add6ca2a1 100644 --- a/taxcalc/filings/forms/us6251.py +++ b/taxcalc/filings/forms/us6251.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US6251(TaxForm): diff --git a/taxcalc/filings/forms/us8801.py b/taxcalc/filings/forms/us8801.py index c4375e17a..9d78ec24c 100644 --- a/taxcalc/filings/forms/us8801.py +++ b/taxcalc/filings/forms/us8801.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US8801(TaxForm): diff --git a/taxcalc/filings/forms/us8863.py b/taxcalc/filings/forms/us8863.py index 810e676b2..321e800f8 100644 --- a/taxcalc/filings/forms/us8863.py +++ b/taxcalc/filings/forms/us8863.py @@ -1,4 +1,4 @@ -from tax_form import TaxForm +from taxcalc.filings.forms.tax_form import TaxForm class US8863(TaxForm): diff --git a/taxcalc/validation/taxsim/d15.taxdiffs b/taxcalc/validation/taxsim/d15.taxdiffs index e69de29bb..b5f09a677 100644 --- a/taxcalc/validation/taxsim/d15.taxdiffs +++ b/taxcalc/validation/taxsim/d15.taxdiffs @@ -0,0 +1,13 @@ +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 7 1 1 0.01 [11965] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 9 4 0 0.90 [16808] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 14 604 604 -1.28 [2349] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 15 604 604 1.28 [56716] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 17 146 0 25000.00 [66962] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 18 750 604 -12400.00 [66962] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 19 1382 1236 -1415.00 [41106] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 24 142 0 -1030.00 [41106] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 25 3 3 0.01 [12248] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 26 151 0 -17702.00 [86307] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 27 1606 1606 -0.43 [2168] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 28 1344 1202 -1030.00 [41106] +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 4 703 703 -0.01 [647] From 2c60d40ec9c7f1b1d940ecbb632ba09da1729805 Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 8 Mar 2017 08:24:37 -0500 Subject: [PATCH 09/10] Absolute import in dropq/__init__.py --- taxcalc/dropq/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/taxcalc/dropq/__init__.py b/taxcalc/dropq/__init__.py index ed48bb66f..6074c3b0f 100644 --- a/taxcalc/dropq/__init__.py +++ b/taxcalc/dropq/__init__.py @@ -1,5 +1,8 @@ -from dropq import (run_model, run_nth_year_model, check_user_mods, - run_gdp_elast_model, run_nth_year_gdp_elast_model, - calculate_baseline_and_reform, - chooser, drop_records, - format_macro_results, groupby_means_and_comparisons) +from taxcalc.dropq.dropq import (run_model, check_user_mods, + run_nth_year_model, + run_gdp_elast_model, + run_nth_year_gdp_elast_model, + calculate_baseline_and_reform, + chooser, drop_records, + format_macro_results, + groupby_means_and_comparisons) From bcb5fc64f848323572a85cecfcbdae92b08ac328 Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 8 Mar 2017 08:34:05 -0500 Subject: [PATCH 10/10] Use absolute imports in dropq.py --- taxcalc/dropq/dropq.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/taxcalc/dropq/dropq.py b/taxcalc/dropq/dropq.py index bd81abf1b..b32635c5b 100644 --- a/taxcalc/dropq/dropq.py +++ b/taxcalc/dropq/dropq.py @@ -11,13 +11,15 @@ import numpy as np from pandas import DataFrame import pandas as pd -from dropq_utils import create_dropq_difference_table as dropq_diff_table -from dropq_utils import create_dropq_distribution_table as dropq_dist_table -from dropq_utils import (WEBAPP_INCOME_BINS, - add_income_bins, - add_weighted_income_bins, - create_distribution_table, - create_json_table) +from taxcalc.dropq.dropq_utils import (create_dropq_difference_table as + dropq_diff_table) +from taxcalc.dropq.dropq_utils import (create_dropq_distribution_table as + dropq_dist_table) +from taxcalc.dropq.dropq_utils import (WEBAPP_INCOME_BINS, + add_income_bins, + add_weighted_income_bins, + create_distribution_table, + create_json_table) from taxcalc import (Calculator, Growfactors, Records, Policy, Consumption, Behavior, Growdiff, proportional_change_gdp,