Introduce SamplerAdapter
and OMMXOpenJijSAAdapter
#1801
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Regenerate python bindings | |
run: task proto: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 python: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 python:sync | |
- name: Test | |
run: task python:test | |
- name: Run notebooks | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: | | |
uv 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 |