Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA: Test macos-14 #1387

Merged
merged 3 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici
Expand All @@ -60,7 +60,7 @@ jobs:
file: ./coverage.xml

mac:
runs-on: macos-12
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.12']
Expand All @@ -80,14 +80,14 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici

- name: Run tests
timeout-minutes: 30
run: tox -e base
run: ulimit -n 65536 65536 && tox -e base

- name: Coverage
uses: codecov/codecov-action@v3
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
path: |
~\AppData\Local\pip\Cache
.tox
key: ${{ runner.os }}-${{ matrix.python-version }}-ci
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici pysb
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install julia
uses: julia-actions/setup-julia@v1
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh ipopt
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: pip install tox pre-commit
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh doc amici
Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici ipopt
Expand Down Expand Up @@ -445,7 +445,7 @@ jobs:
path: |
~/.cache/pip
.tox/
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}
key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}"

- name: Install dependencies
run: .github/workflows/install_deps.sh amici
Expand Down
9 changes: 6 additions & 3 deletions test/sample/test_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
import os

import numpy as np
import petab
import pytest
import scipy.optimize as so
from scipy.integrate import quad
from scipy.stats import ks_2samp, kstest, multivariate_normal, norm, uniform

import pypesto
import pypesto.optimize as optimize
import pypesto.petab
import pypesto.sample as sample
from pypesto.C import OBJECTIVE_NEGLOGLIKE, OBJECTIVE_NEGLOGPOST
from pypesto.sample.pymc import PymcSampler


def gaussian_llh(x):
Expand Down Expand Up @@ -96,6 +93,10 @@ def rosenbrock_problem():


def create_petab_problem():
import petab

import pypesto.petab

current_path = os.path.dirname(os.path.realpath(__file__))
dir_path = os.path.abspath(
os.path.join(current_path, "..", "..", "doc", "example")
Expand Down Expand Up @@ -187,6 +188,8 @@ def sampler(request):
n_chains=5,
)
elif request.param == "Pymc":
from pypesto.sample.pymc import PymcSampler

return PymcSampler(tune=5, progressbar=False)
elif request.param == "Emcee":
return sample.EmceeSampler(nwalkers=10)
Expand Down
Loading