Skip to content

Commit

Permalink
Update to only test with Python 3.10, 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Feb 9, 2024
1 parent 9fffa9e commit c0ce447
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint
on: [push, pull_request]
env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: "3.10"

jobs:
lint:
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Install Poetry
uses: ThePalaceProject/circulation/.github/actions/poetry@main
with:
version: "1.5.1"
version: "1.7.1"

- name: Install Pre-commit
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]

# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. This prevents duplicated runs on internal PRs.
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Install Poetry
uses: ThePalaceProject/circulation/.github/actions/poetry@main
with:
version: "1.5.1"
version: "1.7.1"

- name: Install Tox
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
hooks:
- id: pyupgrade
args:
- --py38-plus
- --py310-plus

- repo: https://github.com/myint/autoflake
rev: v2.2.1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV UWSGI_MASTER=1 \
UWSGI_POST_BUFFERING=1 \
UWSGI_LOGFORMAT="[pid: %(pid)|app: -|req: -/-] %(addr) (%(user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(clean_uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core))"

ARG POETRY_VERSION=1.5.1
ARG POETRY_VERSION=1.7.1

# Install system
RUN apt-get update -y && \
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
![Python: 3.8,3.9,3.10,3.11](https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
![Python: 3.10,3.11](https://img.shields.io/badge/Python-3.10%20|%203.11-blue)

## Prerequisites

Python 3.8+ must be installed, and a SQL database must be available.
Python 3.10+ must be installed, and a SQL database must be available.

## Notes

Expand Down Expand Up @@ -227,17 +227,15 @@ flag.

| Environment | Python Version |
|-------------|----------------|
| py38 | Python 3.8 |
| py39 | Python 3.9 |
| py310 | Python 3.10 |
| py311 | Python 3.11 |

All of these environments are tested by default when running tox. To test one specific environment you can use the `-e`
flag.

Test Python 3.8
Test Python 3.10

tox -e py38
tox -e py310

You need to have the Python versions you are testing against installed on your local system. `tox` searches the system
for installed Python versions, but does not install new Python versions. If `tox` doesn't find the Python version its
Expand All @@ -256,9 +254,9 @@ on Github Actions. `tox-docker` is included in the project's development depende
The docker functionality is included in a `docker` factor that can be added to the environment. To run an environment
with a particular factor you add it to the end of the environment.

Test with Python 3.8 using docker containers for the services.
Test with Python 3.10 using docker containers for the services.

tox -e py38-docker
tox -e py310-docker

#### Pytest

Expand Down

0 comments on commit c0ce447

Please sign in to comment.