diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c409fc..b9f5ff4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: jobs: build: docker: - - image: cimg/python:3.8 + - image: cimg/python:3.9 steps: - checkout - run: @@ -16,7 +16,7 @@ jobs: sudo apt-get install -y ninja-build libcunit1-dev valgrind clang doxygen python3-pip # Install meson as root so we can install to the system below. sudo pip install meson - pip install numpy==1.18.5 + pip install numpy==1.23.5 pip install --user -r python/requirements/development.txt echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV - run: @@ -72,17 +72,12 @@ jobs: command: | cd python rm -fR build - python setup.py sdist python -m venv venv source venv/bin/activate pip install --upgrade setuptools pip wheel numpy pip install build python -m build - python setup.py build_ext - python setup.py egg_info - python setup.py bdist_wheel - pip wheel dist/*.tar.gz - pip install dist/*.tar.gz + pip install dist/*.whl - run: name: Run Python with C coverage command: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a860d2..6091e01 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,13 +21,12 @@ jobs: pip install clang-format==6.0.1 - uses: pre-commit/action@v3.0.0 - test: name: Python runs-on: ${{ matrix.os }} strategy: matrix: - python: [ 3.8, 3.11 ] + python: [ 3.9, 3.12 ] os: [ macos-latest, ubuntu-latest, windows-latest ] defaults: run: @@ -46,12 +45,47 @@ jobs: python-version: ${{matrix.python}} - name: Install pip deps - run: pip install -r python/requirements/CI/tests/requirements.txt + run: python -m pip install -r python/requirements/CI/tests/requirements.txt - name: Build module working-directory: python run: | - python setup.py build_ext --inplace + python -m pip install . + + - name: Run tests + working-directory: python + run: | + python -m pytest tests + + numpy-versions: + name: Numpy compat + runs-on: ubuntu-latest + strategy: + matrix: + numpy: [ 1.23.5, "2.0" ] + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.6.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install numpy + run: python -m pip install numpy==${{matrix.numpy}} + + - name: Install package + working-directory: python + run: | + python -m pip install . + + - name: Install pip deps + run: | + python -m pip install -r python/requirements/CI/tests/requirements.txt + # Make sure we're still using the same version of numpy + python -m pip install numpy==${{matrix.numpy}} - name: Run tests working-directory: python diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c088055..2803640 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -15,7 +15,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: [3.8, 3.9, "3.10", 3.11] + python: [3.9, "3.10", 3.11, 3.12] wordsize: [64] steps: - name: Checkout @@ -58,7 +58,7 @@ jobs: runs-on: macos-latest strategy: matrix: - python: [3.8, 3.9, "3.10", 3.11] + python: [3.9, "3.10", 3.11, 3.12] steps: - name: Checkout uses: actions/checkout@v2 @@ -93,10 +93,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Build sdist shell: bash @@ -164,12 +164,12 @@ jobs: pip install -r python/requirements/CI/tests/requirements.txt python -m pytest -v python - - name: Set up Python 3.8 + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.12 - - name: Run tests (3.8) + - name: Run tests (3.12) run: | python -VV # We install in this odd way to make sure we get both deps and a local kastore diff --git a/.mergify.yml b/.mergify.yml index a31212e..5138201 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,12 +4,12 @@ queue_rules: - "#approved-reviews-by>=1" - "#changes-requested-reviews-by=0" - status-success=Lint - - status-success=Python (3.8, macos-latest) - - status-success=Python (3.11, macos-latest) - - status-success=Python (3.8, ubuntu-latest) - - status-success=Python (3.11, ubuntu-latest) - - status-success=Python (3.8, windows-latest) - - status-success=Python (3.11, windows-latest) + - status-success=Python (3.9, macos-latest) + - status-success=Python (3.12, macos-latest) + - status-success=Python (3.9, ubuntu-latest) + - status-success=Python (3.12, ubuntu-latest) + - status-success=Python (3.9, windows-latest) + - status-success=Python (3.12, windows-latest) - "status-success=ci/circleci: build" pull_request_rules: @@ -21,12 +21,12 @@ pull_request_rules: - base=main - label=AUTOMERGE-REQUESTED - status-success=Lint - - status-success=Python (3.8, macos-latest) - - status-success=Python (3.11, macos-latest) - - status-success=Python (3.8, ubuntu-latest) - - status-success=Python (3.11, ubuntu-latest) - - status-success=Python (3.8, windows-latest) - - status-success=Python (3.11, windows-latest) + - status-success=Python (3.9, macos-latest) + - status-success=Python (3.12, macos-latest) + - status-success=Python (3.9, ubuntu-latest) + - status-success=Python (3.12, ubuntu-latest) + - status-success=Python (3.9, windows-latest) + - status-success=Python (3.12, windows-latest) - "status-success=ci/circleci: build" actions: queue: @@ -41,4 +41,4 @@ pull_request_rules: actions: label: remove: - - AUTOMERGE-REQUESTED \ No newline at end of file + - AUTOMERGE-REQUESTED diff --git a/python/CHANGELOG.rst b/python/CHANGELOG.rst index 0c9fa48..4ffbe48 100644 --- a/python/CHANGELOG.rst +++ b/python/CHANGELOG.rst @@ -1,8 +1,11 @@ -------------------- -[0.3.X] - 202X-XX-XX +[0.3.3] - 2024-06-20 -------------------- -kastore now requires Python 3.8 or later. +Maintenance release: + +- Support for numpy 1.x and 2.x +- Require Python >= 3.9 -------------------- diff --git a/python/pyproject.toml b/python/pyproject.toml index 0d78818..9f6b3b3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ + "numpy>=2", "setuptools>=42", "wheel", - "oldest-supported-numpy" ] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/python/setup.cfg b/python/setup.cfg index 73e2279..1184b51 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -19,10 +19,10 @@ classifiers = Topic :: Scientific/Engineering :: Bio-Informatics License :: OSI Approved :: MIT License Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: 3 :: Only keywords = binary store @@ -35,10 +35,11 @@ platforms = [options] packages = kastore -python_requires = >=3.8 -include_package_data = True +python_requires = >=3.9 +include_package_data = False +# Follow https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-abi-handling install_requires = - numpy>=1.7 + numpy>=1.23.5 humanize [options.entry_points]