From d9fd8978092bd9a1849708d97a85c2b0edf43ea1 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Sun, 29 Sep 2024 18:48:01 +0100 Subject: [PATCH 1/5] Fix Move PolicyEngine US out of dev dependencies #93 --- Makefile | 1 + changelog_entry.yaml | 4 ++++ pyproject.toml | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b7e78151b..5eb827b74 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ test: install: pip install -e ".[dev]" + pip install policyengine-us==1.100.0 changelog: build-changelog changelog.yaml --output changelog.yaml --update-last-date --start-from 1.0.0 --append-file changelog_entry.yaml diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..4e551c16c 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Moved PolicyEngine US out of setup.py dependencies. diff --git a/pyproject.toml b/pyproject.toml index b11b11792..4584a2388 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,6 @@ dependencies = [ dev = [ "black", "pytest", - "policyengine_us==1.100.0", "quantile-forest", "torch", "tables", From 5865bc026f44f0452f0252d73f3ba9f0343edf31 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Sun, 29 Sep 2024 18:50:02 +0100 Subject: [PATCH 2/5] Change to minor bump --- changelog_entry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 4e551c16c..04bfa6a53 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ -- bump: patch +- bump: minor changes: fixed: - Moved PolicyEngine US out of setup.py dependencies. From 2d3a4262dae5448db851af73d458218d5a088424 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Sun, 29 Sep 2024 18:50:14 +0100 Subject: [PATCH 3/5] Move URLs up --- policyengine_us_data/datasets/acs/acs.py | 2 +- policyengine_us_data/datasets/cps/cps.py | 4 ++-- policyengine_us_data/datasets/cps/enhanced_cps.py | 2 +- policyengine_us_data/datasets/puf/puf.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/policyengine_us_data/datasets/acs/acs.py b/policyengine_us_data/datasets/acs/acs.py index 993b10eb4..c63d93f71 100644 --- a/policyengine_us_data/datasets/acs/acs.py +++ b/policyengine_us_data/datasets/acs/acs.py @@ -111,7 +111,7 @@ class ACS_2022(ACS): time_period = 2022 file_path = STORAGE_FOLDER / "acs_2022.h5" census_acs = CensusACS_2022 - url = "release://PolicyEngine/policyengine-us-data/1.7.0/acs_2022.h5" + url = "release://PolicyEngine/policyengine-us-data/1.8.0/acs_2022.h5" if __name__ == "__main__": diff --git a/policyengine_us_data/datasets/cps/cps.py b/policyengine_us_data/datasets/cps/cps.py index 8cb70a7a8..bea5975d3 100644 --- a/policyengine_us_data/datasets/cps/cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -622,7 +622,7 @@ class CPS_2024(CPS): label = "CPS 2024 (2022-based)" file_path = STORAGE_FOLDER / "cps_2024.h5" time_period = 2024 - url = "release://policyengine/policyengine-us-data/1.7.0/cps_2024.h5" + url = "release://policyengine/policyengine-us-data/1.8.0/cps_2024.h5" class PooledCPS(Dataset): @@ -681,7 +681,7 @@ class Pooled_3_Year_CPS_2023(PooledCPS): CPS_2023, ] time_period = 2023 - url = "release://PolicyEngine/policyengine-us-data/1.7.0/pooled_3_year_cps_2023.h5" + url = "release://PolicyEngine/policyengine-us-data/1.8.0/pooled_3_year_cps_2023.h5" if __name__ == "__main__": diff --git a/policyengine_us_data/datasets/cps/enhanced_cps.py b/policyengine_us_data/datasets/cps/enhanced_cps.py index bc200f798..4dd5ad7c1 100644 --- a/policyengine_us_data/datasets/cps/enhanced_cps.py +++ b/policyengine_us_data/datasets/cps/enhanced_cps.py @@ -177,7 +177,7 @@ class EnhancedCPS_2024(EnhancedCPS): name = "enhanced_cps_2024" label = "Enhanced CPS 2024" file_path = STORAGE_FOLDER / "enhanced_cps_2024.h5" - url = "release://policyengine/policyengine-us-data/1.7.0/enhanced_cps_2024.h5" + url = "release://policyengine/policyengine-us-data/1.8.0/enhanced_cps_2024.h5" if __name__ == "__main__": diff --git a/policyengine_us_data/datasets/puf/puf.py b/policyengine_us_data/datasets/puf/puf.py index deae9b3e9..34b52cbe8 100644 --- a/policyengine_us_data/datasets/puf/puf.py +++ b/policyengine_us_data/datasets/puf/puf.py @@ -493,7 +493,7 @@ class PUF_2021(PUF): name = "puf_2021" time_period = 2021 file_path = STORAGE_FOLDER / "puf_2021.h5" - url = "release://policyengine/irs-soi-puf/1.7.0/puf_2021.h5" + url = "release://policyengine/irs-soi-puf/1.8.0/puf_2021.h5" class PUF_2024(PUF): @@ -501,7 +501,7 @@ class PUF_2024(PUF): name = "puf_2024" time_period = 2024 file_path = STORAGE_FOLDER / "puf_2024.h5" - url = "release://policyengine/irs-soi-puf/1.7.0/puf_2024.h5" + url = "release://policyengine/irs-soi-puf/1.8.0/puf_2024.h5" MEDICAL_EXPENSE_CATEGORY_BREAKDOWNS = { From f30275922d5420ea95d7ef7414161c6ea32af87f Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Sun, 29 Sep 2024 18:57:00 +0100 Subject: [PATCH 4/5] Add microdf to dependencies --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 4584a2388..71f15aba9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ license = {file = "LICENSE"} requires-python = ">=3.10" dependencies = [ "policyengine_core", + "microdf_python", "requests", "tqdm", ] From e16001992ebde257e48e9b5fd9bf0ed2b6372357 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Sun, 29 Sep 2024 19:02:42 +0100 Subject: [PATCH 5/5] Use `make install` over `pip` --- .github/workflows/pull_request.yaml | 2 +- .github/workflows/push.yaml | 4 ++-- policyengine_us_data/datasets/puf/puf.py | 2 +- pyproject.toml | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index bcb9d1aef..20f6fe04a 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -60,7 +60,7 @@ jobs: with: python-version: 3.12 - name: Install package - run: pip install -e ".[dev]" + run: make install - name: Download data inputs run: make download env: diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 5b2a854d4..f56701bae 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -38,7 +38,7 @@ jobs: with: python-version: 3.12 - name: Install package - run: pip install -e ".[dev]" + run: make install - name: Download data inputs run: make download env: @@ -73,7 +73,7 @@ jobs: with: python-version: 3.12 - name: Install package - run: pip install -e ".[dev]" + run: make install - name: Build package run: python -m build - name: Publish a git tag diff --git a/policyengine_us_data/datasets/puf/puf.py b/policyengine_us_data/datasets/puf/puf.py index 34b52cbe8..37731710d 100644 --- a/policyengine_us_data/datasets/puf/puf.py +++ b/policyengine_us_data/datasets/puf/puf.py @@ -1,7 +1,7 @@ from tqdm import tqdm import numpy as np import pandas as pd -from microdf import MicroDataFrame +from policyengine_core.weighting import MicroDataFrame from policyengine_core.data import Dataset from policyengine_us_data.storage import STORAGE_FOLDER from policyengine_us_data.datasets.puf.uprate_puf import uprate_puf diff --git a/pyproject.toml b/pyproject.toml index 71f15aba9..4584a2388 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ license = {file = "LICENSE"} requires-python = ">=3.10" dependencies = [ "policyengine_core", - "microdf_python", "requests", "tqdm", ]