Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
24f1e7c
building source distribution works
annawendler Feb 23, 2026
4677483
try building wheels with ci
annawendler Feb 23, 2026
fe6706c
[ci skip] try only ubuntu
annawendler Feb 23, 2026
6b35ba7
test
annawendler Feb 23, 2026
369342f
require higher pybind version
annawendler Feb 25, 2026
c13105f
add comma
annawendler Feb 25, 2026
e25c218
skip some pypy versions
annawendler Feb 25, 2026
69a5b96
skip all pypy versions
annawendler Feb 25, 2026
73a7fbc
skip musllinux
annawendler Feb 25, 2026
6ca71df
fix
annawendler Feb 25, 2026
265a58c
test windows
annawendler Feb 25, 2026
22c73cb
skip win32
annawendler Feb 25, 2026
02edbf2
test macos
annawendler Feb 27, 2026
a1d4085
skip macosx_arm64
annawendler Feb 27, 2026
59e454a
test
annawendler Feb 27, 2026
b4febe3
test
annawendler Feb 27, 2026
6f2ac0a
build sdist in ci
annawendler Feb 27, 2026
4b9ce8d
add names for artifacts
annawendler Feb 27, 2026
9747c8c
also include other python packages
annawendler Feb 27, 2026
77bab93
update
annawendler Mar 2, 2026
d5b9b27
only windows
annawendler Mar 5, 2026
6951691
fix typo
annawendler Mar 6, 2026
c8253b1
test upload
annawendler Mar 11, 2026
682490b
typo
annawendler Mar 11, 2026
47cd7d3
use token
annawendler Mar 11, 2026
2dd392f
adapt names, no token
annawendler Mar 11, 2026
55911ce
try only downloading artifacts
annawendler Mar 11, 2026
0700ae8
try again
annawendler Mar 11, 2026
881d5e6
try with new version
annawendler Mar 11, 2026
f7e54c8
Merge branch 'main' into memilio-simulations-pypi-package
annawendler Mar 16, 2026
58979cd
update after merge of main
annawendler Mar 16, 2026
5376644
only ubuntu
annawendler Mar 16, 2026
8c03007
more cpp versions
annawendler Mar 16, 2026
b1d43b1
update path
annawendler Mar 31, 2026
9f2e52b
Merge branch 'main' into memilio-simulations-pypi-package
annawendler Mar 31, 2026
80b08ce
update version
annawendler Mar 31, 2026
ed25c02
include windows
annawendler Mar 31, 2026
c3af9ce
update actions for newer node.js version
annawendler Mar 31, 2026
21f9983
again
annawendler Mar 31, 2026
eacb371
try dynamic versioning
annawendler Apr 1, 2026
c2df595
try again
annawendler Apr 1, 2026
bd64248
no local version
annawendler Apr 1, 2026
2a982eb
general clean up
annawendler Apr 1, 2026
a3e2557
update main ci, fix version for now
annawendler Apr 1, 2026
5b19727
fix typo in if statement
annawendler Apr 1, 2026
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
13 changes: 10 additions & 3 deletions .github/actions/build-py/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ runs:
- name: Make artifact dir
shell: bash
run: |
cd pycode/memilio-${{ inputs.package }}/
if [ "${{ inputs.package }}" != "simulation" ]; then
cd pycode/memilio-${{ inputs.package }}/
// else stay in root directory
fi
mkdir wheelhouse
- name: Build Python Wheels
shell: bash
run: |
cd pycode/memilio-${{ inputs.package }}/
if [ "${{ inputs.package }}" != "simulation" ]; then
cd pycode/memilio-${{ inputs.package }}/
// else stay in root directory
fi
/opt/python/cp38-cp38/bin/python -m pip install --upgrade pip setuptools wheel
/opt/python/cp38-cp38/bin/python -m pip install scikit-build scikit-build-core
/opt/python/cp38-cp38/bin/python -m build --no-isolation --wheel
Expand All @@ -35,7 +41,8 @@ runs:
fi
cp -r wheelhouse ..
- name: Upload Python Wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: python-wheels-${{ inputs.package }}
path: pycode/wheelhouse

59 changes: 59 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build wheels

on: [pull_request, release]

jobs:

build_wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: pypa/cibuildwheel@v2.16

- uses: actions/upload-artifact@v6
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- run: pipx run build --sdist

- uses: actions/upload-artifact@v6
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v8
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
# To test uploads to TestPyPI, uncomment the following:
repository-url: https://test.pypi.org/legacy/
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.13)
project(memilio-simulation)

