Skip to content

Commit 483528a

Browse files
authored
Merge branch 'scipopt:master' into ExprLike
2 parents c7f6715 + 1905b5e commit 483528a

34 files changed

Lines changed: 1097 additions & 114 deletions

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@
22

33
## Unreleased
44
### Added
5-
- `Expr` and `GenExpr` support NumPy unary functions (`np.sin`, `np.cos`, `np.sqrt`, `np.exp`, `np.log`, `np.absolute`)
5+
### Fixed
6+
### Changed
7+
### Removed
8+
9+
## 6.2.0 - 2026.04.23
10+
### Added
11+
- `Expr` and `GenExpr` support NumPy unary functions (`np.sin`, `np.cos`, `np.sqrt`, `np.exp`, `np.log`, `np.absolute`, `np.negative`)
12+
- `Expr` and `GenExpr` support NumPy binary functions (`np.add`, `np.subtract`, `np.multiply`, `np.divide`, `np.true_divide`, `np.power`, `np.less_equal`, `np.greater_equal`, `np.equal`)
613
- Added `getBase()` and `setBase()` methods to `LP` class for getting/setting basis status
714
- Added `getMemUsed()`, `getMemTotal()`, and `getMemExternEstim()` methods
15+
- Added `isReoptEnabled()` and raising error if not enabled upon calling `reoptSolve()`
816
### Fixed
917
- Removed `Py_INCREF`/`Py_DECREF` on `Model` in `catchEvent`/`dropEvent` that caused memory leak for imbalanced usage
1018
- Used `getIndex()` instead of `ptr()` for sorting nonlinear expression terms to avoid nondeterministic behavior
1119
- Fixed stubtest failures with mypy 1.20 by marking dunder method parameters as positional-only
1220
- Return `MatrixGenExpr` in `buildGenExprObj` instead of `MatrixExpr`
21+
- Plugins now hold strong references to their `Model` instead of `weakref.proxy`, fixing `ReferenceError` during cleanup callbacks (#1193)
1322
### Changed
1423
- Speed up `constant * Expr` via C-level API
1524
- Speed up `Term.__eq__` via the C-level API

INSTALL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Requirements
22
============
33

4-
From version 5.0.0 SCIP is automatically shipped when using PyPI for the following systems:
4+
From version 5.0.0, SCIP is automatically shipped when using PyPI for the following systems:
55

66
- CPython 3.8 / 3.9 / 3.10 / 3.11 / 3.12 for Linux (manylinux2014)
77
- CPython 3.8 / 3.9 / 3.10 / 3.11 / 3.12 for MacOS for x86_64 / ARM64
@@ -16,7 +16,7 @@ When installing from source or using PyPI with a python version and operating sy
1616
PySCIPOpt requires a working installation of the [SCIP Optimization
1717
Suite](https://www.scipopt.org/). Please, make sure that your SCIP installation works!
1818

19-
**Note that the latest PySCIPOpt version is usually only compatible with the latest major release of the SCIP Optimization Suite. See the table on the README.md page for details.**
19+
**Note that the latest PySCIPOpt version is usually only compatible with the latest major release of the SCIP Optimization Suite. See the [online documentation](https://pyscipopt.readthedocs.io/en/latest/build.html#building-from-source) for details.**
2020

2121
If installing SCIP from source or using PyPI with a python and operating system that is not mentioned above, and SCIP is not installed in the global path,
2222
you need to specify the install location using the environment variable

RELEASE.md

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,72 @@
11
# Release Checklist
2-
The following are the steps to follow to make a new PySCIPOpt release. They should mostly be done in order.
3-
- [ ] Check if [scipoptsuite-deploy](https://github.com/scipopt/scipoptsuite-deploy) needs a new release, if a new SCIP version is released for example, or new dependencies (change symmetry dependency, add support for papilo/ parallelization.. etc). And Update release links in `pyproject.toml`
4-
- [ ] Check if the table in the [documentation](https://pyscipopt.readthedocs.io/en/latest/build.html#building-from-source) needs to be updated.
5-
- [ ] Update version number according to semantic versioning [rules](https://semver.org/) in `src/pyscipopt/_version.py` and `setup.py`
6-
- [ ] Update `CHANGELOG.md`; Change the `Unreleased` to the new version number and add an empty unreleased section.
7-
- [ ] Create a release candidate on test-pypi by running the workflow “Build wheels” in Actions->build wheels, with these parameters `upload:true, test-pypi:true` 
8-
- [ ] If the pipeline passes, test the released pip package on test-pypi by running and checking that it works
2+
3+
## Upgrading SCIP
4+
5+
Run `./upgrade_scip.sh` from the `master` branch (use `--dry-run` first to preview without side effects). The script will:
6+
1. Prompt for SCIP, SoPlex, GCG, and IPOPT versions
7+
2. Build new binaries via [scipoptsuite-deploy](https://github.com/scipopt/scipoptsuite-deploy) (skipped if a matching release already exists)
8+
3. Create a branch, update `pyproject.toml`, and open a PR
9+
10+
On the PR:
11+
- [ ] Fix any API incompatibilities
12+
- [ ] Get CI green
13+
- [ ] Update the [compatibility table](https://pyscipopt.readthedocs.io/en/latest/build.html#building-from-source) if needed
14+
- [ ] Merge into `master`
15+
16+
## Releasing PySCIPOpt
17+
18+
Releases run in two phases from `master`, driven by `./release.sh`. The tag and master push only happen in phase 2, so an aborted release leaves no semantic public trace — just a deletable `release-candidate-vX.Y.Z` branch.
19+
20+
Use `--dry-run` with any command to preview without side effects.
21+
22+
### Phase 1 — start
23+
924
```bash
10-
pip install -i https://test.pypi.org/simple/ PySCIPOpt
25+
./release.sh
1126
```
12-
- [ ] If it works, release on pypi.org with running the same workflow but with `test-pypi:false`.
13-
- [ ] Then create a tag with the new version (from the master branch)
27+
28+
Prompts for the version bump (patch/minor/major), updates `_version.py`, `setup.py`, and `CHANGELOG.md`, commits **locally**, pushes the commit to `release-candidate-vX.Y.Z` on origin, and triggers the build-wheels workflow on that branch (uploads to test-pypi). **Master is not pushed, no tag is created.** The script exits as soon as the workflow is dispatched.
29+
30+
To skip the bump prompt (e.g., when test-pypi has already burnt the default next version and you need to jump ahead):
31+
1432
```bash
15-
git tag vX.X.X
16-
git push origin vX.X.X
33+
./release.sh --version=X.Y.Z
1734
```
18-
- [ ] Then make a github [release](https://github.com/scipopt/PySCIPOpt/releases/new) from this new tag.
19-
- [ ] Update the documentation: from readthedocs.io -> Builds -> Build version (latest and stable)
35+
36+
### Manual verification
37+
38+
Once the release-candidate workflow finishes, install from test-pypi and smoke-test:
39+
40+
```bash
41+
pip install -i https://test.pypi.org/simple/ PySCIPOpt==X.Y.Z
42+
```
43+
44+
### Phase 2 — finalize or roll back
45+
46+
If the smoke test **passes**:
47+
48+
```bash
49+
./release.sh --finalize
50+
```
51+
52+
Checks the release-candidate workflow succeeded, then tags `vX.Y.Z`, pushes master, and deletes the release-candidate branch.
53+
54+
If the smoke test **fails** (or you change your mind):
55+
56+
```bash
57+
./release.sh --rollback
58+
```
59+
60+
Deletes the release-candidate branch and resets the local release commit. test-pypi has already burnt the uploaded version string, so the next attempt must use `--version=` to pick a different one.
61+
62+
### After finalize
63+
64+
- [ ] Release to production pypi:
65+
```bash
66+
gh workflow run build_wheels.yml --repo scipopt/PySCIPOpt --ref vX.Y.Z -f upload_to_pypi=true -f test_pypi=false
67+
```
68+
- [ ] Create a GitHub release:
69+
```bash
70+
gh release create vX.Y.Z --repo scipopt/PySCIPOpt --title vX.Y.Z --generate-notes
71+
```
72+
- [ ] Update readthedocs: Builds -> Build version (latest and stable)

docs/build.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ To download SCIP please either use the pre-built SCIP Optimization Suite availab
2121

2222
* - SCIP
2323
- PySCIPOpt
24+
* - 10.0.2
25+
- 6.2
2426
* - 10.0.1
2527
- 6.1
2628
* - 10.0.0

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ AARCH=$(uname -m)
4949
echo "------"
5050
echo $AARCH
5151
if [[ $AARCH == "aarch64" ]]; then
52-
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.11.0/libscip-linux-arm.zip -O scip.zip
52+
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-linux-arm.zip -O scip.zip
5353
else
54-
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.11.0/libscip-linux.zip -O scip.zip
54+
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-linux.zip -O scip.zip
5555
fi
5656
unzip scip.zip
5757
mv scip_install scip
@@ -65,10 +65,10 @@ before-all = '''
6565
#!/bin/bash
6666
brew install wget zlib gcc
6767
if [[ $CIBW_ARCHS == *"arm"* ]]; then
68-
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.11.0/libscip-macos-arm.zip -O scip.zip
68+
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-macos-arm.zip -O scip.zip
6969
export MACOSX_DEPLOYMENT_TARGET=14.0
7070
else
71-
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.11.0/libscip-macos-intel.zip -O scip.zip
71+
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-macos-intel.zip -O scip.zip
7272
export MACOSX_DEPLOYMENT_TARGET=14.0
7373
fi
7474
unzip scip.zip
@@ -94,7 +94,7 @@ repair-wheel-command = '''
9494
skip="pp* cp36* cp37*"
9595
before-all = [
9696
"choco install 7zip wget",
97-
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.11.0/libscip-windows.zip -O scip.zip",
97+
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-windows.zip -O scip.zip",
9898
"\"C:\\Program Files\\7-Zip\\7z.exe\" x \"scip.zip\" -o\"scip-test\"",
9999
"mv .\\scip-test\\scip_install .\\test",
100100
"mv .\\test .\\scip"

0 commit comments

Comments
 (0)