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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@ jobs:
run: uv run pytest -q

# A passing suite and a working installed entrypoint are not the same
# thing, and that gap is where a broken `bin` hides.
- name: Installed entrypoint
# thing, and that gap is where a broken `bin` hides. It is not enough to
# run --version: 0.5.1 shipped an entrypoint that ran and reported the
# wrong number, so assert the reported version is the packaged one.
- name: Installed entrypoint reports the packaged version
run: |
uv tool install --editable .
samplerdisc --version
got="$(samplerdisc --version)"
want="$(uv version --short)"
if [ "$got" != "$want" ]; then
echo "::error::samplerdisc --version says '$got', packaged version is '$want'"
exit 1
fi
echo "entrypoint reports $got"

# ADR-0008: no disc images or audio, ever. Enforced, not remembered.
- name: No media in tracked files
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Notable changes to `samplerdisc`. Format-level findings live in [docs/formats/](docs/formats/); decisions and their rejected alternatives live in [docs/adr/](docs/adr/). This file records what changed for someone using the tool.

## 0.5.2 — 2026-09-05

### Fixed

- **`samplerdisc --version` reports the real version again.** The 0.5.1 release shipped an entrypoint that printed `0.5.0`: the version lived in two places — `pyproject.toml` and a hardcoded `__version__` literal — and bumping the package moved only the first. `__version__` is now read once from the installed distribution's metadata, so there is a single source of truth that cannot drift. The install-time CI check now asserts the entrypoint's reported version equals the packaged version rather than only that it runs, and the unit test asserts the same invariant instead of pinning a literal. If you installed 0.5.1, upgrade — the package was otherwise identical, only its self-reported version was wrong. ([src/samplerdisc/__init__.py](src/samplerdisc/__init__.py))

## 0.5.1 — 2026-09-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "samplerdisc"
version = "0.5.1"
version = "0.5.2"
description = "Convert vintage sampler CD-ROM images (AKAI, E-mu, Roland) to uncompressed WAV"
readme = "README.md"
license = "MIT"
Expand Down
10 changes: 9 additions & 1 deletion src/samplerdisc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""Convert vintage sampler CD-ROM images to uncompressed WAV."""

__version__ = "0.5.0"
from importlib.metadata import PackageNotFoundError, version

# One source of truth: the packaged version in pyproject.toml, read back from
# the installed distribution's metadata. A hardcoded literal here drifts the
# moment the package version bumps — 0.5.1 shipped reporting 0.5.0 that way.
try:
__version__ = version("samplerdisc")
except PackageNotFoundError: # a source tree with no installed distribution
__version__ = "0.0.0+unknown"
10 changes: 9 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@


def test_version_matches_package():
assert __version__ == "0.5.0"
"""The reported version is the installed metadata, not a hardcoded literal.

A literal here mirroring a literal in the source is what let 0.5.1 ship
reporting 0.5.0: both sat still while pyproject moved. Assert the real
invariant instead — the runtime string is the packaged version.
"""
from importlib.metadata import version

assert __version__ == version("samplerdisc")


def test_parser_exposes_version_flag():
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading