Skip to content

Commit d9bd0d9

Browse files
committed
complete merge
2 parents 8f81cf0 + 4fafd0f commit d9bd0d9

File tree

87 files changed

+4001
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+4001
-372
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
os: [ ubuntu-22.04, macos-13, windows-2022 ]
32-
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
31+
os: [ ubuntu-22.04, macos-14, windows-2022 ]
32+
python-version: [ "3.11", "3.12", "3.13" ]
3333
include:
3434
# These are intended to just add their extra parameter to existing matrix combinations;
3535
# see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
3636
- os: ubuntu-22.04
3737
python-version: 3.12
3838
openmp: "True"
3939
single_action_config: false
40-
- os: macos-13
40+
- os: macos-14
4141
python-version: 3.12
4242
single_action_config: true
4343

@@ -49,17 +49,18 @@ jobs:
4949
MOSEK_CI_BASE64: ${{ secrets.MOSEK_CI_BASE64 }}
5050

5151
steps:
52-
- uses: actions/checkout@v4
52+
- uses: actions/checkout@v5
5353
- name: Set Additional Envs
5454
run: |
5555
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
5656
echo $MOSEK_CI_BASE64 | base64 -d > mosek.lic
5757
echo "MOSEKLM_LICENSE_FILE=$( [[ $RUNNER_OS == 'macOS' ]] && echo $(pwd)/mosek.lic || echo $(realpath mosek.lic) )" >> $GITHUB_ENV
58-
- uses: conda-incubator/setup-miniconda@v3
58+
59+
- name: Install uv
60+
uses: astral-sh/setup-uv@v6
5961
with:
60-
auto-update-conda: true
6162
python-version: ${{ matrix.python-version }}
62-
channels: conda-forge,anaconda
63+
enable-cache: true
6364

6465
- name: Install
6566
run: |
@@ -83,8 +84,8 @@ jobs:
8384
strategy:
8485
fail-fast: false
8586
matrix:
86-
os: [ ubuntu-22.04, macos-13, windows-2022 ]
87-
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
87+
os: [ ubuntu-22.04, macos-14, windows-2022 ]
88+
python-version: [ "3.11", "3.12", "3.13" ]
8889
build-cvxpy-base: [ true, false ] # whether to build cvxpy-base (true) or regular cvxpy (false)
8990
include:
9091
# This is intended to just add the single_action_config parameter to one existing combination;
@@ -104,8 +105,8 @@ jobs:
104105
CVXPY_BASE_SUFFIX: ${{ matrix.build-cvxpy-base && 'base-' || '' }}
105106

106107
steps:
107-
- uses: actions/checkout@v4
108-
- uses: actions/setup-python@v5
108+
- uses: actions/checkout@v5
109+
- uses: actions/setup-python@v6
109110
with:
110111
python-version: ${{ matrix.python-version }}
111112

@@ -149,7 +150,7 @@ jobs:
149150
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux*"
150151
CIBW_ARCHS_MACOS: x86_64 universal2
151152
CIBW_ARCHS_LINUX: auto aarch64
152-
uses: pypa/cibuildwheel@v3.0.0
153+
uses: pypa/cibuildwheel@v3.1.4
153154

