Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f88a2a2
Run conda install workflow on pull requests
FFroehlich Jun 26, 2025
3cb8f67
Update conda install workflow
FFroehlich Jun 27, 2025
415cff4
remove BLAS_LIBS
FFroehlich Jun 30, 2025
5017666
Merge branch 'main' into 92qzwt-codex/add-cron-run-github-action-for-…
FFroehlich Jul 1, 2025
68c59c2
don‘t install BLAS
FFroehlich Jul 1, 2025
d2f1cf8
install from git
FFroehlich Jul 1, 2025
eb28923
-v
dweindl Jul 2, 2025
9232bb2
env
dweindl Jul 2, 2025
226a9f1
compilers
dweindl Jul 2, 2025
c6f2e1c
clang-tools
dweindl Jul 2, 2025
6487135
Merge branch 'main' into 92qzwt-codex/add-cron-run-github-action-for-…
dweindl Oct 20, 2025
98a5490
..
dweindl Oct 20, 2025
f122de0
..
dweindl Oct 20, 2025
74c88fc
report Python3 INCLUDE_DIRS and LIBRARIES
FFroehlich Nov 4, 2025
7aca4b7
ls
dweindl Nov 4, 2025
efb3389
Modify conda install command in workflow
FFroehlich Nov 5, 2025
6979f1d
Fix conda install command for compilers
FFroehlich Nov 5, 2025
23fc834
do not link python runtime, install conda tools
FFroehlich Nov 7, 2025
f2e2a9e
Update test_conda_install.yml
FFroehlich Nov 7, 2025
3165d1c
Update test_conda_install.yml
FFroehlich Nov 7, 2025
1580a35
Update test_conda_install.yml
FFroehlich Nov 7, 2025
9a909c4
Update test_conda_install.yml
FFroehlich Nov 7, 2025
b6be53e
Update CMakeLists.txt
FFroehlich Nov 7, 2025
b4bea41
Update test_conda_install.yml
FFroehlich Nov 7, 2025
114e225
simplify
FFroehlich Nov 7, 2025
ede4ffa
no conda compilers, multiversion
FFroehlich Nov 7, 2025
ac67952
update doc
FFroehlich Nov 7, 2025
a8bfe6e
use conda compilers
FFroehlich Nov 7, 2025
ed6743b
Update CMakeLists.txt
dweindl Nov 10, 2025
fced0f3
Update test_conda_install.yml
FFroehlich Nov 10, 2025
6958fe9
Merge branch '92qzwt-codex/add-cron-run-github-action-for-amici-insta…
FFroehlich Nov 10, 2025
59d0e50
Update test_conda_install.yml
FFroehlich Nov 10, 2025
a1ce620
Update .github/workflows/test_conda_install.yml
dweindl Nov 10, 2025
6aa031c
Revert "Update .github/workflows/test_conda_install.yml"
dweindl Nov 10, 2025
ab4dfa9
openmp?
dweindl Nov 10, 2025
70449f5
..
dweindl Nov 10, 2025
cfcf943
dbg
dweindl Nov 10, 2025
a6669f9
dbg
dweindl Nov 10, 2025
f153613
dbg
dweindl Nov 10, 2025
4a934fe
no --user
dweindl Nov 10, 2025
8d675cb
conda cmake
dweindl Nov 10, 2025
124e362
cleanup
dweindl Nov 12, 2025
3006503
coe
dweindl Nov 12, 2025
6a43cb9
Merge branch 'main' into 92qzwt-codex/add-cron-run-github-action-for-…
dweindl Nov 12, 2025
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
58 changes: 58 additions & 0 deletions .github/workflows/test_conda_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Conda installation
on:
workflow_dispatch:
schedule:
- cron: '48 4 * * *'
pull_request:
branches:
- main

jobs:
conda:
name: Conda installation
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]
python-version: ['3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
activate-environment: amici
- name: Install requirements
shell: bash -l {0}
run: |
conda install -c conda-forge compilers cmake
- name: Install AMICI
shell: bash -l {0}
run: |
pip3 install -v ./python/sdist
- name: Show environment
shell: bash -l {0}
run: |
python -c "import os; import pprint; pprint.pprint(dict(os.environ))"
which cmake
which ninja
ls -l /Users/runner/miniconda3/envs/amici/bin || true
- name: Install test dependencies
shell: bash -l {0}
run: |
# Install test extras (pytest, scipy, etc.)
pip3 install pytest pytest-cov scipy h5py antimony
- name: Test import
shell: bash -l {0}
run: |
python -c "from amici import _amici; print(_amici)"
python -m amici
- name: Run SBML import test
shell: bash -l {0}
# FIXME
continue-on-error: true
run: |
cd python/tests
pytest test_sbml_import.py::test_steadystate_simulation -sv
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ cmake_minimum_required(VERSION 3.22)
# src/CMakeLists.template.cmake
cmake_policy(VERSION 3.22...3.31)

# We aren't using C++20 modules, so disable scanning for them to avoid
# clang-scan-deps-notfound errors.
# See also https://discourse.cmake.org/t/cmake-3-28-cmake-cxx-compiler-clang-scan-deps-notfound-not-found/9244/3
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)

project(amici)

# misc options
Expand All @@ -27,6 +32,7 @@ message(STATUS "CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

Expand Down
26 changes: 4 additions & 22 deletions doc/python_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@ Installation under conda
There is no amici conda recipe available yet. However, you can install AMICI
using pip in a conda environment.

.. note::

It is possible, but we currently don't recommend using conda for installing
AMICI, as it commonly leads to conflicts with system installations of
libraries and compilers.

Create a minimal conda environment via:

.. code-block:: bash
Expand Down Expand Up @@ -286,25 +280,13 @@ Now, you are ready to use AMICI in the virtual environment.

**conda on Mac**

If the above installation does not work for you, try installing AMICI via:
If the above installation does not work for you, try installing AMICI
using clang compilers provided by conda:

.. code-block:: bash

CFLAGS="-stdlib=libc++" CC=clang CXX=clang pip3 install --verbose amici

This will use the ``clang`` compiler.

You will have to pass the same options when compiling any model later
on. This can be done by inserting the following code before model import:

.. code-block:: python

import os
os.environ['CC'] = 'clang'
os.environ['CXX'] = 'clang'
os.environ['CFLAGS'] = '-stdlib=libc++'

(For further discussion see https://github.com/AMICI-dev/AMICI/issues/357)
conda install -c conda-forge compilers
pip install amici --no-cache

Known issues:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ cmake_policy(VERSION 3.22...3.31)

project(TPL_MODELNAME)

message(STATUS "CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
6 changes: 5 additions & 1 deletion swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ find_package(
Python3
COMPONENTS Interpreter Development NumPy
REQUIRED)
message(
STATUS
"Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}; Python3_LIBRARIES: ${Python3_LIBRARIES}"
)
message(
STATUS
"Found numpy ${Python3_NumPy_VERSION} include dir ${Python3_NumPy_INCLUDE_DIRS}"
Expand Down Expand Up @@ -112,7 +116,7 @@ set_target_properties(
# NOTE: No public definitions of any dependency are forwarded to swig, they are
# only used for compiling the swig-generated source file. Any definition that
# are relevant for swig-code generation, need to be forwarded manually.
target_link_libraries(_amici amici Python3::Python)
target_link_libraries(_amici amici Python3::Module)
if(WIN32)
add_custom_command(
TARGET _amici
Expand Down
Loading