Skip to content

Commit 17d6e77

Browse files
authored
Merge pull request #2451 from dweindl/release_0.25.1
Release 0.25.1
2 parents 7487607 + d9b4477 commit 17d6e77

21 files changed

+117
-57
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ updates:
88
ignore:
99
- dependency-name: "*"
1010
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
11+
target-branch: "develop"

.github/workflows/test_matlab.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
2222

2323
- name: Install MATLAB
24-
uses: matlab-actions/setup-matlab@v1
24+
uses: matlab-actions/setup-matlab@v2
2525
- name: Run script
26-
uses: matlab-actions/run-command@v1
26+
uses: matlab-actions/run-command@v2
2727
with:
2828
command: cd matlab; installAMICI; addpath tests; testModels

.github/workflows/test_python_cplusplus.yml

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

2020
steps:
2121
- name: Cache
22-
uses: actions/cache@v3
22+
uses: actions/cache@v4
2323
with:
2424
path: |
2525
~/.cache/pooch
@@ -273,7 +273,7 @@ jobs:
273273

274274
steps:
275275
- name: Cache
276-
uses: actions/cache@v3
276+
uses: actions/cache@v4
277277
with:
278278
path: |
279279
~/Library/Caches/pooch

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,23 @@
22

33
## v0.X Series
44

5-
### v0.25.0 (2024-05-TBD)
5+
### v0.25.1 (2024-05-16)
6+
7+
**Fixes**
8+
* Avoid clashes with sympy-entities in `plot_expressions`
9+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2440
10+
* PEtab: fix KeyErrors for missing parameters in `fill_in_parameters`
11+
(default values are now used if only a subset of parameters is provided)
12+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2449
13+
* CMake: Fix Intel MKL detection when not using environment modules
14+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2443
15+
* CMake: Fix some issues with multi-config generators
16+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2445
17+
18+
**Full Changelog**: https://github.com/AMICI-dev/AMICI/compare/v0.25.0...v0.25.1
19+
20+
21+
### v0.25.0 (2024-05-08)
622

723
This release requires Python >= 3.10.
824

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}")
9090
else()
9191
add_compile_options(-O0 -g)
9292
endif()
93-
set(CMAKE_BUILD_TYPE "Debug")
9493
endif()
9594

9695
# coverage options
@@ -135,7 +134,7 @@ endif()
135134
set(VENDORED_SUNDIALS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ThirdParty/sundials)
136135
set(SUNDIALS_PRIVATE_INCLUDE_DIRS "${VENDORED_SUNDIALS_DIR}/src")
137136
# Handle different sundials build/install dirs, depending on whether we are
138-
# building the Python extension only or the full C++ interface
137+
# building the Python extension only or the full C++ interface
139138
if(AMICI_PYTHON_BUILD_EXT_ONLY)
140139
set(VENDORED_SUNDIALS_BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR})
141140
set(VENDORED_SUNDIALS_INSTALL_DIR ${VENDORED_SUNDIALS_BUILD_DIR})

cmake/AmiciFindBLAS.cmake

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,33 @@ set_property(CACHE BLAS PROPERTY STRINGS "CBLAS" "MKL" "ACCELERATE")
1212

