Skip to content

Commit c3f1d32

Browse files
authored
Python 3.12 compatibility (#77)
* Add Python 3.12 to test-job matrix * restructure project build * fix: set requires-Python>=3.8 * use python build instead of setup.py in workflows * run pre-commit * add setuptools to deps
1 parent 2731edc commit c3f1d32

File tree

7 files changed

+48
-56
lines changed

7 files changed

+48
-56
lines changed

.github/workflows/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.8", "3.10", "3.11"]
13+
python-version: ["3.8", "3.10", "3.11", "3.12"]
1414
pymc-version: ["without", "'pymc>=5.0.0'"]
1515
steps:
1616
- uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
4343
file: ./coverage.xml
4444
- name: Test Wheel build, install and import
4545
run: |
46-
python setup.py bdist_wheel
46+
python -m build
4747
twine check dist/*
4848
cd dist
4949
pip install bletl*.whl

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
pytest --cov=./bletl --cov-report xml --cov-report term-missing tests/
2727
- name: Build package
2828
run: |
29-
python setup.py sdist bdist_wheel
29+
python -m build
3030
- name: Check version number match
3131
run: |
3232
echo "GITHUB_REF: ${GITHUB_REF}"

bletl/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
BioLector files, applying calibration transformations and representing them in a standardized
1919
format.
2020
"""
21+
import importlib.metadata
22+
2123
from . import utils
2224
from .core import get_parser, parse, parsers
2325
from .heuristics import find_do_peak
@@ -36,4 +38,4 @@
3638
NoMeasurementData,
3739
)
3840

39-
__version__ = "1.5.1"
41+
__version__ = importlib.metadata.version(__package__ or __name__)

pyproject.toml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
11
# inspired by https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
22

33
[build-system]
4-
requires = ["setuptools", "wheel"]
4+
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

7+
[project]
8+
name = "bletl"
9+
version = "1.5.2"
10+
description = "Package for parsing and transforming BioLector raw data."
11+
readme = "README.md"
12+
requires-python = ">=3.8"
13+
license = {text = "GNU Affero General Public License v3"}
14+
authors = [
15+
{name = "Michael Osthege", email = "[email protected]"},
16+
]
17+
classifiers = [
18+
"Programming Language :: Python",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Intended Audience :: Science/Research",
25+
"License :: OSI Approved :: GNU Affero General Public License v3",
26+
]
27+
dependencies = [
28+
"csaps>=0.11",
29+
"fastprogress",
30+
"joblib",
31+
"numpy",
32+
"pandas",
33+
"scipy",
34+
"tsfresh",
35+
"setuptools",
36+
]
37+
38+
[project.urls]
39+
Homepage = "https://github.com/jubiotech/bletl"
40+
Documentation = "https://bletl.readthedocs.io/en/latest/"
41+
Download = "https://pypi.org/project/bletl/"
42+
43+
[tool.setuptools]
44+
package-dir = {"bletl" = "bletl"}
45+
746
[tool.black]
847
line-length = 110
948

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pandas>=2.0.0
55
pytest
66
pytest-cov
77
twine
8-
wheel
8+
build

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ numpy
55
pandas
66
scipy
77
tsfresh
8+
setuptools

setup.py

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

0 commit comments

Comments
 (0)