Skip to content

Remove version pin from arviz dependency - #27

Merged
drbenvincent merged 1 commit into
mainfrom
remove-arviz-version-pin
Jul 9, 2026
Merged

Remove version pin from arviz dependency#27
drbenvincent merged 1 commit into
mainfrom
remove-arviz-version-pin

Conversation

@drbenvincent

Copy link
Copy Markdown
Owner

What

Remove the >=0.12 floor from the arviz dependency in pyproject.toml:

-    "arviz>=0.12",
+    "arviz",

Why

With no version floor, pip never upgrades an existing arviz install — any version satisfies the constraint. This means installing tidydraws cannot corrupt the user's arviz/numpy/xarray environment, which is the problem #26 was opened to solve.

The corruption mechanism only triggers when the declared floor is above what the user has installed (e.g. arviz>=1.0 would force-upgrade an arviz 0.14 user, pulling numpy>=2 and xarray>=2024.11 via arviz_base). No floor → no upgrade → no corruption.

The entire Bayesian audience already has arviz (PyMC depends on it), so declaring it as a dependency is honest. The no-arviz edge user (xarray + hand-built DataTree, no PyMC) gets arviz pulled on install — which is correct, since the core extraction path uses it.

This resolves the packaging question without lazy-import gymnastics, PEP 621 extras, or version-floor debates. The remaining arviz.extract delegation decision (tracked in #19) is now a pure maintenance tradeoff — shim cost + upstream coupling vs num_samples + ArviZ API consistency — unencumbered by packaging concerns.

Verification

  • uv lock resolves cleanly.
  • Full test suite passes: 92 passed, 21 skipped (backend-compat).
  • No source code changes — the runtime path is unchanged; only the declared constraint changed.

Related

Remove the  floor from the arviz dependency in pyproject.toml.
With no version floor, pip never upgrades an existing arviz install (any
version satisfies the constraint), so installing tidydraws cannot corrupt
the user's arviz/numpy/xarray environment.

This resolves the packaging concern raised in #26 (now closed): the
install-corruption problem only arises when the declared floor is above
what the user has installed. No floor means no upgrade.

The entire Bayesian audience already has arviz (PyMC depends on it), so
declaring arviz as a dependency is honest — the core extraction path
needs it to run. The no-arviz edge user (xarray + hand-built DataTree)
gets arviz pulled, which is expected and correct.

Closes #26. See #19 for the broader extraction-engine discussion.
@drbenvincent
drbenvincent merged commit df56838 into main Jul 9, 2026
8 checks passed
@drbenvincent
drbenvincent deleted the remove-arviz-version-pin branch July 9, 2026 06:08
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.

Remove arviz as a core (install-time) dependency

1 participant