Skip to content

Commit dbd9a11

Browse files
committed
Repo updates
1 parent 6153fa8 commit dbd9a11

File tree

9 files changed

+81
-83
lines changed

9 files changed

+81
-83
lines changed

.circleci/config.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ orbs:
66
jobs:
77
build:
88
docker:
9-
- image: cimg/python:3.9
9+
- image: cimg/python:3.10
1010
steps:
1111
- checkout
1212
- run:
@@ -16,7 +16,10 @@ jobs:
1616
sudo apt-get install -y ninja-build libcunit1-dev valgrind clang doxygen python3-pip
1717
# Install meson as root so we can install to the system below.
1818
sudo pip install meson
19-
pip install --user -r python/requirements/development.txt
19+
# Install uv
20+
pip install uv
21+
# Install test dependencies from pyproject.toml using uv
22+
cd python && uv pip install --system -r pyproject.toml --extra test
2023
echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV
2124
- run:
2225
name: Compile C
@@ -56,6 +59,13 @@ jobs:
5659
cd python
5760
CFLAGS="-Wall -Wextra -Werror -Wno-unused-parameter -Wno-cast-function-type" \
5861
python setup.py build_ext --inplace
62+
63+
- run:
64+
name: Build docs
65+
command: |
66+
pip install --user -r docs/rtd_requirements.txt
67+
cd docs && make
68+
5969
- run:
6070
name: Run Python tests
6171
command: |
@@ -114,8 +124,3 @@ jobs:
114124
command: |
115125
g++ c/cpp_tests.cpp -o cpp_tests -lkastore
116126
./cpp_tests
117-
118-
- run:
119-
name: Build docs
120-
command: |
121-
cd docs && make

.github/workflows/tests.yml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,15 @@ on:
88
jobs:
99
pre-commit:
1010
name: Lint
11-
runs-on: ubuntu-24.04
12-
steps:
13-
- name: Cancel Previous Runs
14-
uses: styfle/[email protected]
15-
with:
16-
access_token: ${{ github.token }}
17-
- uses: actions/[email protected]
18-
- uses: actions/[email protected]
19-
- name: install clang-format
20-
run: |
21-
pip install clang-format==6.0.1
22-
- uses: pre-commit/[email protected]
11+
uses: tskit-dev/.github/.github/workflows/lint.yml@v2
2312

2413

2514
test:
2615
name: Python
2716
runs-on: ${{ matrix.os }}
2817
strategy:
2918
matrix:
30-
python: [ 3.9, 3.12 ]
19+
python: [ "3.10", 3.13 ]
3120
os: [ macos-latest, ubuntu-24.04, windows-latest ]
3221
defaults:
3322
run:
@@ -41,25 +30,31 @@ jobs:
4130
- name: Checkout
4231
uses: actions/[email protected]
4332

