diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index abd68646..5d9ea4e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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 @@ -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 diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index e9f1ec25..33f9c845 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -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 ----- diff --git a/docs/conf.py b/docs/conf.py index 0d9ba35c..0fc249c5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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)} diff --git a/docs/contributing.rst b/docs/contributing.rst index 494669d2..84a16dc4 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -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:: diff --git a/pyproject.toml b/pyproject.toml index 5d0720ea..0747addd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -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 = [ @@ -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" diff --git a/tox.ini b/tox.ini index 5bb5795d..5071ff3a 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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