1313
if(${BLAS} STREQUAL "MKL" OR DEFINED ENV{MKLROOT})
1414
if(DEFINED ENV{MKLROOT})
15-
# This is set by Environment Modules
16-
message(STATUS "Using MKL_INCDIR and MKL_LIB from environment module")
1715
set(BLAS
1816
"MKL"
1917
CACHE STRING "BLAS library to use" FORCE)
20-
set(BLAS_INCLUDE_DIRS
21-
"$ENV{MKL_INCDIR}"
22-
CACHE STRING "" FORCE)
23-
set(BLAS_LIBRARIES
24-
"$ENV{MKL_LIB}"
25-
CACHE STRING "" FORCE)
18+
19+
# Was MKLROOT set by /opt/intel/oneapi/setvars.sh? then cmake will find it
20+
message(STATUS "Trying to find BLAS based on MKLROOT=$ENV{MKLROOT}")
21+
# give the user the option to override the BLA_VENDOR
22+
if(NOT DEFINED BLA_VENDOR)
23+
set(BLA_VENDOR Intel10_64lp)
24+
endif()
25+
message(STATUS "Trying FindBLAS with BLA_VENDOR=${BLA_VENDOR}")
26+
find_package(BLAS)
27+
if(BLAS_FOUND)
28+
message(STATUS "Found BLAS via FindBLAS and MKLROOT")
29+
else()
30+
# This is set by Environment Modules and might not be compatible with
31+
# FindBLAS
32+
message(STATUS "Using MKL_INCDIR and MKL_LIB from environment module")
33+
set(BLAS_INCLUDE_DIRS
34+
"$ENV{MKL_INCDIR}"
35+
CACHE STRING "" FORCE)
36+
set(BLAS_LIBRARIES
37+
"$ENV{MKL_LIB}"
38+
CACHE STRING "" FORCE)
39+
endif()
2640
else()
41+
message(STATUS "BLAS is set to MKL, but MKLROOT is not set.")
2742
set(BLAS_INCLUDE_DIRS
2843
""
2944
CACHE STRING "")
@@ -42,6 +57,7 @@ elseif(
4257

4358
if(APPLE AND (NOT DEFINED BLA_VENDOR OR BLA_VENDOR STREQUAL "All"))
4459
set(BLA_VENDOR Apple)
60+
message(STATUS "Trying FindBLAS with BLA_VENDOR=${BLA_VENDOR}")
4561
find_package(BLAS)
4662
if(BLAS_FOUND)
4763
message(STATUS "Found Apple Accelerate BLAS")
@@ -59,6 +75,7 @@ elseif(
5975

6076
endif()
6177
if(NOT BLAS_FOUND)
78+
message(STATUS "Trying FindBLAS with BLA_VENDOR=${BLA_VENDOR}")
6279
find_package(BLAS)
6380
if(BLAS_FOUND)
6481
message(STATUS "Found BLAS via FindBLAS")
@@ -79,17 +96,17 @@ endif()
7996
# Create an imported target
8097
if(NOT TARGET BLAS::BLAS)
8198
add_library(BLAS INTERFACE)
82-
set_target_properties(BLAS PROPERTIES
83-
INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIRS}"
84-
INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES}")
99+
set_target_properties(
100+
BLAS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIRS}"
101+
INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES}")
85102
add_library(BLAS::BLAS ALIAS BLAS)
86103
if("${PROJECT_NAME}" STREQUAL "amici")
87-
install(TARGETS BLAS EXPORT BLAS)
88-
export(EXPORT BLAS NAMESPACE BLAS::)
89-
install(
90-
EXPORT BLAS
91-
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Amici"
92-
NAMESPACE BLAS::)
104+
install(TARGETS BLAS EXPORT BLAS)
105+
export(EXPORT BLAS NAMESPACE BLAS::)
106+
install(
107+
EXPORT BLAS
108+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Amici"
109+
NAMESPACE BLAS::)
93110
endif()
94111

95112
# legacy python package environment variables:

cmake/cmakelang-tools.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ set(ALL_CMAKE_FILES
99
tests/cpp/unittests/CMakeLists.txt
1010
${CMAKE_MODULE_PATH}/cmakelang-tools.cmake
1111
${CMAKE_MODULE_PATH}/clang-tools.cmake
12+
${CMAKE_MODULE_PATH}/AmiciFindBLAS.cmake
1213
${CMAKE_MODULE_PATH}/version.cmake)
14+
1315
list(JOIN ALL_CMAKE_FILES " " ALL_CMAKE_FILES)
1416

1517
# --- cmake-format ---

documentation/rtd_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exhale>=0.3.7
1818
sphinxcontrib-matlabdomain>=0.20.0
1919
sphinxcontrib-napoleon>=0.7
2020
pygments>=2.15.1
21-
Jinja2==3.1.2
21+
Jinja2==3.1.4
2222
git+https://github.com/readthedocs/readthedocs-sphinx-ext
2323
ipykernel
2424
-e git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master#subdirectory=src/python&egg=benchmark_models_petab

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ filterwarnings =
1919
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning
2020
ignore:.*:ImportWarning:tellurium
2121
ignore:.*PyDevIPCompleter6.*:DeprecationWarning
22+
# ignore numpy log(0) warnings (np.log(0) = -inf)
23+
ignore:divide by zero encountered in log:RuntimeWarning
2224

2325
norecursedirs = .git amici_models build doc documentation matlab models ThirdParty amici sdist examples

python/sdist/amici/numpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import amici
1414
import numpy as np
1515
import sympy as sp
16-
16+
from sympy.abc import _clash
1717
from . import ExpData, ExpDataPtr, Model, ReturnData, ReturnDataPtr
1818

1919
StrOrExpr = Union[str, sp.Expr]
@@ -497,7 +497,7 @@ def evaluate(expr: StrOrExpr, rdata: ReturnDataView) -> np.array:
497497
from sympy.utilities.lambdify import lambdify
498498

499499
if isinstance(expr, str):
500-
expr = sp.sympify(expr)
500+
expr = sp.sympify(expr, locals=_clash)
501501

502502
arg_names = list(sorted(expr.free_symbols, key=lambda x: x.name))
503503
func = lambdify(arg_names, expr, "numpy")

0 commit comments

Comments
 (0)