From 5ead4dc555096936f8ee4b76676e1ecf0a64044b Mon Sep 17 00:00:00 2001 From: baogorek Date: Mon, 21 Apr 2025 13:54:16 -0400 Subject: [PATCH 01/21] Enable workflow_dispatch for pr_code_changes --- .github/workflows/pr_code_changes.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index f1c9ebd8..6dbad000 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -9,6 +9,7 @@ on: paths: - policyengine_us_data/** - tests/** + workflow_dispatch: jobs: Lint: @@ -46,4 +47,4 @@ jobs: - name: Run tests run: pytest - name: Test documentation builds - run: make documentation \ No newline at end of file + run: make documentation From e9fcf7b5cf8c48532447bee05d87af5879000e23 Mon Sep 17 00:00:00 2001 From: baogorek Date: Mon, 21 Apr 2025 14:23:20 -0400 Subject: [PATCH 02/21] trying to get action to run --- .github/workflows/pr_code_changes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 6dbad000..176189bf 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -9,6 +9,7 @@ on: paths: - policyengine_us_data/** - tests/** + - .github/workflows/pr_code_changes.yaml # TEMPORARY workflow_dispatch: jobs: From b707e64826fc82aa12f7ea917f6723d1a4c253de Mon Sep 17 00:00:00 2001 From: baogorek Date: Mon, 21 Apr 2025 14:39:26 -0400 Subject: [PATCH 03/21] changing workflow to require Python 3.12 --- .github/workflows/pr_code_changes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 176189bf..1483d8b6 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -32,7 +32,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Install package run: uv pip install -e .[dev] --system From d5db3963f8daff6a229bc4c089d349ba03f76790 Mon Sep 17 00:00:00 2001 From: baogorek Date: Mon, 21 Apr 2025 17:01:55 -0400 Subject: [PATCH 04/21] adding MinimalInstallCheck --- .github/workflows/pr_code_changes.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 1483d8b6..de3d2749 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -21,6 +21,26 @@ jobs: uses: "lgeiger/black-action@master" with: args: ". -l 79 --check" + + MinimalInstallCheck: + name: Test Minimal Install & Import (${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12'] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install package ONLY (no dev deps) + run: pip install . + - name: Test basic import + run: python -c "import policyengine_us_data; print('Minimal import OK')" + - name: Test specific failing import + run: python -c "from policyengine_core.data import Dataset; print('Core import OK')" + Test: runs-on: ubuntu-latest steps: From 4aa0e06a549f16adf2428d373e0c282ef5cb2b58 Mon Sep 17 00:00:00 2001 From: baogorek Date: Mon, 21 Apr 2025 17:09:42 -0400 Subject: [PATCH 05/21] pyproject.toml --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 05ddab8a..f54604ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ dependencies = [ "requests", "tqdm", "microdf_python>=0.4.3", + "setuptools>=60" ] [project.optional-dependencies] @@ -69,4 +70,4 @@ extend-exclude = ''' | build | dist )/ -''' \ No newline at end of file +''' From c49cd6d775df2ab8bd38c98e79b6b11563331d11 Mon Sep 17 00:00:00 2001 From: baogorek Date: Tue, 22 Apr 2025 14:05:05 -0400 Subject: [PATCH 06/21] Readme updates and Windows smoke test --- .github/workflows/pr_code_changes.yaml | 95 ++++++++++++++++++++++++-- README.md | 8 +++ 2 files changed, 96 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index de3d2749..f1658cf6 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -9,7 +9,6 @@ on: paths: - policyengine_us_data/** - tests/** - - .github/workflows/pr_code_changes.yaml # TEMPORARY workflow_dispatch: jobs: @@ -22,24 +21,60 @@ jobs: with: args: ". -l 79 --check" - MinimalInstallCheck: - name: Test Minimal Install & Import (${{ matrix.python-version }}) - runs-on: ubuntu-latest + #SmokeTestForMultipleVersions: + # name: Test Minimal Install & Import (${{ matrix.python-version }}) + # runs-on: ubuntu-latest + # strategy: + # matrix: + # python-version: ['3.10', '3.11', '3.12'] + # steps: + # - uses: actions/checkout@v4 + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ matrix.python-version }} + # - name: Install package ONLY (no dev deps) + # run: pip install . + # - name: Test basic import + # run: python -c "import policyengine_us_data; print('Minimal import OK')" + # - name: Test specific failing import + # run: python -c "from policyengine_core.data import Dataset; print('Core import OK')" + + SmokeTestForMultipleVersions: + # Updated name to include OS + name: Test Minimal Install & Import (${{ matrix.os }}, py${{ matrix.python-version }}) + # Runs on the OS defined in the matrix strategy + runs-on: ${{ matrix.os }} strategy: + # Optional: Prevent one failure from cancelling all other matrix jobs + fail-fast: false matrix: + # Add os to the matrix + os: [ubuntu-latest, windows-latest] python-version: ['3.10', '3.11', '3.12'] + # You could add include/exclude rules here if specific combinations + # are not needed or expected to fail. steps: - - uses: actions/checkout@v4 + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install package ONLY (no dev deps) - run: pip install . + # Using python -m pip is slightly more robust + run: python -m pip install . + - name: Test basic import run: python -c "import policyengine_us_data; print('Minimal import OK')" - - name: Test specific failing import + # Default shell works fine for this on both Ubuntu (bash) and Windows (pwsh) + + - name: Test specific core import + # Corrected indentation from your example run: python -c "from policyengine_core.data import Dataset; print('Core import OK')" + # Default shell also works fine here Test: runs-on: ubuntu-latest @@ -69,3 +104,49 @@ jobs: run: pytest - name: Test documentation builds run: make documentation + + Test-Windows: # New parallel job for Windows + runs-on: windows-latest + needs: Lint # Optional: run tests only if linting passes + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v1 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install package and dev dependencies + # Use default shell (PowerShell) for Windows runner + run: uv pip install -e .[dev] --system + shell: pwsh # Explicitly state shell if needed, though usually default + + - name: Download data inputs + # Replaced 'make download' using Python scripts + run: | + python policyengine_us_data/storage/download_public_prerequisites.py + python policyengine_us_data/storage/download_private_prerequisites.py + env: + HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} + POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} + shell: pwsh # Or cmd if python paths work better there, test needed + + - name: Build datasets + run: | + python policyengine_us_data/datasets/acs/acs.py + python policyengine_us_data/datasets/cps/cps.py + python policyengine_us_data/datasets/puf/irs_puf.py + python policyengine_us_data/datasets/puf/puf.py + python policyengine_us_data/datasets/cps/extended_cps.py + python policyengine_us_data/datasets/cps/enhanced_cps.py + env: + LITE_MODE: "true" + shell: pwsh + + - name: Run tests + run: pytest + shell: pwsh diff --git a/README.md b/README.md index 76e686a4..cc459fb3 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,17 @@ ## Installation +While it is possible to install via PyPi: ```bash pip install policyengine-us-data ``` +the recommended installion is +``` +pip install -e .[dev] +``` +which installs the development dependencies in a reference-only manner (so that changes +to the package code will be reflected immediately); `policyengine-us-data` is a dev package +and not intended for direct access. ## Building the Paper From c70415f3b823432065de2d326ef4c418f7e65fa1 Mon Sep 17 00:00:00 2001 From: baogorek Date: Tue, 22 Apr 2025 14:08:08 -0400 Subject: [PATCH 07/21] adding back the actions space --- .github/workflows/pr_code_changes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index f1658cf6..6e404fcf 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -9,6 +9,7 @@ on: paths: - policyengine_us_data/** - tests/** + - .github/workflows/** workflow_dispatch: jobs: From 2c5bcf4031f545a576d015af5c87ee66e4660960 Mon Sep 17 00:00:00 2001 From: baogorek Date: Wed, 23 Apr 2025 08:53:30 -0400 Subject: [PATCH 08/21] comment out __file__ override --- policyengine_us_data/datasets/cps/cps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/policyengine_us_data/datasets/cps/cps.py b/policyengine_us_data/datasets/cps/cps.py index 02e04e41..d3321540 100644 --- a/policyengine_us_data/datasets/cps/cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -14,6 +14,10 @@ from policyengine_us_data.utils import QRF +# TODO: figure out how to get this to work interactively. You should be able to run this in ipython +#__file__ = '/mnt/c/devl/policyengine-us-data/policyengine_us_data/datasets/cps/imputation_parameters.yaml' + + class CPS(Dataset): name = "cps" label = "CPS" @@ -57,7 +61,6 @@ def generate(self): add_takeup(self) # Downsample - self.downsample(fraction=0.5) def downsample(self, fraction: float = 0.5): From c1f101700b15d876ca188f4fc83834e8d1d75d30 Mon Sep 17 00:00:00 2001 From: baogorek Date: Wed, 23 Apr 2025 09:27:30 -0400 Subject: [PATCH 09/21] dynamically getting yaml file. Removing commented code --- .github/workflows/pr_code_changes.yaml | 22 +--------------------- policyengine_us_data/datasets/cps/cps.py | 11 +++-------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 6e404fcf..01e9dd8a 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -10,7 +10,6 @@ on: - policyengine_us_data/** - tests/** - .github/workflows/** - workflow_dispatch: jobs: Lint: @@ -22,25 +21,6 @@ jobs: with: args: ". -l 79 --check" - #SmokeTestForMultipleVersions: - # name: Test Minimal Install & Import (${{ matrix.python-version }}) - # runs-on: ubuntu-latest - # strategy: - # matrix: - # python-version: ['3.10', '3.11', '3.12'] - # steps: - # - uses: actions/checkout@v4 - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Install package ONLY (no dev deps) - # run: pip install . - # - name: Test basic import - # run: python -c "import policyengine_us_data; print('Minimal import OK')" - # - name: Test specific failing import - # run: python -c "from policyengine_core.data import Dataset; print('Core import OK')" - SmokeTestForMultipleVersions: # Updated name to include OS name: Test Minimal Install & Import (${{ matrix.os }}, py${{ matrix.python-version }}) @@ -77,7 +57,7 @@ jobs: run: python -c "from policyengine_core.data import Dataset; print('Core import OK')" # Default shell also works fine here - Test: + Test-Ubuntu: runs-on: ubuntu-latest steps: - name: Checkout repo diff --git a/policyengine_us_data/datasets/cps/cps.py b/policyengine_us_data/datasets/cps/cps.py index 534a4aca..f68ce8a2 100644 --- a/policyengine_us_data/datasets/cps/cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -1,3 +1,4 @@ +from importlib.resources import files from policyengine_core.data import Dataset from policyengine_us_data.storage import STORAGE_FOLDER import h5py @@ -14,10 +15,6 @@ from policyengine_us_data.utils import QRF -# TODO: figure out how to get this to work interactively. You should be able to run this in ipython -#__file__ = '/mnt/c/devl/policyengine-us-data/policyengine_us_data/datasets/cps/imputation_parameters.yaml' - - class CPS(Dataset): name = "cps" label = "CPS" @@ -344,10 +341,8 @@ def add_personal_income_variables( year (int): The CPS year """ # Get income imputation parameters. - yamlfilename = os.path.join( - os.path.abspath(os.path.dirname(__file__)), - "imputation_parameters.yaml", - ) + yamlfilename = files('policyengine_us_data') / 'datasets' / 'cps' / 'imputation_parameters.yaml' + with open(yamlfilename, "r", encoding="utf-8") as yamlfile: p = yaml.safe_load(yamlfile) assert isinstance(p, dict) From f8981e5c0028c9fba9d3c633f77697f173baf498 Mon Sep 17 00:00:00 2001 From: baogorek Date: Wed, 23 Apr 2025 09:38:18 -0400 Subject: [PATCH 10/21] workflow updates --- .github/workflows/pr_code_changes.yaml | 6 ++++-- policyengine_us_data/datasets/cps/cps.py | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 01e9dd8a..8e9a374c 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -26,6 +26,7 @@ jobs: name: Test Minimal Install & Import (${{ matrix.os }}, py${{ matrix.python-version }}) # Runs on the OS defined in the matrix strategy runs-on: ${{ matrix.os }} + needs: Lint strategy: # Optional: Prevent one failure from cancelling all other matrix jobs fail-fast: false @@ -59,6 +60,7 @@ jobs: Test-Ubuntu: runs-on: ubuntu-latest + needs: Lint steps: - name: Checkout repo uses: actions/checkout@v2 @@ -88,7 +90,7 @@ jobs: Test-Windows: # New parallel job for Windows runs-on: windows-latest - needs: Lint # Optional: run tests only if linting passes + needs: Lint steps: - name: Checkout repo uses: actions/checkout@v4 @@ -99,7 +101,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - name: Install package and dev dependencies # Use default shell (PowerShell) for Windows runner diff --git a/policyengine_us_data/datasets/cps/cps.py b/policyengine_us_data/datasets/cps/cps.py index f68ce8a2..64f1e078 100644 --- a/policyengine_us_data/datasets/cps/cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -341,7 +341,12 @@ def add_personal_income_variables( year (int): The CPS year """ # Get income imputation parameters. - yamlfilename = files('policyengine_us_data') / 'datasets' / 'cps' / 'imputation_parameters.yaml' + yamlfilename = ( + files("policyengine_us_data") + / "datasets" + / "cps" + / "imputation_parameters.yaml" + ) with open(yamlfilename, "r", encoding="utf-8") as yamlfile: p = yaml.safe_load(yamlfile) From 8d564084e7ea5b740869f76fe821d3526e3ab85f Mon Sep 17 00:00:00 2001 From: baogorek Date: Wed, 23 Apr 2025 16:12:38 -0400 Subject: [PATCH 11/21] Token work, matrix OS testing --- .github/workflows/pr_code_changes.yaml | 113 ++++++++++++------------- policyengine_us_data/__init__.py | 16 ++++ policyengine_us_data/utils/github.py | 9 +- 3 files changed, 76 insertions(+), 62 deletions(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 8e9a374c..ccd47210 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -22,20 +22,14 @@ jobs: args: ". -l 79 --check" SmokeTestForMultipleVersions: - # Updated name to include OS name: Test Minimal Install & Import (${{ matrix.os }}, py${{ matrix.python-version }}) - # Runs on the OS defined in the matrix strategy runs-on: ${{ matrix.os }} needs: Lint strategy: - # Optional: Prevent one failure from cancelling all other matrix jobs fail-fast: false matrix: - # Add os to the matrix os: [ubuntu-latest, windows-latest] python-version: ['3.10', '3.11', '3.12'] - # You could add include/exclude rules here if specific combinations - # are not needed or expected to fail. steps: - name: Checkout repo uses: actions/checkout@v4 @@ -46,24 +40,24 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install package ONLY (no dev deps) - # Using python -m pip is slightly more robust run: python -m pip install . - name: Test basic import run: python -c "import policyengine_us_data; print('Minimal import OK')" - # Default shell works fine for this on both Ubuntu (bash) and Windows (pwsh) - name: Test specific core import - # Corrected indentation from your example run: python -c "from policyengine_core.data import Dataset; print('Core import OK')" - # Default shell also works fine here - Test-Ubuntu: - runs-on: ubuntu-latest + Test: + runs-on: ${{ matrix.os }} needs: Lint + strategy: + matrix: + os: [ubuntu-latest, windows-latest] steps: - name: Checkout repo uses: actions/checkout@v2 + - name: Install uv uses: astral-sh/setup-uv@v5 @@ -74,62 +68,65 @@ jobs: - name: Install package run: uv pip install -e .[dev] --system + - name: Download data inputs run: make download env: HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} - POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} + - name: Build datasets run: make data env: LITE_MODE: true + - name: Run tests run: pytest + - name: Test documentation builds run: make documentation - Test-Windows: # New parallel job for Windows - runs-on: windows-latest - needs: Lint - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v1 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install package and dev dependencies - # Use default shell (PowerShell) for Windows runner - run: uv pip install -e .[dev] --system - shell: pwsh # Explicitly state shell if needed, though usually default - - - name: Download data inputs - # Replaced 'make download' using Python scripts - run: | - python policyengine_us_data/storage/download_public_prerequisites.py - python policyengine_us_data/storage/download_private_prerequisites.py - env: - HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} - POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} - shell: pwsh # Or cmd if python paths work better there, test needed - - - name: Build datasets - run: | - python policyengine_us_data/datasets/acs/acs.py - python policyengine_us_data/datasets/cps/cps.py - python policyengine_us_data/datasets/puf/irs_puf.py - python policyengine_us_data/datasets/puf/puf.py - python policyengine_us_data/datasets/cps/extended_cps.py - python policyengine_us_data/datasets/cps/enhanced_cps.py - env: - LITE_MODE: "true" - shell: pwsh - - - name: Run tests - run: pytest - shell: pwsh +#Test-Windows: # New parallel job for Windows +# runs-on: windows-latest +# needs: Lint +# steps: +# - name: Checkout repo +# uses: actions/checkout@v4 + +# - name: Install uv +# uses: astral-sh/setup-uv@v1 + +# - name: Set up Python +# uses: actions/setup-python@v5 +# with: +# python-version: '3.12' + +# - name: Install package and dev dependencies +# # Use default shell (PowerShell) for Windows runner +# run: uv pip install -e .[dev] --system +# shell: pwsh # Explicitly state shell if needed, though usually default + +# - name: Download data inputs +# # Replaced 'make download' using Python scripts +# run: | +# python policyengine_us_data/storage/download_public_prerequisites.py +# python policyengine_us_data/storage/download_private_prerequisites.py +# env: +# HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} +# POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} +# shell: pwsh # Or cmd if python paths work better there, test needed + +# - name: Build datasets +# run: | +# python policyengine_us_data/datasets/acs/acs.py +# python policyengine_us_data/datasets/cps/cps.py +# python policyengine_us_data/datasets/puf/irs_puf.py +# python policyengine_us_data/datasets/puf/puf.py +# python policyengine_us_data/datasets/cps/extended_cps.py +# python policyengine_us_data/datasets/cps/enhanced_cps.py +# env: +# LITE_MODE: "true" +# shell: pwsh + +# - name: Run tests +# run: pytest +# shell: pwsh diff --git a/policyengine_us_data/__init__.py b/policyengine_us_data/__init__.py index 17383534..16f16e23 100644 --- a/policyengine_us_data/__init__.py +++ b/policyengine_us_data/__init__.py @@ -1,2 +1,18 @@ +import os +import sys + +# --- Check for Hugging Face Token --- +hf_token = os.getenv('HUGGING_FACE_TOKEN') + +if not hf_token: + warning_message = ( + "NOTE: HUGGING_FACE_TOKEN environment variable is not set.\n" + "Functionality requiring authentication with the Hugging Face Hub may fail\n" + ) + # Issue a warning (doesn't stop execution, but informs the user) + # Print the message directly to standard error + print(warning_message, file=sys.stderr) + +# --- Continue with imports --- from .datasets import * from .geography import ZIP_CODE_DATASET diff --git a/policyengine_us_data/utils/github.py b/policyengine_us_data/utils/github.py index 007a8d68..fc9d1874 100644 --- a/policyengine_us_data/utils/github.py +++ b/policyengine_us_data/utils/github.py @@ -6,16 +6,17 @@ from requests.packages.urllib3.util.retry import Retry import time + +# NOTE: it's unclear whether this header is needed auth_headers = { "Authorization": f"token {os.environ.get('POLICYENGINE_US_DATA_GITHUB_TOKEN')}", } - def get_asset_url( org: str, repo: str, release_tag: str, file_name: str ) -> str: url = f"https://api.github.com/repos/{org}/{repo}/releases/tags/{release_tag}" - response = requests.get(url, headers=auth_headers) + response = requests.get(url) if response.status_code != 200: raise ValueError( f"Invalid response code {response.status_code} for url {url}." @@ -32,7 +33,7 @@ def get_asset_url( def get_release_id(org: str, repo: str, release_tag: str) -> int: url = f"https://api.github.com/repos/{org}/{repo}/releases/tags/{release_tag}" - response = requests.get(url, headers=auth_headers) + response = requests.get(url) if response.status_code == 404: raise ValueError(f"Release {release_tag} not found in {org}/{repo}.") elif response.status_code != 200: @@ -44,7 +45,7 @@ def get_release_id(org: str, repo: str, release_tag: str) -> int: def get_all_assets(org: str, repo: str, release_id: int) -> list: url = f"https://api.github.com/repos/{org}/{repo}/releases/{release_id}/assets" - response = requests.get(url, headers=auth_headers) + response = requests.get(url) if response.status_code != 200: raise ValueError( f"Invalid response code {response.status_code} for url {url}." From 1c447cfde90e0a63cea9725a94de25a6b07dd6c2 Mon Sep 17 00:00:00 2001 From: baogorek Date: Wed, 23 Apr 2025 16:17:23 -0400 Subject: [PATCH 12/21] lints --- policyengine_us_data/__init__.py | 2 +- policyengine_us_data/utils/github.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/policyengine_us_data/__init__.py b/policyengine_us_data/__init__.py index 16f16e23..6a0cf62a 100644 --- a/policyengine_us_data/__init__.py +++ b/policyengine_us_data/__init__.py @@ -2,7 +2,7 @@ import sys # --- Check for Hugging Face Token --- -hf_token = os.getenv('HUGGING_FACE_TOKEN') +hf_token = os.getenv("HUGGING_FACE_TOKEN") if not hf_token: warning_message = ( diff --git a/policyengine_us_data/utils/github.py b/policyengine_us_data/utils/github.py index fc9d1874..becd3cf1 100644 --- a/policyengine_us_data/utils/github.py +++ b/policyengine_us_data/utils/github.py @@ -7,11 +7,12 @@ import time -# NOTE: it's unclear whether this header is needed +# NOTE: it's unclear whether this header is needed auth_headers = { "Authorization": f"token {os.environ.get('POLICYENGINE_US_DATA_GITHUB_TOKEN')}", } + def get_asset_url( org: str, repo: str, release_tag: str, file_name: str ) -> str: From 0b2cc84be42e14c608c46a6fa84a4a07da4d3aaf Mon Sep 17 00:00:00 2001 From: baogorek Date: Thu, 24 Apr 2025 15:25:41 -0400 Subject: [PATCH 13/21] environment variables are put back --- .github/workflows/pr_code_changes.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index ccd47210..2db4cb77 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -54,6 +54,9 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] + env: + HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} + POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} steps: - name: Checkout repo uses: actions/checkout@v2 From 292bb2e65c049e334ecb94a51fc912411311cfc8 Mon Sep 17 00:00:00 2001 From: baogorek Date: Thu, 24 Apr 2025 17:06:59 -0400 Subject: [PATCH 14/21] Windows encodings fixed for documentation. Github code reset --- Makefile | 5 ++-- docs/add_plotly_to_book.py | 4 +-- policyengine_us_data/__init__.py | 16 ---------- .../datasets/puf/uprate_puf.py | 2 +- policyengine_us_data/utils/github.py | 30 ++++++++++++------- policyengine_us_data/utils/huggingface.py | 19 +++++++----- 6 files changed, 36 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index e791a174..f55cd2db 100644 --- a/Makefile +++ b/Makefile @@ -43,8 +43,9 @@ data: python policyengine_us_data/datasets/cps/enhanced_cps.py clean: - rm -f policyengine_us_data/storage/puf_2015.csv - rm -f policyengine_us_data/storage/demographics_2015.csv + rm -f policyengine_us_data/storage/*.h5 + rm -f policyengine_us_data/storage/*.csv + rm -rf policyengine_us_data/docs/_build build: python -m build diff --git a/docs/add_plotly_to_book.py b/docs/add_plotly_to_book.py index 822e77ab..55a687c5 100644 --- a/docs/add_plotly_to_book.py +++ b/docs/add_plotly_to_book.py @@ -14,7 +14,7 @@ book_folder = Path(args.book_path) for html_file in book_folder.glob("**/*.html"): - with open(html_file, "r") as f: + with open(html_file, "r", encoding='utf-8') as f: html = f.read() # Add the script tag to the start of the tag. @@ -23,5 +23,5 @@ '', ) - with open(html_file, "w") as f: + with open(html_file, "w", encoding='utf-8') as f: f.write(html) diff --git a/policyengine_us_data/__init__.py b/policyengine_us_data/__init__.py index 6a0cf62a..17383534 100644 --- a/policyengine_us_data/__init__.py +++ b/policyengine_us_data/__init__.py @@ -1,18 +1,2 @@ -import os -import sys - -# --- Check for Hugging Face Token --- -hf_token = os.getenv("HUGGING_FACE_TOKEN") - -if not hf_token: - warning_message = ( - "NOTE: HUGGING_FACE_TOKEN environment variable is not set.\n" - "Functionality requiring authentication with the Hugging Face Hub may fail\n" - ) - # Issue a warning (doesn't stop execution, but informs the user) - # Print the message directly to standard error - print(warning_message, file=sys.stderr) - -# --- Continue with imports --- from .datasets import * from .geography import ZIP_CODE_DATASET diff --git a/policyengine_us_data/datasets/puf/uprate_puf.py b/policyengine_us_data/datasets/puf/uprate_puf.py index a5c2b8d4..1cf0eb9c 100644 --- a/policyengine_us_data/datasets/puf/uprate_puf.py +++ b/policyengine_us_data/datasets/puf/uprate_puf.py @@ -2,6 +2,7 @@ import numpy as np from policyengine_us_data.storage import STORAGE_FOLDER + ITMDED_GROW_RATE = 0.02 # annual growth rate in itemized deduction amounts USE_VARIABLE_SPECIFIC_POPULATION_GROWTH_DIVISORS = False @@ -95,7 +96,6 @@ def get_soi_aggregate(variable, year, is_count): if variable == "adjusted_gross_income" and is_count: # AGI isn't treated like the other variables return get_soi_aggregate("count", year, True) - is_variable = soi.Variable == variable is_year = soi.Year == year filing_status = soi["Filing status"] == "All" diff --git a/policyengine_us_data/utils/github.py b/policyengine_us_data/utils/github.py index becd3cf1..bcdb8c67 100644 --- a/policyengine_us_data/utils/github.py +++ b/policyengine_us_data/utils/github.py @@ -7,17 +7,25 @@ import time -# NOTE: it's unclear whether this header is needed -auth_headers = { - "Authorization": f"token {os.environ.get('POLICYENGINE_US_DATA_GITHUB_TOKEN')}", -} +TOKEN = os.environ.get("POLICYENGINE_US_DATA_GITHUB_TOKEN") + +if TOKEN: + AUTH_HEADERS = { + "Authorization": f"token {TOKEN}" + } +else: + print( + "NOTE: POLICYENGINE_US_DATA_GITHUB_TOKEN is not set.\n" + "Some microdata files may be unavailable." + ) + AUTH_HEADERS = {} def get_asset_url( org: str, repo: str, release_tag: str, file_name: str ) -> str: url = f"https://api.github.com/repos/{org}/{repo}/releases/tags/{release_tag}" - response = requests.get(url) + response = requests.get(url, headers=AUTH_HEADERS) if response.status_code != 200: raise ValueError( f"Invalid response code {response.status_code} for url {url}." @@ -34,7 +42,7 @@ def get_asset_url( def get_release_id(org: str, repo: str, release_tag: str) -> int: url = f"https://api.github.com/repos/{org}/{repo}/releases/tags/{release_tag}" - response = requests.get(url) + response = requests.get(url, headers=AUTH_HEADERS) if response.status_code == 404: raise ValueError(f"Release {release_tag} not found in {org}/{repo}.") elif response.status_code != 200: @@ -46,7 +54,7 @@ def get_release_id(org: str, repo: str, release_tag: str) -> int: def get_all_assets(org: str, repo: str, release_id: int) -> list: url = f"https://api.github.com/repos/{org}/{repo}/releases/{release_id}/assets" - response = requests.get(url) + response = requests.get(url, headers=AUTH_HEADERS) if response.status_code != 200: raise ValueError( f"Invalid response code {response.status_code} for url {url}." @@ -75,7 +83,7 @@ def delete_asset(org: str, repo: str, asset_id: int): ) headers = { "Accept": "application/vnd.github.v3+json", - **auth_headers, + **AUTH_HEADERS, } response = requests.delete(url, headers=headers) @@ -98,7 +106,7 @@ def download( stream=True, headers={ "Accept": "application/octet-stream", - **auth_headers, + **AUTH_HEADERS, }, ) @@ -179,7 +187,7 @@ def create_asset( "Accept": "application/vnd.github.v3+json", "Content-Type": "application/octet-stream", "Content-Length": str(file_size), - **auth_headers, + **AUTH_HEADERS, } session = create_session_with_retries() @@ -231,7 +239,7 @@ def set_pr_auto_review_comment(text: str): response = requests.post( url, - headers=auth_headers, + headers=AUTH_HEADERS, json={ "body": text, "event": "COMMENT", diff --git a/policyengine_us_data/utils/huggingface.py b/policyengine_us_data/utils/huggingface.py index b88149b2..fcd07ee0 100644 --- a/policyengine_us_data/utils/huggingface.py +++ b/policyengine_us_data/utils/huggingface.py @@ -3,12 +3,18 @@ import pkg_resources +TOKEN = os.environ.get("HUGGING_FACE_TOKEN") +if not TOKEN: + raise ValueError( + "Required environment variable 'HUGGING_FACE_TOKEN' is not set. " + "This token is needed to download files from Hugging Face Hub. " + "Please set the HUGGING_FACE_TOKEN environment variable." + ) + + def download( repo: str, repo_filename: str, local_folder: str, version: str = None ): - token = os.environ.get( - "HUGGING_FACE_TOKEN", - ) hf_hub_download( repo_id=repo, @@ -16,19 +22,16 @@ def download( filename=repo_filename, local_dir=local_folder, revision=version, - token=token, + token=TOKEN, ) def upload(local_file_path: str, repo: str, repo_file_path: str): - token = os.environ.get( - "HUGGING_FACE_TOKEN", - ) api = HfApi() api.upload_file( path_or_fileobj=local_file_path, path_in_repo=repo_file_path, repo_id=repo, repo_type="model", - token=token, + token=TOKEN, ) From 1f98f7725a5ace3c41b85b391f37df6b074c7b1b Mon Sep 17 00:00:00 2001 From: baogorek Date: Thu, 24 Apr 2025 17:46:51 -0400 Subject: [PATCH 15/21] updated clean function and docs --- .github/workflows/code_changes.yaml | 4 ++-- .github/workflows/pr_code_changes.yaml | 1 - docs/add_plotly_to_book.py | 4 ++-- policyengine_us_data/utils/github.py | 4 +--- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/code_changes.yaml b/.github/workflows/code_changes.yaml index 6e4484d8..b11ef45c 100644 --- a/.github/workflows/code_changes.yaml +++ b/.github/workflows/code_changes.yaml @@ -31,7 +31,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Install package run: uv pip install -e .[dev] --system @@ -49,4 +49,4 @@ jobs: env: HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} - name: Test documentation builds - run: make documentation \ No newline at end of file + run: make documentation diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 2db4cb77..1a89b723 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -56,7 +56,6 @@ jobs: os: [ubuntu-latest, windows-latest] env: HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} - POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} steps: - name: Checkout repo uses: actions/checkout@v2 diff --git a/docs/add_plotly_to_book.py b/docs/add_plotly_to_book.py index 55a687c5..05d49cef 100644 --- a/docs/add_plotly_to_book.py +++ b/docs/add_plotly_to_book.py @@ -14,7 +14,7 @@ book_folder = Path(args.book_path) for html_file in book_folder.glob("**/*.html"): - with open(html_file, "r", encoding='utf-8') as f: + with open(html_file, "r", encoding="utf-8") as f: html = f.read() # Add the script tag to the start of the tag. @@ -23,5 +23,5 @@ '', ) - with open(html_file, "w", encoding='utf-8') as f: + with open(html_file, "w", encoding="utf-8") as f: f.write(html) diff --git a/policyengine_us_data/utils/github.py b/policyengine_us_data/utils/github.py index bcdb8c67..3960e3a9 100644 --- a/policyengine_us_data/utils/github.py +++ b/policyengine_us_data/utils/github.py @@ -10,9 +10,7 @@ TOKEN = os.environ.get("POLICYENGINE_US_DATA_GITHUB_TOKEN") if TOKEN: - AUTH_HEADERS = { - "Authorization": f"token {TOKEN}" - } + AUTH_HEADERS = {"Authorization": f"token {TOKEN}"} else: print( "NOTE: POLICYENGINE_US_DATA_GITHUB_TOKEN is not set.\n" From 5bb694956f9fe85af73807eb08df9843f6ad54ae Mon Sep 17 00:00:00 2001 From: baogorek Date: Thu, 24 Apr 2025 17:49:05 -0400 Subject: [PATCH 16/21] Makefile changes --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f55cd2db..059e7f7c 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ data: clean: rm -f policyengine_us_data/storage/*.h5 - rm -f policyengine_us_data/storage/*.csv + git clean -fX -- '*.csv' rm -rf policyengine_us_data/docs/_build build: From e909f42588e2c3f657d937a98913b8b4d5d4075d Mon Sep 17 00:00:00 2001 From: baogorek Date: Thu, 24 Apr 2025 18:27:25 -0400 Subject: [PATCH 17/21] getting rid of workflow comments --- .github/workflows/pr_code_changes.yaml | 46 -------------------------- 1 file changed, 46 deletions(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 1a89b723..2e22b20e 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -86,49 +86,3 @@ jobs: - name: Test documentation builds run: make documentation - -#Test-Windows: # New parallel job for Windows -# runs-on: windows-latest -# needs: Lint -# steps: -# - name: Checkout repo -# uses: actions/checkout@v4 - -# - name: Install uv -# uses: astral-sh/setup-uv@v1 - -# - name: Set up Python -# uses: actions/setup-python@v5 -# with: -# python-version: '3.12' - -# - name: Install package and dev dependencies -# # Use default shell (PowerShell) for Windows runner -# run: uv pip install -e .[dev] --system -# shell: pwsh # Explicitly state shell if needed, though usually default - -# - name: Download data inputs -# # Replaced 'make download' using Python scripts -# run: | -# python policyengine_us_data/storage/download_public_prerequisites.py -# python policyengine_us_data/storage/download_private_prerequisites.py -# env: -# HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} -# POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} -# shell: pwsh # Or cmd if python paths work better there, test needed - -# - name: Build datasets -# run: | -# python policyengine_us_data/datasets/acs/acs.py -# python policyengine_us_data/datasets/cps/cps.py -# python policyengine_us_data/datasets/puf/irs_puf.py -# python policyengine_us_data/datasets/puf/puf.py -# python policyengine_us_data/datasets/cps/extended_cps.py -# python policyengine_us_data/datasets/cps/enhanced_cps.py -# env: -# LITE_MODE: "true" -# shell: pwsh - -# - name: Run tests -# run: pytest -# shell: pwsh From 56f0b5723bcc123aadaca9f88267f1f089ac8cf9 Mon Sep 17 00:00:00 2001 From: baogorek Date: Tue, 27 May 2025 11:00:05 -0400 Subject: [PATCH 18/21] added comma --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4ff4c965..4d567fd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "requests", "tqdm", "microdf_python>=0.4.3", - "setuptools>=60" + "setuptools>=60", "microimpute>=0.1.2", "pip-system-certs", "google-cloud-storage", From e72d62fbd347da9acd5e1800931433bb9cf6fd9c Mon Sep 17 00:00:00 2001 From: baogorek Date: Tue, 27 May 2025 11:03:56 -0400 Subject: [PATCH 19/21] taking out 3.10 --- .github/workflows/pr_code_changes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index bd57fb41..1ca8b398 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.11', '3.12'] steps: - name: Checkout repo uses: actions/checkout@v4 From 89c90bc606738783d76f1bf2cb9edddd4d086ae3 Mon Sep 17 00:00:00 2001 From: baogorek Date: Tue, 27 May 2025 11:24:38 -0400 Subject: [PATCH 20/21] getting rid of growth factors --- Makefile | 1 + .../storage/uprating_factors.csv | 127 ------------------ .../storage/uprating_growth_factors.csv | 127 ------------------ 3 files changed, 1 insertion(+), 254 deletions(-) delete mode 100644 policyengine_us_data/storage/uprating_factors.csv delete mode 100644 policyengine_us_data/storage/uprating_growth_factors.csv diff --git a/Makefile b/Makefile index 059e7f7c..4b66bbf7 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ documentation: data: + python policyengine_us_data/utils/uprating.py python policyengine_us_data/datasets/acs/acs.py python policyengine_us_data/datasets/cps/cps.py python policyengine_us_data/datasets/puf/irs_puf.py diff --git a/policyengine_us_data/storage/uprating_factors.csv b/policyengine_us_data/storage/uprating_factors.csv deleted file mode 100644 index d16c4a91..00000000 --- a/policyengine_us_data/storage/uprating_factors.csv +++ /dev/null @@ -1,127 +0,0 @@ -Variable,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 -alimony_expense,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -alimony_income,1.0,1.254,1.32,1.393,1.48,1.537,1.576,1.611,1.613,1.629,1.655,1.69,1.731,1.774,1.839 -ambulance_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -american_opportunity_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -amt_foreign_tax_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -casualty_loss,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -cdcc_relevant_expenses,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -charitable_cash_donations,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -charitable_non_cash_donations,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -child_support_expense,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -child_support_received,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -disability_benefits,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -domestic_production_ald,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -early_withdrawal_penalty,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -educator_expense,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -employment_income,1.0,1.068,1.147,1.197,1.254,1.303,1.353,1.402,1.455,1.51,1.564,1.619,1.677,1.736,1.797 -employment_income_before_lsr,1.0,1.068,1.147,1.197,1.254,1.303,1.353,1.402,1.455,1.51,1.564,1.619,1.677,1.736,1.797 -employment_income_last_year,1.0,1.068,1.147,1.197,1.254,1.303,1.353,1.402,1.455,1.51,1.564,1.619,1.677,1.736,1.797 -energy_efficient_home_improvement_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -er_visit_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -estate_income,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -excess_withheld_payroll_tax,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -family_weight,1.0,1.004,1.008,1.018,1.029,1.039,1.046,1.052,1.057,1.061,1.065,1.068,1.072,1.075,1.078 -farm_income,1.0,1.865,1.86,1.898,2.055,2.153,2.224,2.298,2.37,2.441,2.524,2.611,2.703,2.798,2.899 -farm_rent_income,1.0,1.355,1.352,1.379,1.493,1.564,1.616,1.67,1.722,1.773,1.834,1.897,1.964,2.033,2.107 -foreign_tax_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -free_school_meals_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -general_business_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -health_insurance_premiums,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -health_insurance_premiums_without_medicare_part_b,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -health_savings_account_ald,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -health_savings_account_payroll_contributions,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -household_weight,1.0,1.004,1.008,1.018,1.029,1.039,1.046,1.052,1.057,1.061,1.065,1.068,1.072,1.075,1.078 -imaging_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -inpatient_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -interest_deduction,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -investment_income_elected_form_4952,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -keogh_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -lab_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -long_term_capital_gains,1.0,1.822,1.107,0.809,1.158,1.213,1.171,1.134,1.13,1.147,1.176,1.211,1.25,1.293,1.338 -long_term_capital_gains_before_response,1.0,1.822,1.107,0.809,1.158,1.213,1.171,1.134,1.13,1.147,1.176,1.211,1.25,1.293,1.338 -long_term_capital_gains_on_collectibles,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -long_term_health_insurance_premiums,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -medical_out_of_pocket_expenses,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -medicare_part_b_premiums,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -misc_deduction,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -miscellaneous_income,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -non_qualified_dividend_income,1.0,1.198,1.263,1.313,1.339,1.404,1.475,1.528,1.577,1.635,1.737,1.837,1.934,2.028,2.119 -non_sch_d_capital_gains,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -other_credits,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -other_medical_expenses,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -outpatient_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -over_the_counter_health_expenses,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -partnership_s_corp_income,1.0,0.996,1.539,1.624,1.726,1.792,1.838,1.879,1.881,1.899,1.93,1.971,2.018,2.069,2.144 -person_weight,1.0,1.004,1.008,1.018,1.029,1.039,1.046,1.052,1.057,1.061,1.065,1.068,1.072,1.075,1.078 -physician_services_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -population,1.0,1.004,1.008,1.018,1.029,1.039,1.046,1.052,1.057,1.061,1.065,1.068,1.072,1.075,1.078 -pre_tax_contributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -prescription_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -prior_year_minimum_tax_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -qualified_dividend_income,1.0,1.198,1.263,1.313,1.339,1.404,1.475,1.528,1.577,1.635,1.737,1.837,1.934,2.028,2.119 -qualified_tuition_expenses,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -real_estate_taxes,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -recapture_of_investment_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -rent,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -rental_income,1.0,0.975,0.973,0.992,1.074,1.125,1.163,1.201,1.239,1.276,1.32,1.365,1.413,1.463,1.516 -roth_401k_contributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -roth_ira_contributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -salt_refund_income,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -savers_credit,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -self_employed_health_insurance_ald,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -self_employed_pension_contribution_ald,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -self_employed_pension_contributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -self_employment_income,1.0,1.254,1.32,1.393,1.48,1.537,1.576,1.611,1.613,1.629,1.655,1.69,1.731,1.774,1.839 -self_employment_income_before_lsr,1.0,1.254,1.32,1.393,1.48,1.537,1.576,1.611,1.613,1.629,1.655,1.69,1.731,1.774,1.839 -self_employment_income_last_year,1.0,1.254,1.32,1.393,1.48,1.537,1.576,1.611,1.613,1.629,1.655,1.69,1.731,1.774,1.839 -short_term_capital_gains,1.0,0.996,1.587,1.16,1.66,1.738,1.679,1.625,1.619,1.645,1.685,1.735,1.792,1.853,1.917 -snap_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -social_security,1.0,1.274,1.409,1.571,1.78,1.941,2.068,2.186,2.315,2.463,2.613,2.751,2.906,3.073,3.246 -social_security_dependents,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -social_security_disability,1.0,0.996,0.992,1.068,1.091,1.115,1.133,1.155,1.171,1.192,1.214,1.236,1.26,1.284,1.31 -social_security_retirement,1.0,0.996,0.992,1.068,1.091,1.115,1.133,1.155,1.171,1.192,1.214,1.236,1.26,1.284,1.31 -social_security_survivors,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -spm_unit_broadband_subsidy_reported,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -spm_unit_capped_housing_subsidy_reported,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -spm_unit_capped_work_childcare_expenses,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -spm_unit_energy_subsidy_reported,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -spm_unit_federal_tax_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -spm_unit_net_income_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -spm_unit_payroll_tax_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -spm_unit_pre_subsidy_childcare_expenses,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -spm_unit_spm_threshold,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -spm_unit_state_tax_reported,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -spm_unit_total_income_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -spm_unit_weight,1.0,1.004,1.008,1.018,1.029,1.039,1.046,1.052,1.057,1.061,1.065,1.068,1.072,1.075,1.078 -spm_unit_wic_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -ssi_reported,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -state_and_local_sales_or_income_tax,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -strike_benefits,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -student_loan_interest,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tanf_reported,1.0,1.01,1.081,1.139,1.162,1.178,1.179,1.201,1.223,1.246,1.269,1.293,1.318,1.344,1.37 -tax_exempt_401k_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tax_exempt_403b_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tax_exempt_interest_income,1.0,0.805,0.957,1.171,1.255,1.346,1.386,1.45,1.558,1.66,1.703,1.743,1.792,1.825,1.865 -tax_exempt_ira_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tax_exempt_pension_income,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tax_exempt_private_pension_income,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tax_exempt_sep_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -tax_unit_weight,1.0,1.004,1.008,1.018,1.029,1.039,1.046,1.052,1.057,1.061,1.065,1.068,1.072,1.075,1.078 -taxable_401k_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -taxable_403b_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -taxable_interest_income,1.0,0.805,0.957,1.171,1.255,1.346,1.386,1.45,1.558,1.66,1.703,1.743,1.792,1.825,1.865 -taxable_ira_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -taxable_pension_income,1.0,1.121,1.188,1.211,1.364,1.492,1.564,1.614,1.659,1.709,1.764,1.825,1.893,1.959,2.031 -taxable_private_pension_income,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -taxable_sep_distributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -taxable_unemployment_compensation,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -traditional_401k_contributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -traditional_ira_contributions,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -unemployment_compensation,1.0,0.511,0.566,0.63,0.714,0.779,0.83,0.877,0.929,0.988,1.048,1.104,1.166,1.233,1.303 -unrecaptured_section_1250_gain,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -unreported_payroll_tax,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -urgent_care_expense,1.0,1.104,1.168,1.241,1.3,1.328,1.359,1.403,1.448,1.493,1.541,1.591,1.643,1.697,1.753 -veterans_benefits,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -w2_wages_from_qualified_business,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 -workers_compensation,1.0,1.165,1.162,1.185,1.283,1.345,1.389,1.435,1.48,1.524,1.576,1.631,1.688,1.747,1.811 diff --git a/policyengine_us_data/storage/uprating_growth_factors.csv b/policyengine_us_data/storage/uprating_growth_factors.csv deleted file mode 100644 index 28ca744f..00000000 --- a/policyengine_us_data/storage/uprating_growth_factors.csv +++ /dev/null @@ -1,127 +0,0 @@ -Variable,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 -alimony_expense,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -alimony_income,0,0.254,0.053,0.055,0.062,0.039,0.025,0.022,0.001,0.01,0.016,0.021,0.024,0.025,0.037 -ambulance_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -american_opportunity_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -amt_foreign_tax_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -casualty_loss,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -cdcc_relevant_expenses,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -charitable_cash_donations,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -charitable_non_cash_donations,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -child_support_expense,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -child_support_received,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -disability_benefits,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -domestic_production_ald,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -early_withdrawal_penalty,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -educator_expense,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -employment_income,0,0.068,0.074,0.044,0.048,0.039,0.038,0.036,0.038,0.038,0.036,0.035,0.036,0.035,0.035 -employment_income_before_lsr,0,0.068,0.074,0.044,0.048,0.039,0.038,0.036,0.038,0.038,0.036,0.035,0.036,0.035,0.035 -employment_income_last_year,0,0.068,0.074,0.044,0.048,0.039,0.038,0.036,0.038,0.038,0.036,0.035,0.036,0.035,0.035 -energy_efficient_home_improvement_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -er_visit_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -estate_income,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -excess_withheld_payroll_tax,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -family_weight,0,0.004,0.004,0.01,0.011,0.01,0.007,0.006,0.005,0.004,0.004,0.003,0.004,0.003,0.003 -farm_income,0,0.865,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.034,0.035,0.035,0.036 -farm_rent_income,0,0.355,-0.002,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.034,0.035,0.035,0.036 -foreign_tax_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -free_school_meals_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -general_business_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -health_insurance_premiums,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -health_insurance_premiums_without_medicare_part_b,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -health_savings_account_ald,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -health_savings_account_payroll_contributions,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -household_weight,0,0.004,0.004,0.01,0.011,0.01,0.007,0.006,0.005,0.004,0.004,0.003,0.004,0.003,0.003 -imaging_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -inpatient_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -interest_deduction,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -investment_income_elected_form_4952,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -keogh_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -lab_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -long_term_capital_gains,0,0.822,-0.392,-0.269,0.431,0.047,-0.035,-0.032,-0.004,0.015,0.025,0.03,0.032,0.034,0.035 -long_term_capital_gains_before_response,0,0.822,-0.392,-0.269,0.431,0.047,-0.035,-0.032,-0.004,0.015,0.025,0.03,0.032,0.034,0.035 -long_term_capital_gains_on_collectibles,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -long_term_health_insurance_premiums,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -medical_out_of_pocket_expenses,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -medicare_part_b_premiums,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -misc_deduction,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -miscellaneous_income,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -non_qualified_dividend_income,0,0.198,0.054,0.04,0.02,0.049,0.051,0.036,0.032,0.037,0.062,0.058,0.053,0.049,0.045 -non_sch_d_capital_gains,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -other_credits,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -other_medical_expenses,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -outpatient_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -over_the_counter_health_expenses,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -partnership_s_corp_income,0,-0.004,0.545,0.055,0.063,0.038,0.026,0.022,0.001,0.01,0.016,0.021,0.024,0.025,0.036 -person_weight,0,0.004,0.004,0.01,0.011,0.01,0.007,0.006,0.005,0.004,0.004,0.003,0.004,0.003,0.003 -physician_services_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -population,0,0.004,0.004,0.01,0.011,0.01,0.007,0.006,0.005,0.004,0.004,0.003,0.004,0.003,0.003 -pre_tax_contributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -prescription_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -prior_year_minimum_tax_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -qualified_dividend_income,0,0.198,0.054,0.04,0.02,0.049,0.051,0.036,0.032,0.037,0.062,0.058,0.053,0.049,0.045 -qualified_tuition_expenses,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -real_estate_taxes,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -recapture_of_investment_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -rent,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -rental_income,0,-0.025,-0.002,0.02,0.083,0.047,0.034,0.033,0.032,0.03,0.034,0.034,0.035,0.035,0.036 -roth_401k_contributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -roth_ira_contributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -salt_refund_income,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -savers_credit,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -self_employed_health_insurance_ald,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -self_employed_pension_contribution_ald,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -self_employed_pension_contributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -self_employment_income,0,0.254,0.053,0.055,0.062,0.039,0.025,0.022,0.001,0.01,0.016,0.021,0.024,0.025,0.037 -self_employment_income_before_lsr,0,0.254,0.053,0.055,0.062,0.039,0.025,0.022,0.001,0.01,0.016,0.021,0.024,0.025,0.037 -self_employment_income_last_year,0,0.254,0.053,0.055,0.062,0.039,0.025,0.022,0.001,0.01,0.016,0.021,0.024,0.025,0.037 -short_term_capital_gains,0,-0.004,0.593,-0.269,0.431,0.047,-0.034,-0.032,-0.004,0.016,0.024,0.03,0.033,0.034,0.035 -snap_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -social_security,0,0.274,0.106,0.115,0.133,0.09,0.065,0.057,0.059,0.064,0.061,0.053,0.056,0.057,0.056 -social_security_dependents,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -social_security_disability,0,-0.004,-0.004,0.077,0.022,0.022,0.016,0.019,0.014,0.018,0.018,0.018,0.019,0.019,0.02 -social_security_retirement,0,-0.004,-0.004,0.077,0.022,0.022,0.016,0.019,0.014,0.018,0.018,0.018,0.019,0.019,0.02 -social_security_survivors,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -spm_unit_broadband_subsidy_reported,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -spm_unit_capped_housing_subsidy_reported,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -spm_unit_capped_work_childcare_expenses,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -spm_unit_energy_subsidy_reported,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -spm_unit_federal_tax_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -spm_unit_net_income_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -spm_unit_payroll_tax_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -spm_unit_pre_subsidy_childcare_expenses,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -spm_unit_spm_threshold,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -spm_unit_state_tax_reported,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -spm_unit_total_income_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -spm_unit_weight,0,0.004,0.004,0.01,0.011,0.01,0.007,0.006,0.005,0.004,0.004,0.003,0.004,0.003,0.003 -spm_unit_wic_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -ssi_reported,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -state_and_local_sales_or_income_tax,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -strike_benefits,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -student_loan_interest,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tanf_reported,0,0.01,0.07,0.054,0.02,0.014,0.001,0.019,0.018,0.019,0.018,0.019,0.019,0.02,0.019 -tax_exempt_401k_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tax_exempt_403b_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tax_exempt_interest_income,0,-0.195,0.189,0.224,0.072,0.073,0.03,0.046,0.074,0.065,0.026,0.023,0.028,0.018,0.022 -tax_exempt_ira_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tax_exempt_pension_income,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tax_exempt_private_pension_income,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tax_exempt_sep_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -tax_unit_weight,0,0.004,0.004,0.01,0.011,0.01,0.007,0.006,0.005,0.004,0.004,0.003,0.004,0.003,0.003 -taxable_401k_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -taxable_403b_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -taxable_interest_income,0,-0.195,0.189,0.224,0.072,0.073,0.03,0.046,0.074,0.065,0.026,0.023,0.028,0.018,0.022 -taxable_ira_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -taxable_pension_income,0,0.121,0.06,0.019,0.126,0.094,0.048,0.032,0.028,0.03,0.032,0.035,0.037,0.035,0.037 -taxable_private_pension_income,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -taxable_sep_distributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -taxable_unemployment_compensation,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -traditional_401k_contributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -traditional_ira_contributions,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -unemployment_compensation,0,-0.489,0.108,0.113,0.133,0.091,0.065,0.057,0.059,0.064,0.061,0.053,0.056,0.057,0.057 -unrecaptured_section_1250_gain,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -unreported_payroll_tax,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -urgent_care_expense,0,0.104,0.058,0.063,0.048,0.022,0.023,0.032,0.032,0.031,0.032,0.032,0.033,0.033,0.033 -veterans_benefits,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -w2_wages_from_qualified_business,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 -workers_compensation,0,0.165,-0.003,0.02,0.083,0.048,0.033,0.033,0.031,0.03,0.034,0.035,0.035,0.035,0.037 From 043a26cb97d61387e9234a4208ce7969218f2bc9 Mon Sep 17 00:00:00 2001 From: baogorek Date: Tue, 27 May 2025 11:59:17 -0400 Subject: [PATCH 21/21] trying a different dependency naming --- policyengine_us_data/utils/github.py | 4 ---- pyproject.toml | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/policyengine_us_data/utils/github.py b/policyengine_us_data/utils/github.py index 3960e3a9..af74c526 100644 --- a/policyengine_us_data/utils/github.py +++ b/policyengine_us_data/utils/github.py @@ -12,10 +12,6 @@ if TOKEN: AUTH_HEADERS = {"Authorization": f"token {TOKEN}"} else: - print( - "NOTE: POLICYENGINE_US_DATA_GITHUB_TOKEN is not set.\n" - "Some microdata files may be unavailable." - ) AUTH_HEADERS = {} diff --git a/pyproject.toml b/pyproject.toml index 4d567fd1..fd7c1e6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,8 +17,8 @@ authors = [ license = {file = "LICENSE"} requires-python = ">=3.11, <3.13.0" dependencies = [ - "policyengine_us>=1.197.0", - "policyengine_core>=3.14.1", + "policyengine-us>=1.197.0", + "policyengine-core>=3.14.1", "requests", "tqdm", "microdf_python>=0.4.3",