154155
- name: Build source
155156
if: ${{github.event_name == 'push' && env.SINGLE_ACTION_CONFIG == 'True'}}
@@ -161,7 +162,7 @@ jobs:
161162
if: ${{github.event_name == 'push' && env.USE_OPENMP != 'True'}}
162163
shell: bash
163164
run: |
164-
python -m pip install --upgrade twine
165+
pip install --upgrade twine
165166
twine check wheelhouse/*
166167
167168
- name: Release to pypi

.github/workflows/cvxpygen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
test_backends:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/setup-python@v5
14+
- uses: actions/setup-python@v6
1515
with:
1616
python-version: "3.12"
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
- name: Install pytest and cvxpygen
1919
run: |
2020
pip install . pytest hypothesis

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
doc_deploy:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/setup-python@v5
10+
- uses: actions/setup-python@v6
1111
with:
1212
python-version: "3.12"
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
with:
1515
ref: gh-pages
1616
- name: Set already deployed versions
@@ -20,7 +20,7 @@ jobs:
2020
echo ALL_DEPLOYED_VERSIONS=$(python -c "import os;from packaging import version;print(os.listdir('version'))") >> $GITHUB_ENV
2121
2222
# Checkout master
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
- name: Install
2525
run: |
2626
python -m pip install -e .

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pre-commit:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
1818
fetch-depth: 1
1919

.github/workflows/scorecards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: "Checkout code"
25-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
25+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.1.2
2626
with:
2727
persist-credentials: false
2828

@@ -51,6 +51,6 @@ jobs:
5151
# Upload the results to GitHub's code scanning dashboard (optional).
5252
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
5353
- name: "Upload to code-scanning"
54-
uses: github/codeql-action/upload-sarif@39edc492dbe16b1465b0cafca41432d857bdb31a # v2.16.4
54+
uses: github/codeql-action/upload-sarif@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v2.16.4
5555
with:
5656
sarif_file: results.sarif

.github/workflows/test_backends.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
test_backends:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/setup-python@v5
15+
- uses: actions/setup-python@v6
1616
with:
1717
python-version: "3.12"
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- name: Install cvxpy dependencies
2020
run: |
2121
pip install .
Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: test_optional_solvers
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- master
8-
tags:
9-
- '*'
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
- '*'
10+
1011
jobs:
1112
test_optional_solvers:
1213
runs-on: ${{ matrix.os }}
@@ -16,34 +17,42 @@ jobs:
1617
strategy:
1718
fail-fast: false
1819
matrix:
19-
os: [ ubuntu-22.04, macos-13, windows-2022 ]
20+
os: [ ubuntu-22.04, macos-14, windows-2022 ]
2021
steps:
21-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2223
- name: Set Additional Envs
2324
run: |
2425
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
2526
echo $MOSEK_CI_BASE64 | base64 -d > mosek.lic
2627
echo "MOSEKLM_LICENSE_FILE=$( [[ $RUNNER_OS == 'macOS' ]] && echo $(pwd)/mosek.lic || echo $(realpath mosek.lic) )" >> $GITHUB_ENV
27-
- uses: actions/setup-python@v5
28+
echo $KNITRO_LICENSE > ~/artelys_lic.txt
29+
30+
- uses: astral-sh/setup-uv@v6
2831
with:
2932
python-version: 3.12
30-
- uses: conda-incubator/setup-miniconda@v3
33+
enable-cache: true
34+
- uses: actions/checkout@v5
35+
- name: Setup Julia
36+
uses: julia-actions/setup-julia@v2
3137
with:
32-
auto-update-conda: true
33-
python-version: 3.12
34-
channels: conda-forge,anaconda
35-
- uses: actions/checkout@v4
38+
version: 'lts'
39+
- name: Install COSMO
40+
run: julia -e 'using Pkg; Pkg.add("COSMO")'
3641
- name: Install cvxpy dependencies and all optional solvers
37-
run: |
38-
source continuous_integration/install_optional_solvers.sh
39-
pip install . pytest hypothesis
42+
run: uv sync --all-extras --dev
4043
- name: Print installed solvers
4144
run : |
42-
python -c "import cvxpy; print(cvxpy.installed_solvers())"
45+
uv run python -c "import cvxpy; print(cvxpy.installed_solvers())"
4346
- name: Run test_conic_solvers
4447
run : |
45-
pytest -rs cvxpy/tests/test_conic_solvers.py
48+
uv run pytest -rs cvxpy/tests/test_conic_solvers.py
49+
- name: Run test_qp_solvers
50+
if: always()
51+
run : |
52+
uv run pytest -rs cvxpy/tests/test_qp_solvers.py
4653
4754
env:
55+
UV_SYSTEM_PYTHON: 1
4856
RUNNER_OS: ${{ matrix.os }}
49-
PYTHON_VERSION: 3.12
57+
PYTHON_VERSION: 3.12
58+
KNITRO_LICENSE: ${{ secrets.KNITRO_LICENSE }}

CONTRIBUTING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ following:
4848
* Browse the [issue tracker](https://github.com/cvxpy/cvxpy/issues), and
4949
look for the issues tagged "help wanted".
5050
* Polish the [example library](https://www.cvxpy.org/examples/index.html) or add new examples
51-
* Add a [benchmark](https://github.com/cvxpy/cvxpy/tree/master/cvxpy/tests/test_benchmarks.py)
51+
* Add a [benchmark](https://github.com/cvxpy/benchmarks)
5252

5353
## License
5454
Please add the following license to new files:
@@ -128,13 +128,17 @@ Please make sure that your change doesn't cause any of the unit tests to fail.
128128
to `pytest`.
129129
130130
## Benchmarks
131-
CVXPY has a few benchmarks in `cvxpy/tests/test_benchmarks.py`, which test
132-
the time to canonicalize problems. Please run
131+
CVXPY benchmarks are in a separate repository at
132+
[github.com/cvxpy/benchmarks](https://github.com/cvxpy/benchmarks).
133+
The benchmarks use [Airspeed Velocity](https://asv.readthedocs.io/) to test
134+
the time to canonicalize problems.
133135
134-
```
135-
pytest -s cvxpy/tests/test_benchmarks.py
136-
```
136+
To run benchmarks locally:
137+
1. Clone the benchmarks repository
138+
2. Install with `pip install -e .`
139+
3. Run benchmarks with `asv run`
140+
141+
For more details, see the [benchmarks README](https://github.com/cvxpy/benchmarks/blob/main/README.md).
137142
138-
with and without your change, to make sure no performance regressions are
139-
introduced. If you are making a code contribution, please include the output of
140-
the above command (with and without your change) in your pull request.
143+
When making performance-sensitive changes, please verify that no regressions are
144+
introduced by running the relevant benchmarks.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ conda install -c conda-forge cvxpy
8181

8282
CVXPY has the following dependencies:
8383

84-
- Python >= 3.9
84+
- Python >= 3.11
8585
- Clarabel >= 0.5.0
8686
- OSQP >= 0.6.2
8787
- SCS >= 3.2.4.post1
88-
- NumPy >= 1.21.6
89-
- SciPy >= 1.11.0
88+
- NumPy >= 1.22.4
89+
- SciPy >= 1.13.0
9090

9191
For detailed instructions, see the [installation
9292
guide](https://www.cvxpy.org/install/index.html).

continuous_integration/install_dependencies.sh

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,32 @@
44
# variables defined in the build.yml in .github/workflows/.
55

66
set -e
7+
uv venv
8+
if [[ "$RUNNER_OS" == "Windows" ]]; then
9+
. .venv/Scripts/activate
10+
else
11+
. .venv/bin/activate
12+
fi
13+
14+
#if [[ "$RUNNER_OS" == "Linux" ]]; then
15+
# sudo apt install openblas
16+
#fi
717

8-
conda config --set remote_connect_timeout_secs 30.0
9-
conda config --set remote_max_retries 10
10-
conda config --set remote_backoff_factor 2
11-
conda config --set remote_read_timeout_secs 120.0
12-
conda install mkl pip pytest pytest-cov hypothesis openblas "setuptools>65.5.1"
18+
uv pip install pytest pytest-cov hypothesis "setuptools>65.5.1"
1319

14-
conda install scs
15-
python -m pip install clarabel osqp
20+
uv pip install scs clarabel osqp
21+
22+
if [[ "$RUNNER_OS" != "macOS" ]]; then
23+
uv pip install mkl
24+
fi
1625

1726
# Install newest stable versions for Python 3.13.
1827
if [[ "$PYTHON_VERSION" == "3.13" ]]; then
19-
conda install scipy numpy
28+
uv pip install scipy numpy
2029
else
21-
conda install scipy=1.13.0 numpy=1.26.4
30+
uv pip install scipy==1.13.0 numpy==1.26.4
2231
fi
2332

24-
if [[ "$USE_OPENMP" == "True" ]]; then
25-
conda install -c conda-forge openmp
26-
fi
33+
#if [[ "$USE_OPENMP" == "True" ]]; then
34+
#uv pip install openmp
35+
#fi

0 commit comments

Comments
 (0)