Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Build changelog
run: pip install yaml-changelog && make changelog
- name: Preview changelog update
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Auth
uses: google-github-actions/auth@v2
with:
Expand All @@ -80,11 +80,17 @@ jobs:
name: Test
runs-on: ubuntu-latest
needs: test_env_vars
container:
image: policyengine/policyengine-api
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y redis-server
- name: Start Redis
run: sudo systemctl start redis-server
- name: Auth
uses: google-github-actions/auth@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies (required for finding API model versions)
run: make install
- name: Install jq (required only for GitHub Actions)
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Build changelog
run: pip install yaml-changelog && make changelog
- name: Preview changelog update
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Publish Git Tag
run: ".github/publish-git-tag.sh"
- name: GCP authentication
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.14
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Added Python 3.14 support and dropped Python 3.10.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM python:3.11
FROM python:3.12
RUN pip install policyengine-core policyengine-uk policyengine-us ipython
4 changes: 2 additions & 2 deletions gcp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.11
FROM python:3.12
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
RUN apt-get update && apt-get install -y build-essential checkinstall
RUN python3.11 -m pip install --upgrade pip --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip
RUN python3.12 -m pip install --upgrade pip --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip
RUN apt-get update && apt-get install -y redis-server
RUN pip install git+https://github.com/policyengine/policyengine-api
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@
author_email="hello@policyengine.org",
description="PolicyEngine API",
packages=find_packages(),
python_requires=">=3.11",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: GNU Affero General Public License v3",
],
install_requires=[
"anthropic",
"assertpy",
"click>=8,<9",
"cloud-sql-python-connector",
"faiss-cpu<1.8.0",
"faiss-cpu",
"flask>=3,<4",
"flask-cors>=5,<6",
"google-cloud-logging",
Expand Down
8 changes: 4 additions & 4 deletions tests/to_refactor/python/test_us_policy_macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def utah_reform_runner(rest_client, region: str = "us"):
# Ensure that there is some budgetary impact
cost = round(result["budget"]["budgetary_impact"] / 1e6, 1)
assert (
cost / 95.4 - 1
cost / 1867.4 - 1
) < 0.01, (
f"Expected budgetary impact to be 95.4 million, got {cost} million"
f"Expected budgetary impact to be 1867.4 million, got {cost} million"
)

assert (
result["intra_decile"]["all"]["Lose less than 5%"] / 0.637 - 1
result["intra_decile"]["all"]["Lose less than 5%"] / 0.534 - 1
) < 0.01, (
f"Expected 63.7% of people to lose less than 5%, got "
f"Expected 53.4% of people to lose less than 5%, got "
f"{result['intra_decile']['all']['Lose less than 5%']}"
)

Expand Down
Loading