From 85fee39396742ebc4c171c1310f6d200e50c201f Mon Sep 17 00:00:00 2001 From: Lars <37488165+LarsKue@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:44:59 +0100 Subject: [PATCH] Drop Support for Python 3.9, Add Support for Python 3.11 (#132) * Drop Support for Python 3.9 Add Support for Python 3.11 --- .github/workflows/docs.yml | 2 +- .github/workflows/publish.yml | 4 ++-- .github/workflows/tests.yml | 13 +++++++------ INSTALL.rst | 2 +- environment.yaml | 10 ---------- pyproject.toml | 2 +- setup.cfg | 2 +- tox.ini | 4 ++-- 8 files changed, 15 insertions(+), 24 deletions(-) delete mode 100644 environment.yaml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 84e7ed6ca..b63461239 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.11 - cache: 'pip' + cache: "pip" - name: Install dependencies run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 76d9d52a4..bdf302e34 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - run: python3 -m pip install --upgrade build && python3 -m build + - run: python3 -m pip install -U build && python3 -m build - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index badf8e86d..f5714cc43 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: Tests on: pull_request: push: - branches: + branches: - master - Development @@ -14,17 +14,18 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: ['3.9'] + python-version: ["3.10", "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 run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions + python -m ensurepip + python -m pip install -U pip setuptools wheel + python -m pip install tox tox-gh-actions - name: Test with tox run: tox diff --git a/INSTALL.rst b/INSTALL.rst index 040bdfb64..f072515e5 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -4,7 +4,7 @@ Full Installation Instructions Requirements ------------ -This package requires Python 3.9 or later. +This package requires Python 3.10 or later. A simple installation is possible via `Miniconda `_, e.g. (on Linux) diff --git a/environment.yaml b/environment.yaml deleted file mode 100644 index 2fb72a6aa..000000000 --- a/environment.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# Read the docsrc - -# run: conda env create --file environment.yaml - -name: bf -dependencies: - - python==3.9 - - pip - - pip: - - .[docs] diff --git a/pyproject.toml b/pyproject.toml index e0cb0f818..2bb8416d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ no_implicit_reexport = true [tool.black] line-length = 120 -target-version = ["py39", "py310"] +target-version = ["py310", "py311"] [tool.isort] profile = "black" diff --git a/setup.cfg b/setup.cfg index 903ef3943..988611622 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ keywords = model comparison [options] -python_requires = >=3.9 +python_requires = >=3.10 packages = find: install_requires = h5py >= 3.7 diff --git a/tox.ini b/tox.ini index 224761df5..ff23a1fd6 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ envlist = [gh-actions] python = - 3.9: base, flake8 + 3.10: base, flake8 [testenv] setenv = @@ -16,7 +16,7 @@ commands = pytest --basetemp={envtmpdir} [testenv:flake8] -basepython = python3.9 +basepython = python3.10 deps = flake8 commands = flake8 bayesflow tests