Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.12 support #347

Merged
merged 3 commits into from
Feb 7, 2024
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
26 changes: 14 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ on:

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
tox-env: [py38, py39, py310, py311, docs, linters, package]
tox-env: [py38, py39, py310, py311, py312, docs, linters, package]
include:
- tox-env: py38
python-version: 3.8
Expand All @@ -27,15 +27,17 @@ jobs:
python-version: "3.10"
- tox-env: py311
python-version: "3.11"
- tox-env: py312
python-version: "3.12"
- tox-env: linters
python-version: 3.8
python-version: "3.11"
- tox-env: package
python-version: 3.8
python-version: "3.11"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
Expand All @@ -45,24 +47,24 @@ jobs:
run: >
tox -e ${{ matrix.tox-env }}
- name: Upload coverage to Codecov
if: matrix.tox-env == 'py38' || matrix.tox-env == 'py39' || matrix.tox-env == 'py310' || matrix.tox-env == 'py311'
if: matrix.tox-env == 'py38' || matrix.tox-env == 'py39' || matrix.tox-env == 'py310' || matrix.tox-env == 'py311' || matrix.tox-env == 'py312'
uses: codecov/codecov-action@v1
with:
file: .coverage

build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

needs: test

if: "startsWith(github.ref, 'refs/tags')"

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.11"
- name: Install build
run: python -m pip install --user build
- name: Build a binary wheel and a source tarball
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Added
- Optionally show progress bar when uploading files
- Add ``modified`` as read-only field to the ``AnnotationValue`` resource
- Add md5 checksum after file is downloaded
- Add support for Python3.12

Fixed
-----
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
html_theme = 'sphinx_rtd_theme'

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ change directory::

Prepare Resolwe SDK for Python for development::

pip install -e .[docs,package,test]
pip install -e '.[docs,package,test]'

.. note::

Expand Down
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = [
dynamic = ["version"]
readme = "README.rst"
license = {file = "LICENSE"}
requires-python = ">=3.8, <3.12"
requires-python = ">=3.8, <3.13"
keywords = [
"bio",
"bioinformatics",
Expand All @@ -38,35 +38,35 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"aiohttp~=3.8.5",
"requests>=2.6.0",
"aiohttp~=3.9.3",
"requests",
"urllib3>=2;python_version >= '3.10'",
"slumber>=0.7.1",
"wrapt",
"pytz>=2018.4",
"tzlocal>=1.5.1",
"pandas>=1.0.0",
"pytz",
"tzlocal",
"pandas",
"tqdm",
"openpyxl",
"xlrd",
"boto3[crt]~=1.24",
"boto3-stubs[s3]~=1.24",
'importlib-metadata; python_version<"3.8"',
"boto3[crt]",
"boto3-stubs[s3]",
"packaging",
]
[project.optional-dependencies]
docs = [
"sphinx~=5.2.3",
"sphinx_rtd_theme~=1.0.0",
"sphinx",
"sphinx_rtd_theme",
# TODO: Consider using sphinx-pyproject in the future. At the time of this
# writing the missing feature was disability of sphinx-pyproject to detect
# dynamic project version
]
package = [
"twine~=4.0.1",
"check-manifest>=0.48",
"twine",
"check-manifest",
"build",
]
test = [
Expand All @@ -86,7 +86,7 @@ documentation = "https://resdk.readthedocs.io/en/latest/"
[tool.setuptools_scm]

[tool.black]
target-version = ["py38", "py39", "py310", "py311"]
target-version = ["py38", "py39", "py310", "py311", "py312"]

[tool.pydocstyle]
add-select = "D404"
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38,39,310,311},docs,linters,package
envlist = py{38,39,310,311,312},docs,linters,package
skip_missing_interpreters = True
minversion = 3.5.0
isolated_build = true
Expand All @@ -8,12 +8,12 @@ isolated_build = true
extras =
docs: docs
package: package
py{38,39,310,311},linters: test
py{38,39,310,311,312},linters: test
# Run all command in environment to see their output even if one of the commands fail.
ignore_errors = true
commands =
# Run tests.
py{38,39,310,311}: pytest --verbose --cov=resdk
py{38,39,310,311,312}: pytest --verbose --cov=resdk

# Build documentation.
docs: sphinx-build docs build/sphinx -a -E -W
Expand Down
Loading