Skip to content

deps: declare fbm as a runtime dependency, not a dev extra - #6

Merged
geekbeast merged 1 commit into
mainfrom
deps/cuda13-numpy2
Aug 20, 2026
Merged

deps: declare fbm as a runtime dependency, not a dev extra#6
geekbeast merged 1 commit into
mainfrom
deps/cuda13-numpy2

Conversation

@geekbeast

Copy link
Copy Markdown
Owner

Follow-up to #5 on the same branch — one last-minute packaging fix found while landing that work.

The problem

fbm was declared only in the dev extra and requirements-dev.txt, but it is imported at package load time:

  • powersig/util/__init__.py:1from .fbm_utils import fractional_brownian_motion
  • powersig/util/fbm_utils.py:3from fbm import FBM

Because __init__.py pulls fbm_utils in eagerly, importing anything under powersig.util executes that from fbm import FBM. That takes down the backends on a plain (non-dev) install:

  • powersig/torch/algorithm.py:6from powersig.util.grid import get_diagonal_range
  • powersig/cupy_backend/algorithm.py:5from powersig.util.grid import get_diagonal_range
  • powersig/jax/utils.py:5import powersig.util.fbm_utils

All of them raise ModuleNotFoundError: No module named 'fbm' — i.e. the torch and cupy backends are unimportable from a released wheel.

The fix

Move fbm>=0.3.0 from the dev extra into [project].dependencies, and add it to requirements.txt. Removed from the dev extra and requirements-dev.txt, where it is now redundant.

fbm is safe to require unconditionally: 0.3.0 is a pure-Python py3-none-any wheel, four source modules, no compiled extensions, and numpy is its only dependency — which this project already requires. Nothing CUDA-specific or platform-specific, so it adds no constraint to the CUDA 13 stack landed in #5.

Verification

Per the commit message: the three imports above succeed, and tests/test_core_jax.py stays 21/21.

The import chain above was also confirmed statically against the branch tree.

CI note: the workflow installs .[jax-cpu,dev]. fbm leaving the dev extra doesn't remove it from that install — it moves into the core dependencies, which pip install . always resolves. So CI keeps getting fbm, and this change is exactly what makes a plain pip install powersig get it too.

powersig/util/__init__.py imports fbm_utils eagerly and fbm_utils does
`from fbm import FBM`, so fbm is needed to import the package at all — but it
was only listed in the dev extra and requirements-dev.txt. On a plain install
powersig.util.grid, powersig.torch.algorithm and powersig.cupy_backend.algorithm
all raise ModuleNotFoundError: No module named 'fbm'. That is the torch and cupy
backends unimportable from a released wheel.

fbm is safe to require: version 0.3.0 is a pure-Python py3-none-any wheel, four
source modules, no compiled extensions, and numpy is its only dependency — which
this project already requires. Nothing CUDA-specific or platform-specific.

Removed from the dev extra and requirements-dev.txt, where it is now redundant.

Verified: the three imports above succeed, and tests/test_core_jax.py stays
21/21.
@geekbeast geekbeast self-assigned this Aug 20, 2026
@geekbeast
geekbeast merged commit 5f92121 into main Aug 20, 2026
1 check passed
@geekbeast
geekbeast deleted the deps/cuda13-numpy2 branch August 20, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant