Skip to content

fix: support tsam_xarray 0.6.5 by using cluster_counts - #761

Merged
FBumann merged 1 commit into
mainfrom
fix/tsam-xarray-0.6.5-main
Jul 27, 2026
Merged

fix: support tsam_xarray 0.6.5 by using cluster_counts#761
FBumann merged 1 commit into
mainfrom
fix/tsam-xarray-0.6.5-main

Conversation

@FBumann

@FBumann FBumann commented Jul 27, 2026

Copy link
Copy Markdown
Member

Problem

tsam_xarray 0.6.5 renamed AggregationResult.cluster_weights to cluster_counts, keeping the old name as a deprecated property. The full extra allows >= 0.6.1, so a fresh install resolves to 0.6.5 and every cluster() call emits a FutureWarning — and fails outright under -W error, which is how the test suite runs.

tests/test_clustering on main with 0.6.5 installed: 254 failed, 32 passed. With this change: 291 passed.

cluster_counts does not exist before 0.6.5, so the floor has to move with the rename rather than merely allowing the new version — the two changes are coupled and cannot land separately.

Why this isn't already in 8.0.0

#755 carried this exact change. While unblocking its lint I retargeted its base onto ci/pin-ruff-version; that branch merged into main first, so #755 then merged into an already-merged base. GitHub reports it as merged, but the change never reached main — 8.0.0 shipped without it. This re-lands it directly on main.

Change

  • transform_accessor.pycluster_weightscluster_counts
  • pyproject.tomlfull: >= 0.6.1>= 0.6.5; dev: ==0.6.1==0.6.5

Release

Typed fix:, so release-please will cut 8.0.1 from it (release-type: simple, no custom bump rules in .release-please-config.json).

🤖 Generated with Claude Code

tsam_xarray 0.6.5 renamed AggregationResult.cluster_weights to
cluster_counts, keeping the old name as a deprecated property. The `full`
extra allows >= 0.6.1, so a fresh install resolves to 0.6.5 and every
cluster() call emits a FutureWarning -- and fails outright under -W error,
which is how the test suite runs: 254 of 286 clustering tests failed on
0.6.5 before this change.

cluster_counts does not exist before 0.6.5, so the floor moves with the
rename rather than merely allowing the new version.

This shipped in neither 8.0.0 nor its predecessor: #755 carried the same
change but was retargeted onto an intermediate branch that merged into main
first, so it landed on that branch instead of main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@FBumann, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d695993-48ed-43d4-924d-50cb47584563

📥 Commits

Reviewing files that changed from the base of the PR and between da7bfaf and 73cb861.

📒 Files selected for processing (2)
  • flixopt/transform_accessor.py
  • pyproject.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tsam-xarray-0.6.5-main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@FBumann
FBumann enabled auto-merge (squash) July 27, 2026 16:28
@FBumann
FBumann merged commit 21efda9 into main Jul 27, 2026
12 checks passed
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