set(CMAKE_CXX_STANDARD "20")
set(CMAKE_CXX_STANDARD_REQUIRED "20")

# add in C++ library
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cpp ${CMAKE_CURRENT_BINARY_DIR}/cpp EXCLUDE_FROM_ALL)

add_subdirectory(pycode/memilio-simulation)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MEmilio - a high performance Modular EpideMIcs simuLatIOn software #

![memilio_logo](docs/memilio-small.png)
![memilio_logo](https://github.com/SciCompMod/memilio/blob/main/docs/memilio-small.png)

[![CI](https://github.com/SciCompMod/memilio/actions/workflows/main.yml/badge.svg)](https://github.com/SciCompMod/memilio/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/SciCompMod/memilio/branch/main/graph/badge.svg?token=DVQXIQJHBM)](https://codecov.io/gh/SciCompMod/memilio)
Expand Down
9 changes: 0 additions & 9 deletions pycode/memilio-simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
cmake_minimum_required(VERSION 3.13)
project(memilio-python)

set(CMAKE_CXX_STANDARD "20")
set(CMAKE_CXX_STANDARD_REQUIRED "20")

option(MEMILIO_USE_BUNDLED_PYBIND11 "Use pybind11 bundled with this library." ON)
mark_as_advanced(MEMILIO_USE_BUNDLED_PYBIND11)

Expand Down Expand Up @@ -52,9 +46,6 @@ else()
find_package(pybind11 REQUIRED)
endif()

# add in C++ library
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../cpp ${CMAKE_CURRENT_BINARY_DIR}/cpp EXCLUDE_FROM_ALL)

# a list of all "LINKED_LIBRARIES" that are given to add_pymio_module. will contain duplicates
# used for wheel installation
set(PYMIO_MEMILIO_LIBS_LIST)
Expand Down
6 changes: 3 additions & 3 deletions pycode/memilio-simulation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This package contains Python bindings for the MEmilio C++ library. It enables se

This project is configured via ``pyproject.toml`` and is built with [scikit-build-core](https://scikit-build-core.readthedocs.io). CMake and Ninja must be available on the system. The package uses the [Pybind11 C++ library](https://pybind11.readthedocs.io) to create the bindings.

To install the package, use the command (from the directory containing ``pyproject.toml``)
To install the package, use the command

```bash
pip install .
pip install memilio-simulation
```

This builds the C++ library and C++ Python extension module and copies everything required to your site-packages.
Expand All @@ -30,7 +30,7 @@ Alternatively, edit the `CMakeCache.txt` in the directory created by scikit-buil

## Development

For developement of the cpp bindings use
For developement of the cpp bindings use the following command from the root of this repository (i.e. the directory containing ``pyproject.toml``)

```bash
pip install -e .[dev]
Expand Down
39 changes: 0 additions & 39 deletions pycode/memilio-simulation/pyproject.toml

This file was deleted.

50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
[project]
name = "memilio-simulation"
version = "2.3.0"
# dynamic = ["version"]
description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations."
readme = "README.md"
requires-python = ">=3.8"
license = { text = "Apache-2.0" }
authors = [{ name = "MEmilio Team" }]
maintainers = [
{ email = "martin.kuehn@dlr.de" }
]
dependencies = [
# smaller numpy versions cause a security issue, 1.25 does not work together with pyfakefs
"numpy>=1.22,!=1.25.*",
# smaller pandas versions contain a bug that sometimes prevents reading
"pandas>=2.0.0"
]

[project.optional-dependencies]
dev = []

[project.urls]
Homepage = "https://github.com/SciCompMod/memilio"
Team = "https://memilio.readthedocs.io/en/latest/team.html"

[build-system]
requires = [
"scikit-build-core>=0.9.0",
"setuptools>=68",
"setuptools-scm>=8",
"wheel"
]
build-backend = "scikit_build_core.build"

[tool.scikit-build]
cmake.version = ">=3.13"
cmake.args = ["-DMEMILIO_BUILD_SHARED_LIBS:BOOL=ON"]
wheel.packages = ["pycode/memilio-simulation/memilio"]
wheel.install-dir = "memilio/simulation"
build-dir = "pycode/build/memilio-simulation"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"

[tool.setuptools_scm]
local_scheme = "no-local-version"

[tool.cibuildwheel]
# Disable some wheels
skip = ["pp*", "*musllinux*", "*-win32"]

[tool.autopep8]
max-line-length = 79

Expand Down
Loading