Skip to content

Commit d4bd09c

Browse files
authored
Merge pull request #22 from MaxGhenis/upgrade-python-3.14
Add Python 3.14 support
2 parents 2120fdf + 621e0fe commit d4bd09c

File tree

7 files changed

+35
-38
lines changed

7 files changed

+35
-38
lines changed

.github/workflows/pr.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
Lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- name: Check formatting
1111
uses: "lgeiger/black-action@master"
1212
with:
@@ -15,15 +15,15 @@ jobs:
1515
name: Check version
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121
repository: ${{ github.event.pull_request.head.repo.full_name }}
2222
ref: ${{ github.event.pull_request.head.ref }}
2323
- name: Set up Python
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
26-
python-version: 3.9
26+
python-version: 3.12
2727
- name: Build changelog
2828
run: pip install yaml-changelog>=0.1.7 && make changelog
2929
- name: Preview changelog update
@@ -35,19 +35,19 @@ jobs:
3535
strategy:
3636
matrix:
3737
os: [ubuntu-latest, windows-latest]
38+
python-version: ["3.11", "3.12", "3.13", "3.14"]
3839
steps:
3940
- name: Checkout repo
40-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4142
- name: Set up Python
42-
uses: actions/setup-python@v4
43+
uses: actions/setup-python@v5
4344
with:
44-
python-version: 3.9
45+
python-version: ${{ matrix.python-version }}
46+
allow-prereleases: true
4547
- name: Install package
4648
run: make install
4749
- name: Run tests
4850
run: make test
4951
- uses: codecov/codecov-action@v3
5052
- name: Build package
5153
run: make build
52-
- name: Test documentation builds
53-
run: make documentation

.github/workflows/push.yaml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
(github.repository == 'PolicyEngine/policyengine-ng')
1010
&& (github.event.head_commit.message == 'Update PolicyEngine Nigeria')
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- name: Check formatting
1414
uses: "lgeiger/black-action@master"
1515
with:
@@ -22,15 +22,15 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout repo
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626
with:
2727
repository: ${{ github.event.pull_request.head.repo.full_name }}
2828
ref: ${{ github.event.pull_request.head.ref }}
2929
token: ${{ secrets.POLICYENGINE_GITHUB }}
3030
- name: Setup Python
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3232
with:
33-
python-version: 3.9
33+
python-version: 3.14
3434
- name: Build changelog
3535
run: pip install yaml-changelog && make changelog
3636
- name: Preview changelog update
@@ -52,37 +52,28 @@ jobs:
5252
os: [ubuntu-latest, windows-latest]
5353
steps:
5454
- name: Checkout repo
55-
uses: actions/checkout@v3
55+
uses: actions/checkout@v4
5656
- name: Set up Python
57-
uses: actions/setup-python@v4
57+
uses: actions/setup-python@v5
5858
with:
59-
python-version: 3.9
59+
python-version: 3.14
6060
- name: Install package
6161
run: make install
6262
- name: Run tests
6363
run: make test
6464
- uses: codecov/codecov-action@v3
65-
- name: Generate documentation
66-
run: make documentation
67-
- name: Deploy documentation
68-
if: matrix.os == 'ubuntu-latest'
69-
uses: JamesIves/github-pages-deploy-action@releases/v3
70-
with:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
BRANCH: gh-pages # The branch the action should deploy to.
73-
FOLDER: docs/_build/html # The folder the action should deploy.
7465
Publish:
7566
runs-on: ubuntu-latest
7667
if: |
7768
(github.repository == 'PolicyEngine/policyengine-ng')
7869
&& (github.event.head_commit.message == 'Update PolicyEngine Nigeria')
7970
steps:
8071
- name: Checkout repo
81-
uses: actions/checkout@v3
72+
uses: actions/checkout@v4
8273
- name: Setup Python
83-
uses: actions/setup-python@v4
74+
uses: actions/setup-python@v5
8475
with:
85-
python-version: 3.9
76+
python-version: 3.14
8677
- name: Publish a git tag
8778
run: ".github/publish-git-tag.sh || true"
8879
- name: Install package
@@ -104,15 +95,15 @@ jobs:
10495
GH_TOKEN: ${{ secrets.POLICYENGINE_GITHUB }}
10596
steps:
10697
- name: Checkout repo
107-
uses: actions/checkout@v2
98+
uses: actions/checkout@v4
10899
with:
109100
repository: ${{ github.event.pull_request.head.repo.full_name }}
110101
ref: ${{ github.event.pull_request.head.ref }}
111102
token: ${{ secrets.POLICYENGINE_GITHUB }}
112103
- name: Setup Python
113-
uses: actions/setup-python@v2
104+
uses: actions/setup-python@v5
114105
with:
115-
python-version: 3.9
106+
python-version: 3.14
116107
- name: Install Wheel and Pytest
117108
run: pip3 install wheel setuptools pytest==5.4.3
118109
- name: Install package
@@ -121,4 +112,3 @@ jobs:
121112
run: python .github/update_api.py
122113
env:
123114
GITHUB_TOKEN: ${{ secrets.POLICYENGINE_GITHUB }}
124-

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
all: install format test build changelog
22

33
documentation:
4-
jb clean docs
5-
jb build docs
4+
myst build docs
65

76
format:
87
black . -l 79

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: minor
2+
changes:
3+
added:
4+
- Python 3.14 support. Dropped Python 3.10 and below.

policyengine_ng/entities.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
See https://openfisca.org/doc/key-concepts/person,_entities,_role.html
77
"""
8+
89
from typing import Any
910

1011
from policyengine_core.entities import build_entity

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@
4141
"License :: OSI Approved :: GNU Affero General Public License v3",
4242
"Operating System :: POSIX",
4343
"Programming Language :: Python",
44-
"Programming Language :: Python :: 3.7",
45-
"Programming Language :: Python :: 3.8",
46-
"Programming Language :: Python :: 3.9",
44+
"Programming Language :: Python :: 3.11",
45+
"Programming Language :: Python :: 3.12",
46+
"Programming Language :: Python :: 3.13",
47+
"Programming Language :: Python :: 3.14",
4748
"Topic :: Scientific/Engineering :: Information Analysis",
4849
],
50+
python_requires=">=3.11",
4951
description="Core microsimulation engine enabling country-specific policy models.",
5052
keywords="tax benefit microsimulation framework",
5153
license="https://www.fsf.org/licensing/licenses/agpl-3.0.html",
5254
license_files=("LICENSE",),
53-
url="https://github.com/policyengine/policyengine-core",
55+
url="https://github.com/policyengine/policyengine-ng",
5456
long_description=long_description,
5557
long_description_content_type="text/markdown",
5658
entry_points={

0 commit comments

Comments
 (0)