Skip to content

Add penalty weight parameter id to removed constraint for inverse lookup #1161

Add penalty weight parameter id to removed constraint for inverse lookup

Add penalty weight parameter id to removed constraint for inverse lookup #1161

Workflow file for this run

name: Python
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
protogen:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-test-environment
- name: Install dependencies
run: task install_python_sdk
- name: Regenerate python bindings
run: task protogen_python
- name: Check updated
run: |
git add -N python/ommx/ommx/ # To check newly generated files
git diff --exit-code
stub-gen:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-test-environment
- name: Regenerate stub file
run: task stubgen
- name: Check updated
run: |
git diff --exit-code python/ommx/ommx/_ommx_rust.pyi
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-test-environment
with:
python-version: ${{ matrix.python-version }}
- name: Install ommx
run: task install_python_sdk
- name: Test ommx
if: always()
run: task test_python_sdk
# FIXME: Python-MIP does not support Python 3.12
- name: Test ommx-python-mip-adapter
if: ${{ matrix.python-version != '3.12' }}
run: |
task install_python_mip_adapter
task test_python_mip_adapter
- name: Test ommx-pyscipopt-adapter
run: |
task install_pyscipopt_adapter
task test_pyscipopt_adapter
- name: Run notebooks
if: ${{ github.actor != 'dependabot[bot]' && matrix.python-version != '3.12' }}
run: |
jupyter nbconvert --to notebook --execute notebooks/*.ipynb
env:
OMMX_BASIC_AUTH_DOMAIN: ghcr.io
OMMX_BASIC_AUTH_USERNAME: ${{ github.actor }}
OMMX_BASIC_AUTH_PASSWORD: ${{ github.token }}
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-test-environment
- name: Format
run: ruff format --check python
- name: Lint
run: ruff check python