Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ uv add <somepackage> --optional <somegroup>

## Creating Distributions

1. Bump the version in [version.py](./wfdb/version.py).
1. Bump the version in [pyproject.toml](./pyproject.toml).

2. Add a summary of the changes to [the changelog](https://github.com/MIT-LCP/wfdb-python/blob/main/docs/changes.rst). You may also need to update [the documentation](https://github.com/MIT-LCP/wfdb-python/tree/main/docs). For example, if function arguments have been updated, this change will need to be captured. Open a pull request to merge these changes to the main branch.

Expand Down
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Unreleased
**Raise minimum versions of dependencies**
The minimum versions of ``soundfile`` (0.12.1), ``matplotlib`` (3.8.0) and ``requests`` (2.31.0) have been raised. The minimum versions of the other dependencies are unchanged.

**Build with uv_build**
The package is now built with ``uv_build`` instead of ``hatchling``. The version number is specified in ``pyproject.toml`` only, and ``wfdb.__version__`` is read from the installed package metadata (it is ``"unknown"`` if the package is run from a source tree without being installed).

Version 4.3.1 (Feb 2026)
-----------------------------

Expand Down
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#
import os
import sys
import tomllib

sys.path.insert(0, os.path.abspath(".."))

Expand Down Expand Up @@ -66,8 +67,8 @@ def __getattr__(cls, name):
copyright = "2018, MIT Lab for Computational Physiology"
author = "MIT Lab for Computational Physiology"

with open("../wfdb/version.py") as f:
__version__ = f.read().split()[-1].strip("'")
with open("../pyproject.toml", "rb") as f:
__version__ = tomllib.load(f)["project"]["version"]
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand Down
21 changes: 7 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["uv_build >= 0.13.0, < 0.14"]
build-backend = "uv_build"

[project]
name = "wfdb"
version = "4.3.1"
description = "The WFDB Python package: tools for reading, writing, and processing physiologic signals and annotations."
authors = [{name = "The Laboratory for Computational Physiology", email = "[email protected]"}]
license = {text = "MIT License"}
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">= 3.11"
dependencies = [
Expand All @@ -19,7 +21,6 @@ dependencies = [
"fsspec >= 2023.10.0",
"aiohttp >= 3.10.11",
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
Expand All @@ -39,13 +40,5 @@ documentation = "https://wfdb.readthedocs.io/"
line-length = 80
target-version = ["py311"]

[tool.hatch.build.targets.sdist]
exclude = [
"/tests",
"/sample-data",
"/demo-img.png",
"/demo.ipynb",
]

[tool.hatch.version]
path = "wfdb/version.py"
[tool.uv.build-backend]
module-root = ""
8 changes: 7 additions & 1 deletion wfdb/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
__version__ = "4.3.1"
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("wfdb")
except PackageNotFoundError:
# Running from a source tree that has not been installed
__version__ = "unknown"
Loading