Skip to content

Commit

Permalink
Upgrade Python patch versions and add 3.11, 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed Jun 12, 2024
1 parent dde3760 commit cc30460
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .cookiecutter/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"package_name": "pip_sync_faster",
"slug": "pip-sync-faster",
"short_description": "A wrapper that makes pip-sync faster.",
"python_versions": "3.10.6, 3.9.13, 3.8.13",
"python_versions": "3.12.4, 3.11.9, 3.10.14, 3.9.19, 3.8.19",
"github_owner": "hypothesis",
"copyright_holder": "Hypothesis",
"public": "yes",
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- run: python -m pip install 'tox<4'
- run: tox -e checkformatting
Lint:
Expand All @@ -32,14 +32,14 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- run: python -m pip install 'tox<4'
- run: tox -e lint
Tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.9', '3.8']
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8']
name: Unit tests with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- name: Download coverage files
uses: actions/download-artifact@v3
with:
Expand All @@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.9', '3.8']
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8']
name: Functional tests with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 5 additions & 3 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
3.10.6
3.9.13
3.8.13
3.12.4
3.11.9
3.10.14
3.9.19
3.8.19
28 changes: 24 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,20 @@ checkformatting: python
@pyenv exec tox -qe checkformatting

.PHONY: test
$(call help,make test,"run the unit tests in Python 3.10")
$(call help,make test,"run the unit tests in Python 3.12")
test: python
@pyenv exec tox -qe tests

.PHONY: test-py311
$(call help,make test-py311,"run the unit tests in Python 3.11")
test-py311: python
@pyenv exec tox -qe py311-tests

.PHONY: test-py310
$(call help,make test-py310,"run the unit tests in Python 3.10")
test-py310: python
@pyenv exec tox -qe py310-tests

.PHONY: test-py39
$(call help,make test-py39,"run the unit tests in Python 3.9")
test-py39: python
Expand All @@ -51,13 +61,23 @@ test-py38: python
.PHONY: coverage
$(call help,make coverage,"run the tests and print the coverage report")
coverage: python
@pyenv exec tox --parallel -qe 'tests,py{39,38}-tests,coverage'
@pyenv exec tox --parallel -qe 'tests,py{311,310,39,38}-tests,coverage'

.PHONY: functests
$(call help,make functests,"run the functional tests in Python 3.10")
$(call help,make functests,"run the functional tests in Python 3.12")
functests: python
@pyenv exec tox -qe functests

.PHONY: functests-py311
$(call help,make functests-py311,"run the functional tests in Python 3.11")
functests-py311: python
@pyenv exec tox -qe py311-functests

.PHONY: functests-py310
$(call help,make functests-py310,"run the functional tests in Python 3.10")
functests-py310: python
@pyenv exec tox -qe py310-functests

.PHONY: functests-py39
$(call help,make functests-py39,"run the functional tests in Python 3.9")
functests-py39: python
Expand All @@ -72,7 +92,7 @@ functests-py38: python
$(call help,make sure,"make sure that the formatting$(comma) linting and tests all pass")
sure: python
sure:
@pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{39,38}-tests,coverage,functests,py{39,38}-functests'
@pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{311,310,39,38}-tests,coverage,functests,py{311,310,39,38}-functests'

.PHONY: template
$(call help,make template,"update from the latest cookiecutter template")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href="https://github.com/hypothesis/pip-sync-faster/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/pip-sync-faster/ci.yml?branch=main"></a>
<a href="https://pypi.org/project/pip-sync-faster"><img src="https://img.shields.io/pypi/v/pip-sync-faster"></a>
<a><img src="https://img.shields.io/badge/python-3.10 | 3.9 | 3.8-success"></a>
<a><img src="https://img.shields.io/badge/python-3.12 | 3.11 | 3.10 | 3.9 | 3.8-success"></a>
<a href="https://github.com/hypothesis/pip-sync-faster/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
<a href="https://github.com/hypothesis/cookiecutters/tree/main/pypackage"><img src="https://img.shields.io/badge/cookiecutter-pypackage-success"></a>
<a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>
Expand Down
2 changes: 1 addition & 1 deletion bin/make_python
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -n "${CI+x}" ]; then exit; fi

pyenv_root=$(pyenv root)

for python_version in 3.10.6 3.9.13 3.8.13; do
for python_version in 3.12.4 3.11.9 3.10.14 3.9.19 3.8.19; do
bin_dir=$pyenv_root/versions/$python_version/bin
if [ ! -f "$bin_dir"/tox ]; then
pyenv install --skip-existing "$python_version"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ deps =
lint,template: cookiecutter
typecheck: mypy
depends =
coverage: tests,py{39,38}-tests
coverage: tests,py{311,310,39,38}-tests
commands =
dev: {posargs:ipython --classic --no-banner --no-confirm-exit}
format: black src tests bin
Expand Down

0 comments on commit cc30460

Please sign in to comment.