Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cc4d6ab
refac: introduce consistent convention for linopy operations with sub…
FabianHofmann Feb 9, 2026
d12717b
Merge branch 'master' into harmonize-linopy-operations
FabianHofmann Feb 9, 2026
e408b8e
move scalar addition to add_constant
FabianHofmann Feb 11, 2026
1f339e8
add overwriting logic to add constant
FabianHofmann Feb 11, 2026
c47b90b
add join parameter to control alignment in operations
FabianHofmann Feb 11, 2026
72b0ce1
Add le, ge, eq methods with join parameter for constraints
FabianHofmann Feb 11, 2026
d621e4f
Extract constant alignment logic into _align_constant helper
FabianHofmann Feb 11, 2026
130a5df
update notebooks
FabianHofmann Feb 13, 2026
81204c0
Merge branch 'master' into harmonize-linopy-operations
FabianHofmann Feb 17, 2026
b616074
update release notes
FabianHofmann Feb 17, 2026
bd04a3a
fix types
FabianHofmann Feb 17, 2026
32ddf91
add regression test
FabianHofmann Feb 18, 2026
1b0252b
fix numpy array dim mismatch in constraints and add RHS dim tests
FabianHofmann Feb 18, 2026
087a3cf
Merge branch 'master' into harmonize-linopy-operations
FabianHofmann Feb 19, 2026
594efef
Merge branch 'master' into harmonize-linopy-operations
FabianHofmann Feb 23, 2026
eae8e86
Merge branch 'master' into harmonize-linopy-operations
FabianHofmann Mar 4, 2026
533092d
remove pandas reindexing warning
FabianHofmann Mar 4, 2026
9051f23
Fix mypy errors: type ignores for xr.align/merge, match override sign…
FabianHofmann Mar 4, 2026
648053b
remove outdated warning tests
FabianHofmann Mar 4, 2026
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
22 changes: 1 addition & 21 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,27 +110,6 @@ When modifying the codebase, maintain consistency with these patterns and ensure
* Always create a feature branch for new features or bug fixes.
* Use the github cli (gh) to interact with the Github repository.

### GitHub Claude Code Integration

This repository includes Claude Code GitHub Actions for automated assistance:

1. **Automated PR Reviews** (`claude-code-review.yml`):
- Automatically reviews PRs only when first created (opened)
- Subsequent reviews require manual `@claude` mention
- Focuses on Python best practices, xarray patterns, and optimization correctness
- Can run tests and linting as part of the review
- **Skip initial review by**: Adding `[skip-review]` or `[WIP]` to PR title, or using draft PRs

2. **Manual Claude Assistance** (`claude.yml`):
- Trigger by mentioning `@claude` in any:
- Issue comments
- Pull request comments
- Pull request reviews
- New issue body or title
- Claude can help with bug fixes, feature implementation, code explanations, etc.

**Note**: Both workflows require the `ANTHROPIC_API_KEY` secret to be configured in the repository settings.


## Development Guidelines

Expand All @@ -140,3 +119,4 @@ This repository includes Claude Code GitHub Actions for automated assistance:
4. Use type hints and mypy for type checking.
5. Always write tests into the `test` directory, following the naming convention `test_*.py`.
6. Always write temporary and non git-tracked code in the `dev-scripts` directory.
7. In test scripts use linopy assertions from the testing.py module where useful (assert_linequal, assert_varequal, etc.)
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ This package is published under MIT license.
creating-variables
creating-expressions
creating-constraints
coordinate-alignment
sos-constraints
piecewise-linear-constraints
piecewise-linear-constraints-tutorial
Expand Down
6 changes: 6 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Release Notes
Upcoming Version
----------------

* Harmonize coordinate alignment for operations with subset/superset objects:
- Multiplication and division fill missing coords with 0 (variable doesn't participate)
- Addition and subtraction of constants fill missing coords with 0 (identity element) and pin result to LHS coords
- Comparison operators (``==``, ``<=``, ``>=``) fill missing RHS coords with NaN (no constraint created)
- Fixes crash on ``subset + var`` / ``subset + expr`` reverse addition
- Fixes superset DataArrays expanding result coords beyond the variable's coordinate space
* Add ``add_piecewise_constraints()`` for piecewise linear constraints with SOS2 and incremental (pure LP) formulations.
* Add ``add_disjunctive_piecewise_constraints()`` for disconnected piecewise linear segments (e.g. forbidden operating zones).
* Add ``linopy.breakpoints()`` factory for convenient breakpoint construction from lists, dicts, or keyword arguments. Includes ``breakpoints.segments()`` for disjunctive formulations.
Expand Down
Loading