Skip to content

Commit

Permalink
Test hictkpy against Python 3.13 (#99)
Browse files Browse the repository at this point in the history
* Bump Python version used by CI
* Test hictkpy with Python 3.13
  • Loading branch information
robomics authored Oct 22, 2024
1 parent 876e526 commit 628d8cf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-conan-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:
- uses: actions/setup-python@v5
if: steps.cache-conan.outputs.cache-hit != 'true'
with:
python-version: "3.12"
python-version: "3.13"

- name: Update build deps
if: steps.cache-conan.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -366,7 +366,7 @@ jobs:
- uses: actions/setup-python@v5
if: steps.cache-conan.outputs.cache-hit != 'true'
with:
python-version: "3.12"
python-version: "3.13"

- name: Update build deps
if: steps.cache-conan.outputs.cache-hit != 'true'
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-2019, macos-latest, ubuntu-latest]
python-version: ["3.9", "3.12"]
python-version: ["3.9", "3.12", "3.13"]

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -83,6 +83,11 @@ jobs:
echo 'CXX=clang++' >> $GITHUB_ENV
- name: Build and install
if: matrix.python-version == '3.13'
run: pip install --verbose '.[numpy,scipy,test]'

- name: Build and install
if: matrix.python-version != '3.13'
run: pip install --verbose '.[all,test]'

- name: Save Conan cache
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install cibuildwheel
run: pip install 'cibuildwheel>=2.21'
Expand Down Expand Up @@ -232,6 +232,7 @@ jobs:
with:
only: ${{ matrix.wheel-config }}
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT_LINUX: >
PIP_VERBOSE=1
HICTK_CI=1
Expand Down
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ authors = [
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: MIT License"
]
Expand Down Expand Up @@ -52,7 +56,6 @@ optional-dependencies.all = [
]

optional-dependencies.test = [
"hictkpy[all]",
"pytest>=8.0",
]

Expand Down Expand Up @@ -104,16 +107,15 @@ testpaths = [
]

[tool.cibuildwheel]
skip = ["cp313*", "*musllinux*", "pp*"]
skip = ["cp313*", "cp314*", "*musllinux*", "pp*"]
test-command = "python -m pytest {project}/test"
test-extras = ["test"]
test-skip = ["cp313*", "*universal2", "pp*"]
test-extras = ["test", "numpy", "pandas", "pyarrow", "scipy"]
test-skip = ["cp313*", "cp314*", "*universal2", "pp*"]

# Setuptools bug causes collision between pypy and cpython artifacts
before-build = [
"rm -rf '{project}/build'",
]
environment = { PIP_VERBOSE=1 }

# We are using static linking, thus repairing wheels is not necessary.
repair-wheel-command = ""
Expand Down
5 changes: 4 additions & 1 deletion test/test_bin_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ def test_getters(self):
with pytest.raises(Exception):
bins.get_id("abc", 100)

@pytest.mark.skipif(not numpy_avail(), reason="numpy is not available")
@pytest.mark.skipif(
not numpy_avail() or not pandas_avail() or not pyarrow_avail(),
reason="numpy, pandas, or pyarrow are not available",
)
def test_vectorized_getters(self):
import numpy as np

Expand Down

0 comments on commit 628d8cf

Please sign in to comment.