Skip to content

Commit

Permalink
Merge branch 'master' into feature/custom-decomp
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao-Dionisio authored Dec 9, 2024
2 parents 3b6b372 + e7bf03c commit 5b7a9e9
Show file tree
Hide file tree
Showing 86 changed files with 11,745 additions and 6,125 deletions.
60 changes: 48 additions & 12 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
name: Build
name: Build wheels

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
# scip_version:
# type: string
# description: SCIPOptSuite deployment version
# required: true
# default: "v0.4.0"
upload_to_pypi:
type: boolean
description: Should upload
required: false
default: true
test_pypi:
type: boolean
description: Use Test PyPI
required: false
default: true

jobs:
build_wheels:
Expand All @@ -16,7 +30,7 @@ jobs:
arch: x86_64
- os: macos-14
arch: arm64
- os: macos-latest
- os: macos-13
arch: x86_64
- os: windows-latest
arch: AMD64
Expand All @@ -27,41 +41,63 @@ jobs:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.21.1
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
CIBW_MANYLINUX_*_IMAGE: manylinux_2_28

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os}}-${{ matrix.arch }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build sdist
shell: bash -l {0}
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: source-distribution
path: dist/*.tar.gz

upload_pypi:
merge_artifacts:
name: Merge Artifacts
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4

upload_pypi:
needs: [build_wheels, build_sdist, merge_artifacts]
runs-on: ubuntu-latest
if: github.event.inputs.upload_to_pypi == 'true'
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
name: merged-artifacts
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event.inputs.test_pypi == 'false'
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true

- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event.inputs.test_pypi == 'true'
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TESTPYPI_API_TOKEN }}
verbose: true

2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run tests with coverage
env:
version: 9.0.0
version: 9.1.0

on:
push:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Generate documentation

on:
workflow_dispatch:
inputs: {}

jobs:
generate-documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Generate documentation
run: |
sudo apt-get install doxygen graphviz
bash -ex generate-docs.sh "${{ secrets.GITHUB_TOKEN }}" "gh-pages"
35 changes: 9 additions & 26 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Integration test

env:
version: 9.0.0
version: 9.2.0

# runs on branches and pull requests; doesn't run on tags.
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'

jobs:

Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:

- name: Download dependencies (SCIPOptSuite)
shell: powershell
run: wget https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-win64-VS15.exe -outfile scipopt-installer.exe
run: wget https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-win64.exe -outfile scipopt-installer.exe

- name: Install dependencies (SCIPOptSuite)
shell: cmd
Expand Down Expand Up @@ -90,33 +93,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Cache dependencies (SCIPOptSuite)
id: cache-scip
uses: actions/cache@v2
with:
path: |
${{ runner.workspace }}/scipoptsuite
~/Library/Caches/Homebrew/tbb--*
/usr/local/opt/tbb*
~/Library/Caches/Homebrew/downloads/*--tbb-*
~/Library/Caches/Homebrew/boost--*
/usr/local/opt/boost*
~/Library/Caches/Homebrew/downloads/*--boost-*
key: ${{ runner.os }}-scipopt-${{ env.version }}-${{ hashFiles('**/lockfiles') }}
restore-keys: |
${{ runner.os }}-scipopt-${{ env.version }}-
- name: Install dependencies (SCIPOptSuite)
if: steps.cache-scip.outputs.cache-hit != 'true'
run: |
brew install tbb boost bison
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/scipoptsuite-${{ env.version }}.tgz
tar xfz scipoptsuite-${{ env.version }}.tgz
cd scipoptsuite-${{ env.version }}
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/scipoptsuite -DIPOPT=off -DSYM=none -DTPI=tny -DREADLINE=off
make install -j
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Darwin.sh
chmod +x SCIPOptSuite-${{ env.version }}-Darwin.sh
./SCIPOptSuite-${{ env.version }}-Darwin.sh --skip-license --include-subdir
mv SCIPOptSuite-${{ env.version }}-Darwin ${{ runner.workspace }}/scipoptsuite
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/_autosummary/

# PyBuilder
target/
Expand Down
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

sphinx:
builder: html
configuration: docs/conf.py

build:
os: "ubuntu-22.04"
tools:
python: "3.11"

formats: all

python:
install:
- requirements: docs/requirements.txt
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,61 @@

## Unreleased
### Added
- Added categorical data example
- Added printProblem to print problem to stdout
- Added stage checks to presolve, freereoptsolve, freetransform
- Added primal_dual_evolution recipe and a plot recipe
### Fixed
- Added default names to indicator constraints
### Changed
- GitHub actions using Mac now use precompiled SCIP from latest release
### Removed

## 5.2.1 - 2024.10.29
### Added
- Expanded Statistics class to more problems.
- Created Statistics class
- Added parser to read .stats file
- Release checklist in `RELEASE.md`
- Added Python definitions and wrappers for SCIPstartStrongbranch, SCIPendStrongbranch SCIPgetBranchScoreMultiple,
SCIPgetVarStrongbranchInt, SCIPupdateVarPseudocost, SCIPgetVarStrongbranchFrac, SCIPcolGetAge,
SCIPgetVarStrongbranchLast, SCIPgetVarStrongbranchNode, SCIPallColsInLP, SCIPcolGetAge
- Added getBipartiteGraphRepresentation
- Added helper functions that facilitate testing
- Added Python definitions and wrappers for SCIPgetNImplVars, SCIPgetNContVars, SCIPvarMayRoundUp,
SCIPvarMayRoundDown, SCIPcreateLPSol, SCIPfeasFloor, SCIPfeasCeil, SCIPfeasRound, SCIPgetPrioChild,
SCIPgetPrioSibling
- Added additional tests to test_nodesel, test_heur, and test_strong_branching
- Migrated documentation to Readthedocs
- `attachEventHandlerCallback` method to Model for a more ergonomic way to attach event handlers
- Added Model method: optimizeNogil
- Added Solution method: getOrigin, retransform, translate
- Added SCIP.pxd: SCIP_SOLORIGIN, SCIPcopyOrigVars, SCIPcopyOrigConss, SCIPsolve nogil, SCIPretransformSol, SCIPtranslateSubSol, SCIPsolGetOrigin, SCIPhashmapCreate, SCIPhashmapFree
- Added additional tests to test_multi_threads, test_solution, and test_copy
### Fixed
- Fixed too strict getObjVal, getVal check
### Changed
- Changed createSol to now have an option of initialising at the current LP solution
- Unified documentation style of scip.pxi to numpydocs
### Removed

## 5.1.1 - 2024-06-22
### Added
- Added SCIP_STATUS_DUALLIMIT and SCIP_STATUS_PRIMALLIMIT
- Added SCIPprintExternalCodes (retrieves version of linked symmetry, lp solver, nl solver etc)
- Added recipe with reformulation for detecting infeasible constraints
- Wrapped SCIPcreateOrigSol and added tests
- Added verbose option for writeProblem and writeParams
- Expanded locale test
- Added methods for creating expression constraints without adding to problem
- Added methods for creating/adding/appending disjunction constraints
- Added check for pt_PT locale in test_model.py
- Added SCIPgetOrigConss and SCIPgetNOrigConss Cython bindings.
- Added transformed=False option to getConss, getNConss, and getNVars
### Fixed
- Fixed locale errors in reading
### Changed
- Made readStatistics a standalone function
### Removed

## 5.0.1 - 2024-04-05
Expand All @@ -14,6 +66,7 @@
- Add SCIP function SCIPgetTreesizeEstimation and wrapper getTreesizeEstimation
- New test for model setLogFile
### Fixed
- Fixed locale fix
- Fixed model.setLogFile(None) error
- Add recipes sub-package
- Fixed "weakly-referenced object no longer exists" when calling dropEvent in test_customizedbenders
Expand Down
85 changes: 0 additions & 85 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 5b7a9e9

Please sign in to comment.