44-
- uses: actions/[email protected]
33+
- name: Install uv and set the python version
34+
uses: astral-sh/setup-uv@v6
4535
with:
46-
python-version: ${{matrix.python}}
47-
36+
python-version: ${{ matrix.python }}
37+
version: "0.8.15"
38+
4839
- name: Install pip deps
49-
run: pip install -r python/requirements/CI/tests/requirements.txt
40+
working-directory: ./python
41+
run: |
42+
uv venv
43+
uv pip install -r pyproject.toml --extra test
5044
5145
- name: Build module
52-
working-directory: python
46+
working-directory: ./python
5347
run: |
54-
python -m build
55-
python -m pip install dist/*.whl
48+
uv run --no-sync python setup.py build_ext --inplace
5649
5750
- name: Run tests
51+
working-directory: ./python
5852
run: |
59-
python -m pytest python/tests
53+
uv run --no-sync pytest tests
6054
6155
- name: Run tests (numpy < 2)
56+
working-directory: ./python
6257
run: |
63-
pip install setuptools
64-
pip install "numpy<2"
65-
python -m pytest python/tests
58+
uv pip install setuptools
59+
uv pip install "numpy<2"
60+
uv run --no-sync pytest tests

.github/workflows/wheels.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: windows-latest
1616
strategy:
1717
matrix:
18-
python: [3.9, "3.10", 3.11, 3.12]
18+
python: ["3.10", 3.11, 3.12, 3.13]
1919
wordsize: [64]
2020
steps:
2121
- name: Checkout
@@ -45,9 +45,7 @@ jobs:
4545
${PYTHON} -m pip uninstall -y kastore
4646
${PYTHON} -m pip install -v kastore --only-binary kastore -f python/dist/ --no-index
4747
${PYTHON} -c "import kastore"
48-
${PYTHON} -m pip install -r python/requirements/CI/tests/requirements.txt
49-
rm -rf python/kastore python/*.pyd
50-
${PYTHON} -m pytest -v python
48+
5149
- name: Upload Wheels
5250
uses: actions/[email protected]
5351
with:
@@ -58,7 +56,7 @@ jobs:
5856
runs-on: macos-14
5957
strategy:
6058
matrix:
61-
python: [3.9, "3.10", 3.11, 3.12]
59+
python: ["3.10", 3.11, 3.12, 3.13]
6260
steps:
6361
- name: Checkout
6462
uses: actions/[email protected]
@@ -78,9 +76,7 @@ jobs:
7876
pip uninstall -y kastore
7977
pip install -v kastore --only-binary kastore -f python/dist/ --no-index
8078
python -c "import kastore"
81-
pip install -r python/requirements/CI/tests/requirements.txt
82-
rm -rf python/kastore python/*.so
83-
python -m pytest -v python
79+
8480
- name: Upload Wheels
8581
uses: actions/[email protected]
8682
with:
@@ -94,10 +90,10 @@ jobs:
9490
- name: Checkout
9591
uses: actions/[email protected]
9692

97-
- name: Set up Python 3.9
93+
- name: Set up Python 3.10
9894
uses: actions/[email protected]
9995
with:
100-
python-version: 3.9
96+
python-version: "3.10"
10197

10298
- name: Build sdist
10399
shell: bash
@@ -130,13 +126,11 @@ jobs:
130126
pip uninstall -y kastore
131127
pip install -v kastore --only-binary kastore -f python/dist/wheelhouse --no-index
132128
python -c "import kastore"
133-
pip install -r python/requirements/CI/tests/requirements.txt
134-
python -m pytest -v python
135129
136-
- name: Set up Python 3.12
130+
- name: Set up Python 3.11
137131
uses: actions/[email protected]
138132
with:
139-
python-version: 3.12
133+
python-version: 3.11
140134

141135
- name: Run tests (3.11)
142136
run: |
@@ -146,8 +140,6 @@ jobs:
146140
pip uninstall -y kastore
147141
pip install -v kastore --only-binary kastore -f python/dist/wheelhouse --no-index
148142
python -c "import kastore"
149-
pip install -r python/requirements/CI/tests/requirements.txt
150-
python -m pytest -v python
151143
152144
- name: Set up Python 3.10
153145
uses: actions/[email protected]
@@ -162,24 +154,20 @@ jobs:
162154
pip uninstall -y kastore
163155
pip install -v kastore --only-binary kastore -f python/dist/wheelhouse --no-index
164156
python -c "import kastore"
165-
pip install -r python/requirements/CI/tests/requirements.txt
166-
python -m pytest -v python
167157
168-
- name: Set up Python 3.9
158+
- name: Set up Python 3.13
169159
uses: actions/[email protected]
170160
with:
171-
python-version: 3.9
161+
python-version: 3.13
172162

173-
- name: Run tests (3.9)
163+
- name: Run tests (3.13)
174164
run: |
175165
python -VV
176166
# We install in this odd way to make sure we get both deps and a local kastore
177167
pip install kastore --only-binary kastore -f python/dist/wheelhouse
178168
pip uninstall -y kastore
179169
pip install -v kastore --only-binary kastore -f python/dist/wheelhouse --no-index
180170
python -c "import kastore"
181-
pip install -r python/requirements/CI/tests/requirements.txt
182-
python -m pytest -v python
183171
184172
- name: Upload Wheels
185173
uses: actions/[email protected]

docker/shared.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PYTHON_VERSIONS=(
2+
cp313-cp313
23
cp312-cp312
34
cp311-cp311
45
cp310-cp310
5-
cp39-cp39
66
)

docs/rtd_requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
numpy
2-
breathe==4.14.2 #Pinned as next version needs sphinx 3 (see below)
3-
sphinx==2.4.4 #Pinned as breathe v3 compatibility is rough for now.
2+
breathe==4.35.0
3+
sphinx==5.3.0
4+
sphinx-rtd-theme==2.0.0
45
sphinx-issues
56
sphinx-argparse

python/CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
--------------------
2+
[0.3.4] - 2025-09-11
3+
--------------------
4+
5+
Maintenance release:
6+
7+
- Require Python >= 3.10, support to 3.13
8+
19
--------------------
210
[0.3.3] - 2024-06-25
311
--------------------

python/pyproject.toml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,43 @@ classifiers = [
1717
"Topic :: Scientific/Engineering :: Bio-Informatics",
1818
"License :: OSI Approved :: MIT License",
1919
"Programming Language :: Python :: 3",
20-
"Programming Language :: Python :: 3.9",
2120
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2424
"Programming Language :: Python :: 3 :: Only",
2525
]
2626
keywords = ["binary store", "numerical", "arrays"]
2727
dependencies = [
2828
"numpy>=1.23.5",
2929
"humanize",
3030
]
31-
requires-python = ">=3.9"
31+
requires-python = ">=3.10"
32+
33+
[project.optional-dependencies]
34+
test = [
35+
"attrs==25.3.0",
36+
"build==1.3.0",
37+
"hypothesis==6.138.15",
38+
"pytest==8.4.2",
39+
"pytest-cov==7.0.0",
40+
"mock==5.2.0",
41+
"setuptools==80.9.0",
42+
]
43+
dev = [
44+
"attrs",
45+
"breathe==4.35.0",
46+
"coverage",
47+
"flake8",
48+
"hypothesis",
49+
"pytest",
50+
"pytest-cov",
51+
"mock",
52+
"pre-commit",
53+
"Sphinx==5.3.0",
54+
"sphinx_rtd_theme",
55+
"sphinx-issues",
56+
]
3257

3358
[project.urls]
3459
Homepage = "https://github.com/tskit-dev/kastore"

python/requirements/CI/tests/requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

python/requirements/development.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)