diff --git a/.github/workflows/code_changes.yaml b/.github/workflows/code_changes.yaml index 21c6815b1..66afc74c5 100644 --- a/.github/workflows/code_changes.yaml +++ b/.github/workflows/code_changes.yaml @@ -27,14 +27,14 @@ jobs: id-token: "write" steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - uses: "google-github-actions/auth@v2" with: workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider" @@ -51,7 +51,7 @@ jobs: env: HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./coverage.xml fail_ci_if_error: false diff --git a/.github/workflows/docs_changes.yaml b/.github/workflows/docs_changes.yaml index ac362263f..87d69f9e8 100644 --- a/.github/workflows/docs_changes.yaml +++ b/.github/workflows/docs_changes.yaml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install package run: uv pip install -e .[dev] --system diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index ffac44323..45a640d08 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -27,14 +27,14 @@ jobs: id-token: "write" steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.13' - uses: "google-github-actions/auth@v2" with: workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider" @@ -51,7 +51,7 @@ jobs: env: HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./coverage.xml fail_ci_if_error: false diff --git a/.github/workflows/pr_docs_changes.yaml b/.github/workflows/pr_docs_changes.yaml index b30680950..150c8b41c 100644 --- a/.github/workflows/pr_docs_changes.yaml +++ b/.github/workflows/pr_docs_changes.yaml @@ -16,14 +16,14 @@ jobs: name: Test documentation builds steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install package run: uv pip install -e .[dev] --system diff --git a/.github/workflows/versioning.yaml b/.github/workflows/versioning.yaml index 17de037dc..1b9011b27 100644 --- a/.github/workflows/versioning.yaml +++ b/.github/workflows/versioning.yaml @@ -41,14 +41,14 @@ jobs: GH_TOKEN: ${{ secrets.POLICYENGINE_GITHUB }} steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install package run: uv pip install -e .[dev] --system - name: Install policyengine diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..8b1f11147 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,9 @@ +- bump: patch + changes: + changed: + - Add Python 3.13 support and update CI workflows + - Updated policyengine-core dependency to >=3.19.0 for Python 3.13 support + - Updated GitHub Actions to latest versions (checkout@v4, setup-python@v5) for Python 3.13 compatibility + - Set all workflows to use Python 3.13 + removed: + - Removed unused tables dependency that was blocking Python 3.13 compatibility \ No newline at end of file diff --git a/policyengine_uk/variables/gov/dwp/winter_fuel_allowance.py b/policyengine_uk/variables/gov/dwp/winter_fuel_allowance.py index b478320cd..0c23d68e7 100644 --- a/policyengine_uk/variables/gov/dwp/winter_fuel_allowance.py +++ b/policyengine_uk/variables/gov/dwp/winter_fuel_allowance.py @@ -45,11 +45,12 @@ def formula(household, period, parameters): ) meets_mtb_requirement = ( - on_mtb | ~wfp.eligibility.require_benefits | meets_income_passport + on_mtb + | (not wfp.eligibility.require_benefits) + | meets_income_passport ) - meets_spa_requirement = ( - household.any(is_SP_age) - | ~wfp.eligibility.state_pension_age_requirement + meets_spa_requirement = household.any(is_SP_age) | ( + not wfp.eligibility.state_pension_age_requirement ) meets_higher_age_requirement = household.any( age >= wfp.eligibility.higher_age_requirement diff --git a/pyproject.toml b/pyproject.toml index eda569389..5fe570d9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,29 +7,32 @@ authors = [ { name = "PolicyEngine", email = "nikhil@policyengine.org" } ] maintainers = [ - { name = "Nikhil Woodruff", email = "nikhil.woodruff@outlook.com" } + { name = "Nikhil Woodruff", email = "nikhil@policyengine.org" } ] -license = { text = "AGPL-3.0" } +license = "AGPL-3.0" keywords = ["benefit", "microsimulation", "social", "tax"] classifiers = [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: POSIX", "Programming Language :: Python", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Information Analysis", ] requires-python = ">=3.10" dependencies = [ - "policyengine-core>=3.6.4", - "microdf-python>=1.0.0", + "policyengine-core>=3.19.3", + "microdf-python>=1.0.2", ] [project.urls] Homepage = "https://github.com/PolicyEngine/policyengine-uk" Repository = "https://github.com/PolicyEngine/policyengine-uk" - -[project.scripts] -# Add console scripts here if needed +Issues = "https://github.com/PolicyEngine/policyengine-uk/issues" +Changelog = "https://github.com/PolicyEngine/policyengine-uk/blob/master/CHANGELOG.md" [build-system] requires = ["hatchling"] @@ -46,16 +49,6 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["policyengine_uk"] -[tool.hatch.build.targets.wheel.shared-data] -"CHANGELOG.md" = "share/openfisca/openfisca-country-template/CHANGELOG.md" -"LICENSE" = "share/openfisca/openfisca-country-template/LICENSE" -"README.md" = "share/openfisca/openfisca-country-template/README.md" - -[dependency-groups] -dev = [ - "tables>=3.10.1", -] - [project.optional-dependencies] dev = [ "black",