From 24f1e7c732c3b6300f3c70c7f5d5aa600065cf33 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 23 Feb 2026 08:58:29 +0100 Subject: [PATCH 01/74] building source distribution works --- CMakeLists.txt | 10 ++++++ pycode/memilio-simulation/CMakeLists.txt | 9 ----- pycode/memilio-simulation/pyproject.toml | 39 -------------------- pyproject.toml | 45 +++++++++++++++++++++++- 4 files changed, 54 insertions(+), 49 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 pycode/memilio-simulation/pyproject.toml diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..15b092d12f --- /dev/null +++ b/CMakeLists.txt @@ -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) \ No newline at end of file diff --git a/pycode/memilio-simulation/CMakeLists.txt b/pycode/memilio-simulation/CMakeLists.txt index f54390d920..94ae9184b0 100644 --- a/pycode/memilio-simulation/CMakeLists.txt +++ b/pycode/memilio-simulation/CMakeLists.txt @@ -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) @@ -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) diff --git a/pycode/memilio-simulation/pyproject.toml b/pycode/memilio-simulation/pyproject.toml deleted file mode 100644 index d7bc24b90f..0000000000 --- a/pycode/memilio-simulation/pyproject.toml +++ /dev/null @@ -1,39 +0,0 @@ -[build-system] -requires = [ - "scikit-build-core>=0.9.0", - "setuptools>=68", - "wheel" -] -build-backend = "scikit_build_core.build" - -[project] -name = "memilio-simulation" -version = "1.0.0" -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" - -[tool.scikit-build] -cmake.version = ">=3.13" -cmake.args = ["-DMEMILIO_BUILD_SHARED_LIBS:BOOL=ON"] -wheel.packages = ["memilio"] -wheel.install-dir = "memilio/simulation" -build-dir = "../build/memilio-simulation" diff --git a/pyproject.toml b/pyproject.toml index 2f12cc6b19..fec49ef467 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,4 +3,47 @@ max-line-length = 79 [tool.pyright] include = ["pycode"] -exclude = ["pycode/memilio-simulation"] \ No newline at end of file +exclude = ["pycode/memilio-simulation"] + +[build-system] +requires = [ + "scikit-build-core>=0.9.0", + "setuptools>=68", + "wheel" +] +build-backend = "scikit_build_core.build" + +[project] +name = "memilio-simulation" +version = "1.0.0" +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" + +[tool.scikit-build] +cmake.version = ">=3.13" +cmake.args = ["-DMEMILIO_BUILD_SHARED_LIBS:BOOL=ON"] +wheel.packages = ["memilio"] +wheel.install-dir = "memilio/simulation" +build-dir = "../build/memilio-simulation" + +[tool.setuptools] +packages = ["pycode/memilio-simulation"] From 467748305f3c4177e31f93ef9427f4558724244c Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:57:47 +0100 Subject: [PATCH 02/74] try building wheels with ci --- .github/workflows/build_wheels.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/build_wheels.yml diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml new file mode 100644 index 0000000000..a948125dce --- /dev/null +++ b/.github/workflows/build_wheels.yml @@ -0,0 +1,19 @@ +name: Build wheels + +on: [pull_request, release] + +jobs: + build_wheels: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v4 + + - uses: pypa/cibuildwheel@v2.16 + + - uses: actions/upload-artifact@v4 + with: + path: ./wheelhouse/*.whl \ No newline at end of file From fe6706c5e9c4a25e363bec1963c27c8c92a18e73 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:36:51 +0100 Subject: [PATCH 03/74] [ci skip] try only ubuntu --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index a948125dce..48e4bccd64 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 From 6b35ba7483365380b8d07a6c2ef0a7e0562cad8c Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:38:38 +0100 Subject: [PATCH 04/74] test --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 48e4bccd64..3c7019f73d 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,4 +1,4 @@ -name: Build wheels +name: Build wheels on: [pull_request, release] From 369342fe5af1de461657fba4679444833539bc7b Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:36:22 +0100 Subject: [PATCH 05/74] require higher pybind version --- .github/workflows/epidata_main.yml | 294 ++++++------- .github/workflows/main.yml | 660 ++++++++++++++--------------- .github/workflows/message_bot.yml | 226 +++++----- pyproject.toml | 1 + 4 files changed, 591 insertions(+), 590 deletions(-) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index 3cd8fea21b..e8e84dd564 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -1,158 +1,158 @@ -name: Epidata-CI +# name: Epidata-CI -on: - schedule: - - cron: "40 1 * * *" - push: - branches: - - 'main' - tags: - - version-* - paths: - - '**/memilio-epidata/**' - - '.github/**' - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - paths: - - '**/memilio-epidata/**' - - '.github/**' - workflow_dispatch: +# on: +# schedule: +# - cron: "40 1 * * *" +# push: +# branches: +# - 'main' +# tags: +# - version-* +# paths: +# - '**/memilio-epidata/**' +# - '.github/**' +# pull_request: +# types: [opened, reopened, synchronize, ready_for_review] +# paths: +# - '**/memilio-epidata/**' +# - '.github/**' +# workflow_dispatch: -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - uses: pre-commit/action@v3.0.1 +# jobs: +# pre-commit: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-python@v5 +# with: +# python-version: 3.12 +# - uses: pre-commit/action@v3.0.1 - build-py-epidata: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-py - with: - package: epidata +# build-py-epidata: +# runs-on: ubuntu-latest +# container: quay.io/pypa/manylinux_2_28_x86_64 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/build-py +# with: +# package: epidata - build-py-plot: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-py - with: - package: plot +# build-py-plot: +# if: github.event.pull_request.draft == false +# runs-on: ubuntu-latest +# container: quay.io/pypa/manylinux_2_28_x86_64 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/build-py +# with: +# package: plot - test-py-epidata: - needs: build-py-epidata - strategy: - matrix: - version: ["3.8", "3.12"] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-py - with: - version: ${{ matrix.version }} - package: epidata - coverage: ON +# test-py-epidata: +# needs: build-py-epidata +# strategy: +# matrix: +# version: ["3.8", "3.12"] +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-py +# with: +# version: ${{ matrix.version }} +# package: epidata +# coverage: ON - test-py-plot: - if: github.event.pull_request.draft == false - needs: [build-py-plot, build-py-epidata] - strategy: - matrix: - version: ["3.8", "3.12"] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-py - with: - version: ${{ matrix.version }} - package: plot - coverage: ON +# test-py-plot: +# if: github.event.pull_request.draft == false +# needs: [build-py-plot, build-py-epidata] +# strategy: +# matrix: +# version: ["3.8", "3.12"] +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-py +# with: +# version: ${{ matrix.version }} +# package: plot +# coverage: ON - merge-artifacts: - runs-on: ubuntu-latest - strategy: - matrix: - packages: [epidata, plot] - needs: [test-py-plot, test-py-epidata] - steps: - - name: merge epidata reports - uses: actions/upload-artifact/merge@v4 - with: - name: test-py-coverage-reports-${{ matrix.packages }} - pattern: test-py-coverage-reports-${{ matrix.packages }}-* +# merge-artifacts: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# packages: [epidata, plot] +# needs: [test-py-plot, test-py-epidata] +# steps: +# - name: merge epidata reports +# uses: actions/upload-artifact/merge@v4 +# with: +# name: test-py-coverage-reports-${{ matrix.packages }} +# pattern: test-py-coverage-reports-${{ matrix.packages }}-* - test-pylint-epidata: - needs: build-py-epidata - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-pylint - with: - package: epidata +# test-pylint-epidata: +# needs: build-py-epidata +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-pylint +# with: +# package: epidata - test-pylint-plot: - needs: build-py-plot - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-pylint - with: - package: plot +# test-pylint-plot: +# needs: build-py-plot +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-pylint +# with: +# package: plot - download-data: - needs: build-py-epidata - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: | - sudo apt-get -qq update - sudo apt-get -qq -y install python3-pip gnupg - python -m pip install --upgrade pip - - name: Download Python Wheels - uses: actions/download-artifact@v4 - with: - name: python-wheels-epidata - path: pycode/wheelhouse - - name: Set up Python 3.12 - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: Install Python Wheels - run: | - for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific - for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific - - name: Download Data - run: | - mkdir -p data_dl - getcasedata -o data_dl --no-progress-indicators - getpopuldata -o data_dl --no-progress-indicators - getjhdata -o data_dl --no-progress-indicators - getdividata -o data_dl --no-progress-indicators - getcommutermobility -o data_dl --no-progress-indicators - getvaccinationdata -o data_dl --no-progress-indicators - gethospitalizationdata -o data_dl --no-progress-indicators - - name: Upload Data - uses: actions/upload-artifact@v4 - with: - name: data - path: | - data_dl/*.json - data_dl/Germany/*.json - data_dl/Spain/*.json - data_dl/France/*.json - data_dl/Italy*.json - data_dl/SouthKorea/*.json - data_dl/US/*.json - data_dl/China/*.json - retention-days: 1 +# download-data: +# needs: build-py-epidata +# runs-on: ubuntu-latest +# continue-on-error: true +# steps: +# - uses: actions/checkout@v4 +# - name: Install dependencies +# run: | +# sudo apt-get -qq update +# sudo apt-get -qq -y install python3-pip gnupg +# python -m pip install --upgrade pip +# - name: Download Python Wheels +# uses: actions/download-artifact@v4 +# with: +# name: python-wheels-epidata +# path: pycode/wheelhouse +# - name: Set up Python 3.12 +# uses: actions/setup-python@v5 +# with: +# python-version: 3.12 +# - name: Install Python Wheels +# run: | +# for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific +# for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific +# - name: Download Data +# run: | +# mkdir -p data_dl +# getcasedata -o data_dl --no-progress-indicators +# getpopuldata -o data_dl --no-progress-indicators +# getjhdata -o data_dl --no-progress-indicators +# getdividata -o data_dl --no-progress-indicators +# getcommutermobility -o data_dl --no-progress-indicators +# getvaccinationdata -o data_dl --no-progress-indicators +# gethospitalizationdata -o data_dl --no-progress-indicators +# - name: Upload Data +# uses: actions/upload-artifact@v4 +# with: +# name: data +# path: | +# data_dl/*.json +# data_dl/Germany/*.json +# data_dl/Spain/*.json +# data_dl/France/*.json +# data_dl/Italy*.json +# data_dl/SouthKorea/*.json +# data_dl/US/*.json +# data_dl/China/*.json +# retention-days: 1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b87795d7bd..4bafd6e343 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,355 +1,355 @@ -name: CI +# name: CI -on: - schedule: - - cron: "40 2 * * *" - push: - branches: - - "main" - tags: - - version-* - paths-ignore: - - "**/memilio-epidata/**" - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - paths-ignore: - - "**/memilio-epidata/**" - workflow_dispatch: +# on: +# schedule: +# - cron: "40 2 * * *" +# push: +# branches: +# - "main" +# tags: +# - version-* +# paths-ignore: +# - "**/memilio-epidata/**" +# pull_request: +# types: [opened, reopened, synchronize, ready_for_review] +# paths-ignore: +# - "**/memilio-epidata/**" +# workflow_dispatch: -concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }} +# cancel-in-progress: true -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - uses: pre-commit/action@v3.0.1 +# jobs: +# pre-commit: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-python@v5 +# with: +# python-version: 3.12 +# - uses: pre-commit/action@v3.0.1 - build-cpp-gcc_clang: - if: github.event.pull_request.draft == false - strategy: - matrix: - compiler: ["gcc", "clang"] - config: ["Debug", "Release"] - version: ["latest", "min"] - include: - - version: "latest" - os: "ubuntu-latest" - - version: "min" - os: "ubuntu-22.04" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-build - with: - compiler: ${{ matrix.compiler }} - config: ${{ matrix.config }} - version: ${{ matrix.version }} - coverage: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} # `c && t || f` is (usually) equivalent to `c ? t : f` - sanitizers: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} +# build-cpp-gcc_clang: +# if: github.event.pull_request.draft == false +# strategy: +# matrix: +# compiler: ["gcc", "clang"] +# config: ["Debug", "Release"] +# version: ["latest", "min"] +# include: +# - version: "latest" +# os: "ubuntu-latest" +# - version: "min" +# os: "ubuntu-22.04" +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-build +# with: +# compiler: ${{ matrix.compiler }} +# config: ${{ matrix.config }} +# version: ${{ matrix.version }} +# coverage: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} # `c && t || f` is (usually) equivalent to `c ? t : f` +# sanitizers: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} - build-cpp-gcc-no-optional-deps: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-build - with: - compiler: gcc - version: latest - config: Release - optional-dependencies: OFF +# build-cpp-gcc-no-optional-deps: +# if: github.event.pull_request.draft == false +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-build +# with: +# compiler: gcc +# version: latest +# config: Release +# optional-dependencies: OFF - build-cpp-gcc-openmp: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-build - with: - compiler: gcc - version: latest - config: Release - openmp: ON +# build-cpp-gcc-openmp: +# if: github.event.pull_request.draft == false +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-build +# with: +# compiler: gcc +# version: latest +# config: Release +# openmp: ON - build-cpp-msvc: - if: github.event.pull_request.draft == false - strategy: - matrix: - config: ["Debug", "Release"] - version: ["latest", "min"] - include: - - version: "latest" - os: "windows-2025" - - version: "min" - os: "windows-2022" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/windows-build - with: - config: ${{ matrix.config }} - version: ${{ matrix.version }} +# build-cpp-msvc: +# if: github.event.pull_request.draft == false +# strategy: +# matrix: +# config: ["Debug", "Release"] +# version: ["latest", "min"] +# include: +# - version: "latest" +# os: "windows-2025" +# - version: "min" +# os: "windows-2022" +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/windows-build +# with: +# config: ${{ matrix.config }} +# version: ${{ matrix.version }} - build-cpp-msvc-no-optional-deps: - if: github.event.pull_request.draft == false - runs-on: windows-2025 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/windows-build - with: - config: Release - version: latest - optional-dependencies: OFF +# build-cpp-msvc-no-optional-deps: +# if: github.event.pull_request.draft == false +# runs-on: windows-2025 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/windows-build +# with: +# config: Release +# version: latest +# optional-dependencies: OFF - test-cpp-gcc_clang: - if: github.event.pull_request.draft == false - needs: build-cpp-gcc_clang - strategy: - matrix: - compiler: ["gcc", "clang"] - config: ["Debug", "Release"] - version: ["latest", "min"] - include: - - version: "latest" - os: "ubuntu-latest" - - version: "min" - os: "ubuntu-22.04" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-test - with: - artifact-pattern: ${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} - coverage: ${{ (matrix.compiler == 'gcc' && matrix.version == 'latest' && matrix.config == 'Debug') && 'ON' || 'OFF' }} +# test-cpp-gcc_clang: +# if: github.event.pull_request.draft == false +# needs: build-cpp-gcc_clang +# strategy: +# matrix: +# compiler: ["gcc", "clang"] +# config: ["Debug", "Release"] +# version: ["latest", "min"] +# include: +# - version: "latest" +# os: "ubuntu-latest" +# - version: "min" +# os: "ubuntu-22.04" +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-test +# with: +# artifact-pattern: ${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} +# coverage: ${{ (matrix.compiler == 'gcc' && matrix.version == 'latest' && matrix.config == 'Debug') && 'ON' || 'OFF' }} - test-cpp-gcc-sbml: - if: github.event.pull_request.draft == false - needs: build-cpp-gcc_clang - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/sbml-test +# test-cpp-gcc-sbml: +# if: github.event.pull_request.draft == false +# needs: build-cpp-gcc_clang +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/sbml-test - merge-test-artifacts: - needs: [test-cpp-gcc_clang, test-cpp-msvc, test-py-surrogatemodel] - runs-on: ubuntu-latest - steps: - - name: merge-coverage-artifacts - uses: actions/upload-artifact/merge@v4 - with: - name: test-cpp-coverage-reports - pattern: test-cpp-coverage-reports-* - - name: merge-linux-artifacts - uses: actions/upload-artifact/merge@v4 - with: - name: test-cpp-linux-report - pattern: test-cpp-linux-report-* - - name: merge-windows-artifacts - uses: actions/upload-artifact/merge@v4 - with: - name: test-cpp-win-report - pattern: test-cpp-win-report-* - - name: merge python reports - uses: actions/upload-artifact/merge@v4 - with: - name: test-py-coverage-reports-surrogatemodel - pattern: test-py-coverage-reports-surrogatemodel-* +# merge-test-artifacts: +# needs: [test-cpp-gcc_clang, test-cpp-msvc, test-py-surrogatemodel] +# runs-on: ubuntu-latest +# steps: +# - name: merge-coverage-artifacts +# uses: actions/upload-artifact/merge@v4 +# with: +# name: test-cpp-coverage-reports +# pattern: test-cpp-coverage-reports-* +# - name: merge-linux-artifacts +# uses: actions/upload-artifact/merge@v4 +# with: +# name: test-cpp-linux-report +# pattern: test-cpp-linux-report-* +# - name: merge-windows-artifacts +# uses: actions/upload-artifact/merge@v4 +# with: +# name: test-cpp-win-report +# pattern: test-cpp-win-report-* +# - name: merge python reports +# uses: actions/upload-artifact/merge@v4 +# with: +# name: test-py-coverage-reports-surrogatemodel +# pattern: test-py-coverage-reports-surrogatemodel-* - test-cpp-gcc-no-optional-deps: - if: github.event.pull_request.draft == false - needs: build-cpp-gcc-no-optional-deps - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-test - with: - artifact-pattern: gcc-latest-Release - optional-deps: OFF +# test-cpp-gcc-no-optional-deps: +# if: github.event.pull_request.draft == false +# needs: build-cpp-gcc-no-optional-deps +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-test +# with: +# artifact-pattern: gcc-latest-Release +# optional-deps: OFF - test-cpp-gcc-openmp: - if: github.event.pull_request.draft == false - needs: build-cpp-gcc-openmp - runs-on: ubuntu-latest - timeout-minutes: 30 - env: - OMP_NUM_THREADS: 4 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-test - with: - artifact-pattern: gcc-latest-Release - num-repeat: 10 - openmp: ON +# test-cpp-gcc-openmp: +# if: github.event.pull_request.draft == false +# needs: build-cpp-gcc-openmp +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# env: +# OMP_NUM_THREADS: 4 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-test +# with: +# artifact-pattern: gcc-latest-Release +# num-repeat: 10 +# openmp: ON - test-cpp-msvc: - if: github.event.pull_request.draft == false - needs: build-cpp-msvc - strategy: - matrix: - config: ["Debug", "Release"] - version: ["latest", "min"] - include: - - version: "latest" - os: "windows-2025" - - version: "min" - os: "windows-2022" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/windows-test - with: - artifact-pattern: msvc-${{ matrix.version }}-${{ matrix.config }} +# test-cpp-msvc: +# if: github.event.pull_request.draft == false +# needs: build-cpp-msvc +# strategy: +# matrix: +# config: ["Debug", "Release"] +# version: ["latest", "min"] +# include: +# - version: "latest" +# os: "windows-2025" +# - version: "min" +# os: "windows-2022" +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/windows-test +# with: +# artifact-pattern: msvc-${{ matrix.version }}-${{ matrix.config }} - test-cpp-msvc-no-optional-deps: - if: github.event.pull_request.draft == false - needs: build-cpp-msvc-no-optional-deps - runs-on: windows-2025 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/windows-test - with: - artifact-pattern: msvc-latest-Release - optional-deps: OFF +# test-cpp-msvc-no-optional-deps: +# if: github.event.pull_request.draft == false +# needs: build-cpp-msvc-no-optional-deps +# runs-on: windows-2025 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/windows-test +# with: +# artifact-pattern: msvc-latest-Release +# optional-deps: OFF - run_examples-cpp-gcc_clang: - if: github.event.pull_request.draft == false - needs: build-cpp-gcc_clang - strategy: - matrix: - compiler: ["gcc", "clang"] - config: ["Debug", "Release"] - version: ["latest", "min"] - include: - - version: "latest" - os: "ubuntu-latest" - - version: "min" - os: "ubuntu-22.04" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/linux-run_examples - with: - build-artifact: build-cpp-linux-${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} +# run_examples-cpp-gcc_clang: +# if: github.event.pull_request.draft == false +# needs: build-cpp-gcc_clang +# strategy: +# matrix: +# compiler: ["gcc", "clang"] +# config: ["Debug", "Release"] +# version: ["latest", "min"] +# include: +# - version: "latest" +# os: "ubuntu-latest" +# - version: "min" +# os: "ubuntu-22.04" +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/linux-run_examples +# with: +# build-artifact: build-cpp-linux-${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} - run_examples-cpp-msvc: - if: github.event.pull_request.draft == false - needs: build-cpp-msvc - strategy: - matrix: - config: ["Debug", "Release"] - version: ["latest", "min"] - include: - - version: "latest" - os: "windows-2025" - - version: "min" - os: "windows-2022" - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/windows-run_examples - with: - build-artifact: build-cpp-windows-msvc-${{ matrix.version }}-${{ matrix.config }} +# run_examples-cpp-msvc: +# if: github.event.pull_request.draft == false +# needs: build-cpp-msvc +# strategy: +# matrix: +# config: ["Debug", "Release"] +# version: ["latest", "min"] +# include: +# - version: "latest" +# os: "windows-2025" +# - version: "min" +# os: "windows-2022" +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/windows-run_examples +# with: +# build-artifact: build-cpp-windows-msvc-${{ matrix.version }}-${{ matrix.config }} - build-py-generation: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-py - with: - package: generation +# build-py-generation: +# if: github.event.pull_request.draft == false +# runs-on: ubuntu-latest +# container: quay.io/pypa/manylinux_2_28_x86_64 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/build-py +# with: +# package: generation - build-py-simulation: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-py - with: - package: simulation +# build-py-simulation: +# if: github.event.pull_request.draft == false +# runs-on: ubuntu-latest +# container: quay.io/pypa/manylinux_2_28_x86_64 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/build-py +# with: +# package: simulation - build-py-surrogatemodel: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/build-py - with: - package: surrogatemodel +# build-py-surrogatemodel: +# if: github.event.pull_request.draft == false +# runs-on: ubuntu-latest +# container: quay.io/pypa/manylinux_2_28_x86_64 +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/build-py +# with: +# package: surrogatemodel - test-py-generation: - if: github.event.pull_request.draft == false - strategy: - matrix: - version: ["3.8", "3.12"] - needs: build-py-generation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-py - with: - package: generation +# test-py-generation: +# if: github.event.pull_request.draft == false +# strategy: +# matrix: +# version: ["3.8", "3.12"] +# needs: build-py-generation +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-py +# with: +# package: generation - test-py-simulation: - if: github.event.pull_request.draft == false - needs: build-py-simulation - strategy: - matrix: - version: ["3.8", "3.12"] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-py - with: - package: simulation +# test-py-simulation: +# if: github.event.pull_request.draft == false +# needs: build-py-simulation +# strategy: +# matrix: +# version: ["3.8", "3.12"] +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-py +# with: +# package: simulation - test-py-surrogatemodel: - if: github.event.pull_request.draft == false - needs: [build-py-surrogatemodel, build-py-simulation] - strategy: - matrix: - version: ["3.8", "3.12"] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/test-py - with: - version: ${{ matrix.version }} - package: surrogatemodel - coverage: ON +# test-py-surrogatemodel: +# if: github.event.pull_request.draft == false +# needs: [build-py-surrogatemodel, build-py-simulation] +# strategy: +# matrix: +# version: ["3.8", "3.12"] +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: ./.github/actions/test-py +# with: +# version: ${{ matrix.version }} +# package: surrogatemodel +# coverage: ON - codecov: - if: github.event.pull_request.draft == false - needs: merge-test-artifacts - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: | - sudo apt-get -qq update - sudo apt-get -qq -y install git curl - - name: Download python coverage report - uses: actions/download-artifact@v4 - with: - name: test-py-coverage-reports-surrogatemodel - - name: Download cpp coverage report - uses: actions/download-artifact@v4 - with: - name: test-cpp-coverage-reports - - name: Deploy to codecov.io - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - directory: ./coverage_python - files: ./coverage_python/**,./coverage.info - verbose: true +# codecov: +# if: github.event.pull_request.draft == false +# needs: merge-test-artifacts +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Install dependencies +# run: | +# sudo apt-get -qq update +# sudo apt-get -qq -y install git curl +# - name: Download python coverage report +# uses: actions/download-artifact@v4 +# with: +# name: test-py-coverage-reports-surrogatemodel +# - name: Download cpp coverage report +# uses: actions/download-artifact@v4 +# with: +# name: test-cpp-coverage-reports +# - name: Deploy to codecov.io +# uses: codecov/codecov-action@v3 +# with: +# token: ${{ secrets.CODECOV_TOKEN }} +# directory: ./coverage_python +# files: ./coverage_python/**,./coverage.info +# verbose: true diff --git a/.github/workflows/message_bot.yml b/.github/workflows/message_bot.yml index cd4f322ca1..55fdb1545d 100644 --- a/.github/workflows/message_bot.yml +++ b/.github/workflows/message_bot.yml @@ -1,134 +1,134 @@ -# .github/workflows/discussion-monitor.yml -name: Discussion Monitor +# # .github/workflows/discussion-monitor.yml +# name: Discussion Monitor -on: - schedule: - - cron: '0 9 * * *' +# on: +# schedule: +# - cron: '0 9 * * *' -jobs: - check-discussions: - runs-on: ubuntu-latest - permissions: - contents: read - discussions: read - steps: - - name: Check for new discussions - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} - run: | - npm install @octokit/rest - cat > check.js << 'EOF' - const { Octokit } = require('@octokit/rest'); +# jobs: +# check-discussions: +# runs-on: ubuntu-latest +# permissions: +# contents: read +# discussions: read +# steps: +# - name: Check for new discussions +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} +# run: | +# npm install @octokit/rest +# cat > check.js << 'EOF' +# const { Octokit } = require('@octokit/rest'); - const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); +# const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); - async function check() { - const since = new Date(); - since.setHours(since.getHours() - 25); +# async function check() { +# const since = new Date(); +# since.setHours(since.getHours() - 25); - const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); - console.log(`Checking discussions for ${owner}/${repo}`); +# const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); +# console.log(`Checking discussions for ${owner}/${repo}`); - try { - const response = await octokit.graphql(` - query { - repository(owner: "${owner}", name: "${repo}") { - discussions(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) { - nodes { - createdAt - title - url - number - author { - login - } - category { - name - emoji - } - } - } - } - } - `); +# try { +# const response = await octokit.graphql(` +# query { +# repository(owner: "${owner}", name: "${repo}") { +# discussions(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) { +# nodes { +# createdAt +# title +# url +# number +# author { +# login +# } +# category { +# name +# emoji +# } +# } +# } +# } +# } +# `); - console.log('Full GraphQL response:', JSON.stringify(response, null, 2)); +# console.log('Full GraphQL response:', JSON.stringify(response, null, 2)); - if (!response || !response.repository) { - console.log('Repository not found or discussions not enabled'); - console.log('Response keys:', Object.keys(response || {})); - return; - } +# if (!response || !response.repository) { +# console.log('Repository not found or discussions not enabled'); +# console.log('Response keys:', Object.keys(response || {})); +# return; +# } - if (!response.repository.discussions) { - console.log('Discussions not available for this repository'); - return; - } +# if (!response.repository.discussions) { +# console.log('Discussions not available for this repository'); +# return; +# } - const newDiscussions = response.repository.discussions.nodes.filter( - d => new Date(d.createdAt) > since - ); +# const newDiscussions = response.repository.discussions.nodes.filter( +# d => new Date(d.createdAt) > since +# ); - console.log(`Found ${newDiscussions.length} new discussions`); +# console.log(`Found ${newDiscussions.length} new discussions`); - if (newDiscussions.length > 0) { - let message; +# if (newDiscussions.length > 0) { +# let message; - if (newDiscussions.length === 1) { - const discussion = newDiscussions[0]; - message = { - text: `${discussion.category.emoji || '💬'} New Discussion on ${owner}/${repo} +# if (newDiscussions.length === 1) { +# const discussion = newDiscussions[0]; +# message = { +# text: `${discussion.category.emoji || '💬'} New Discussion on ${owner}/${repo} - **[${discussion.title}](${discussion.url})** +# **[${discussion.title}](${discussion.url})** - 👤 **Author:** ${discussion.author.login} - 📂 **Category:** ${discussion.category.name} - 🔢 **Discussion #${discussion.number}**`, - username: "GitHub Discussion Bot", - icon_emoji: ":github:" - }; - } else { - const discussionList = newDiscussions.map(d => - `- ${d.category.emoji || '💬'} **[${d.title}](${d.url})** by ${d.author.login}` - ).join('\n'); +# 👤 **Author:** ${discussion.author.login} +# 📂 **Category:** ${discussion.category.name} +# 🔢 **Discussion #${discussion.number}**`, +# username: "GitHub Discussion Bot", +# icon_emoji: ":github:" +# }; +# } else { +# const discussionList = newDiscussions.map(d => +# `- ${d.category.emoji || '💬'} **[${d.title}](${d.url})** by ${d.author.login}` +# ).join('\n'); - message = { - text: `🎉 ${newDiscussions.length} New Discussions on ${owner}/${repo} +# message = { +# text: `🎉 ${newDiscussions.length} New Discussions on ${owner}/${repo} - ${discussionList} +# ${discussionList} - --- - *Check out the latest discussions above!*`, - username: "GitHub Discussion Bot", - icon_emoji: ":github:" - }; - } +# --- +# *Check out the latest discussions above!*`, +# username: "GitHub Discussion Bot", +# icon_emoji: ":github:" +# }; +# } - const response = await fetch(process.env.MATTERMOST_WEBHOOK_URL, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(message) - }); - console.log('Mattermost notification sent'); - } - } catch (error) { - console.error('Error details:', error); - if (process.env.MATTERMOST_WEBHOOK_URL) { - await fetch(process.env.MATTERMOST_WEBHOOK_URL, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ - text: '⚠️ **GitHub Discussion Bot Error**\nThere was an error checking discussions. Please check the workflow logs.', - username: "GitHub Discussion Bot", - icon_emoji: ":warning:" - }) - }); - } - } - } +# const response = await fetch(process.env.MATTERMOST_WEBHOOK_URL, { +# method: 'POST', +# headers: { 'Content-Type': 'application/json' }, +# body: JSON.stringify(message) +# }); +# console.log('Mattermost notification sent'); +# } +# } catch (error) { +# console.error('Error details:', error); +# if (process.env.MATTERMOST_WEBHOOK_URL) { +# await fetch(process.env.MATTERMOST_WEBHOOK_URL, { +# method: 'POST', +# headers: { 'Content-Type': 'application/json' }, +# body: JSON.stringify({ +# text: '⚠️ **GitHub Discussion Bot Error**\nThere was an error checking discussions. Please check the workflow logs.', +# username: "GitHub Discussion Bot", +# icon_emoji: ":warning:" +# }) +# }); +# } +# } +# } - check().catch(console.error); - EOF - node check.js +# check().catch(console.error); +# EOF +# node check.js diff --git a/pyproject.toml b/pyproject.toml index fec49ef467..e9b66a9e66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ requires = [ "scikit-build-core>=0.9.0", "setuptools>=68", "wheel" + "pybind11>=2.11.2" ] build-backend = "scikit_build_core.build" From c13105fbc38cd9e9de949ce6b17b83f05c591870 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:39:51 +0100 Subject: [PATCH 06/74] add comma --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e9b66a9e66..2f298e1118 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ exclude = ["pycode/memilio-simulation"] requires = [ "scikit-build-core>=0.9.0", "setuptools>=68", - "wheel" + "wheel", "pybind11>=2.11.2" ] build-backend = "scikit_build_core.build" From e25c2184b4ebe7b209d0c51d55db3215d1a9af6a Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:37:35 +0100 Subject: [PATCH 07/74] skip some pypy versions --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2f298e1118..cc1c221201 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,3 +48,7 @@ build-dir = "../build/memilio-simulation" [tool.setuptools] packages = ["pycode/memilio-simulation"] + +[tool.cibuildwheel] +# Disable building PyPy 3.8 and 3.9 wheels on all platforms +skip = ["pp38-*", "pp39-*"] From 69a5b96a3aaaee6832cd02d7cb59553c166673c6 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:57:57 +0100 Subject: [PATCH 08/74] skip all pypy versions --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cc1c221201..e491bed7aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,5 +50,5 @@ build-dir = "../build/memilio-simulation" packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] -# Disable building PyPy 3.8 and 3.9 wheels on all platforms -skip = ["pp38-*", "pp39-*"] +# Disable building PyPy wheels on all platforms +skip = ["pp*"] From 73a7fbc453d3d0a3d3964b6277c54648e813b949 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:49:51 +0100 Subject: [PATCH 09/74] skip musllinux --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e491bed7aa..d34c2f6c2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,4 +51,5 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable building PyPy wheels on all platforms -skip = ["pp*"] +skip = ["pp*", "*musllinux*"] +skip = ["*_i686"] # these work, skip for further testing From 6ca71df7af474c4c0591e71769861e085879897a Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:52:09 +0100 Subject: [PATCH 10/74] fix --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d34c2f6c2f..6358fafdec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,5 +51,4 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable building PyPy wheels on all platforms -skip = ["pp*", "*musllinux*"] -skip = ["*_i686"] # these work, skip for further testing +skip = ["pp*", "*musllinux*", "*_i686"] # "*_i686" works, skip for now for further testing From 265a58c9c5d355f3a2df614d6dfbce974d5eb9ae Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 16:16:34 +0100 Subject: [PATCH 11/74] test windows --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 3c7019f73d..aaa02519cf 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [windows-latest] steps: - uses: actions/checkout@v4 From 22c73cbcb42b02c710ffb6f0379540a8e2f327b0 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 25 Feb 2026 16:45:36 +0100 Subject: [PATCH 12/74] skip win32 --- pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6358fafdec..d3eb152a96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,8 +9,7 @@ exclude = ["pycode/memilio-simulation"] requires = [ "scikit-build-core>=0.9.0", "setuptools>=68", - "wheel", - "pybind11>=2.11.2" + "wheel" ] build-backend = "scikit_build_core.build" @@ -51,4 +50,4 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable building PyPy wheels on all platforms -skip = ["pp*", "*musllinux*", "*_i686"] # "*_i686" works, skip for now for further testing +skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing From 02edbf2d3bb79a25b6c113d600e4836322175cb0 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 09:20:20 +0100 Subject: [PATCH 13/74] test macos --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index aaa02519cf..a4ef4c49d9 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest] + os: [macos-latest] steps: - uses: actions/checkout@v4 From a1d4085d3e847f9df138cd13bceb37f6e2b81476 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 09:57:00 +0100 Subject: [PATCH 14/74] skip macosx_arm64 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d3eb152a96..b709e83ee8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,4 +50,4 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable building PyPy wheels on all platforms -skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing +skip = ["pp*", "*musllinux*", "*_i686", "*-win32", "*-macosx_arm64"] # "*_i686" works, skip for now for further testing From 59e454a3705dd92875c260d12eade58744c3c2f6 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:14:00 +0100 Subject: [PATCH 15/74] test --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b709e83ee8..066f2c4ee4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,4 +50,5 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable building PyPy wheels on all platforms -skip = ["pp*", "*musllinux*", "*_i686", "*-win32", "*-macosx_arm64"] # "*_i686" works, skip for now for further testing +build = ["*-macosx_x86_64", "*-macosx_universal2"] +skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing From b4febe3c088d2a4c8b3ef2e1601a8da8da390e7a Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:19:02 +0100 Subject: [PATCH 16/74] test --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 066f2c4ee4..254f60d429 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,5 +50,7 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable building PyPy wheels on all platforms -build = ["*-macosx_x86_64", "*-macosx_universal2"] +build-verbosity = 3 skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing + + From 6f2ac0a461b302925eabd45b1356d28fc79caccc Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:34:05 +0100 Subject: [PATCH 17/74] build sdist in ci --- .github/workflows/build_wheels.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index a4ef4c49d9..dcd949973a 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -3,11 +3,25 @@ name: Build wheels on: [pull_request, release] jobs: + + build_sdist: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + path: dist/*.tar.gz + + build_wheels: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 From 4b9ce8df99dd38f83cbebb5defa8781d9d881382 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 12:06:54 +0100 Subject: [PATCH 18/74] add names for artifacts --- .github/workflows/build_wheels.yml | 2 ++ pyproject.toml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index dcd949973a..f7711d163d 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -14,6 +14,7 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: sdist path: dist/*.tar.gz @@ -30,4 +31,5 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: wheels-${{ matrix.os }} path: ./wheelhouse/*.whl \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 254f60d429..ec05c47a80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,8 +49,7 @@ build-dir = "../build/memilio-simulation" packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] -# Disable building PyPy wheels on all platforms -build-verbosity = 3 +# Disable some wheels skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing From 9747c8c3eb7149f7beb0d93b5f52bb7e0568a22f Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:32:20 +0100 Subject: [PATCH 19/74] also include other python packages --- .github/workflows/build_wheels.yml | 2 +- pyproject.toml | 34 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index f7711d163d..d8ca6d7bec 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows_latest] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index ec05c47a80..260a1a979d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,5 @@ -[tool.autopep8] -max-line-length = 79 - -[tool.pyright] -include = ["pycode"] -exclude = ["pycode/memilio-simulation"] - -[build-system] -requires = [ - "scikit-build-core>=0.9.0", - "setuptools>=68", - "wheel" -] -build-backend = "scikit_build_core.build" - [project] -name = "memilio-simulation" +name = "memilio" version = "1.0.0" description = "Part of MEmilio project, python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" @@ -38,6 +23,14 @@ dev = [] 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", + "wheel" +] +build-backend = "scikit_build_core.build" + [tool.scikit-build] cmake.version = ">=3.13" cmake.args = ["-DMEMILIO_BUILD_SHARED_LIBS:BOOL=ON"] @@ -46,10 +39,17 @@ wheel.install-dir = "memilio/simulation" build-dir = "../build/memilio-simulation" [tool.setuptools] -packages = ["pycode/memilio-simulation"] +packages = ["pycode/memilio-epidata","pycode/memilio-generation","pycode/memilio-plot","pycode/memilio-simulation","pycode/memilio-surrogatemodel"] [tool.cibuildwheel] # Disable some wheels skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing +[tool.autopep8] +max-line-length = 79 + +[tool.pyright] +include = ["pycode"] +exclude = ["pycode/memilio-simulation"] + From 77bab936db076c3e30819f1f6d992a8bd239455a Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 2 Mar 2026 13:18:43 +0100 Subject: [PATCH 20/74] update --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 260a1a979d..f97d9e91e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] -name = "memilio" +name = "memilio-simulation" version = "1.0.0" -description = "Part of MEmilio project, python bindings to the C++ libraries that contain the models and simulations." +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" } @@ -39,11 +39,11 @@ wheel.install-dir = "memilio/simulation" build-dir = "../build/memilio-simulation" [tool.setuptools] -packages = ["pycode/memilio-epidata","pycode/memilio-generation","pycode/memilio-plot","pycode/memilio-simulation","pycode/memilio-surrogatemodel"] +packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable some wheels -skip = ["pp*", "*musllinux*", "*_i686", "*-win32"] # "*_i686" works, skip for now for further testing +skip = ["pp*", "*musllinux*", "*-win32"] [tool.autopep8] max-line-length = 79 From d5b9b279c1908f336b709ebde42b26babedb3e26 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:59:25 +0100 Subject: [PATCH 21/74] only windows --- .github/workflows/build_wheels.yml | 31 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index d8ca6d7bec..fec68b8fcd 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -4,25 +4,11 @@ on: [pull_request, release] jobs: - build_sdist: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - run: pipx run build --sdist - - - uses: actions/upload-artifact@v4 - with: - name: sdist - path: dist/*.tar.gz - - build_wheels: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows_latest] + os: [windows_latest] steps: - uses: actions/checkout@v4 @@ -32,4 +18,17 @@ jobs: - uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.os }} - path: ./wheelhouse/*.whl \ No newline at end of file + path: ./wheelhouse/*.whl + + build_sdist: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz \ No newline at end of file From 6951691cbe2716cc714c747839bc5b5d7455efea Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 6 Mar 2026 11:08:55 +0100 Subject: [PATCH 22/74] fix typo --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index fec68b8fcd..b007f1fe3f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows_latest] + os: [windows-latest, ubuntu-latest] steps: - uses: actions/checkout@v4 From c8253b1dd390fcdb58ed4df4bdb3c5ffb56041bf Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:17:58 +0100 Subject: [PATCH 23/74] test upload --- .github/workflows/build_wheels.yml | 26 ++++++++++++++++++++++++-- pyproject.toml | 1 + 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index b007f1fe3f..8908bd320b 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest] + os: [ubuntu-latest] # windows-latest steps: - uses: actions/checkout@v4 @@ -31,4 +31,26 @@ jobs: - uses: actions/upload-artifact@v4 with: name: sdist - path: dist/*.tar.gz \ No newline at end of file + path: dist/*.tar.gz + + upload_pypi: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + # if: github.event_name == 'release' && github.event.action == 'published' + # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) + # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/download-artifact@v5 + with: + # unpacks all CIBW artifacts into dist/ + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 + # To test uploads to TestPyPI, uncomment the following: + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f97d9e91e5..55db3926fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable some wheels +build = [cp38*] skip = ["pp*", "*musllinux*", "*-win32"] [tool.autopep8] From 682490bc16a45464b2b1d014e2166061626570f0 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:20:29 +0100 Subject: [PATCH 24/74] typo --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55db3926fe..f275f0b2d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable some wheels -build = [cp38*] +build = ["cp38*"] skip = ["pp*", "*musllinux*", "*-win32"] [tool.autopep8] From 47cd7d38316a5b2b9634699631a12f5877e23dfe Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:38:22 +0100 Subject: [PATCH 25/74] use token --- .github/workflows/build_wheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 8908bd320b..0dc10d3f61 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -53,4 +53,6 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 # To test uploads to TestPyPI, uncomment the following: with: + skip-existing: true + password: ${{ secrets.PYPI_TEST_TOKEN }} repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 2dd392fc785c2c7586b6adbb6346182de19e92f3 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:59:06 +0100 Subject: [PATCH 26/74] adapt names, no token --- .github/workflows/build_wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 0dc10d3f61..38633bf7af 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.os }} + name: cibw-wheels-${{ matrix.os }} path: ./wheelhouse/*.whl build_sdist: @@ -30,7 +30,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: sdist + name: cibw-sdist path: dist/*.tar.gz upload_pypi: @@ -54,5 +54,5 @@ jobs: # To test uploads to TestPyPI, uncomment the following: with: skip-existing: true - password: ${{ secrets.PYPI_TEST_TOKEN }} + # password: ${{ secrets.PYPI_TEST_TOKEN }} repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 55911ce1a01118d395767f9dd67715d9204714a9 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:29:44 +0100 Subject: [PATCH 27/74] try only downloading artifacts --- .github/workflows/build_wheels.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 38633bf7af..4f183e3152 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -50,9 +50,9 @@ jobs: path: dist merge-multiple: true - - uses: pypa/gh-action-pypi-publish@release/v1 - # To test uploads to TestPyPI, uncomment the following: - with: - skip-existing: true - # password: ${{ secrets.PYPI_TEST_TOKEN }} - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + # - uses: pypa/gh-action-pypi-publish@release/v1 + # # To test uploads to TestPyPI, uncomment the following: + # with: + # skip-existing: true + # # password: ${{ secrets.PYPI_TEST_TOKEN }} + # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 0700ae8fc803d507a49f833ae3158b70356c4320 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:06:26 +0100 Subject: [PATCH 28/74] try again --- .github/workflows/build_wheels.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 4f183e3152..38633bf7af 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -50,9 +50,9 @@ jobs: path: dist merge-multiple: true - # - uses: pypa/gh-action-pypi-publish@release/v1 - # # To test uploads to TestPyPI, uncomment the following: - # with: - # skip-existing: true - # # password: ${{ secrets.PYPI_TEST_TOKEN }} - # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + - uses: pypa/gh-action-pypi-publish@release/v1 + # To test uploads to TestPyPI, uncomment the following: + with: + skip-existing: true + # password: ${{ secrets.PYPI_TEST_TOKEN }} + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 881d5e686fc164696a16153d447a780b5b265746 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:22:47 +0100 Subject: [PATCH 29/74] try with new version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f275f0b2d5..11c1c97acb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "memilio-simulation" -version = "1.0.0" +version = "1.0.1" description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" requires-python = ">=3.8" From 58979cd48f6fb8a099596a780c24f22d3f425fee Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:22:27 +0100 Subject: [PATCH 30/74] update after merge of main --- .github/workflows/build_wheels.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 38633bf7af..d40ed3b093 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] # windows-latest + os: [ubuntu-latest, windows-latest] # steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 11c1c97acb..8ce0add29b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "memilio-simulation" -version = "1.0.1" +version = "1.0.2" description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" requires-python = ">=3.8" From 5376644f7ff02b239555454cec652edf3b351d48 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:33:57 +0100 Subject: [PATCH 31/74] only ubuntu --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index d40ed3b093..9999952340 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] # + os: [ubuntu-latest] # steps: - uses: actions/checkout@v4 From 8c030078aaf4fcdc739f497aa1f28095570c9e59 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:40:24 +0100 Subject: [PATCH 32/74] more cpp versions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8ce0add29b..79e5d94897 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ packages = ["pycode/memilio-simulation"] [tool.cibuildwheel] # Disable some wheels -build = ["cp38*"] +# build = ["cp38*"] skip = ["pp*", "*musllinux*", "*-win32"] [tool.autopep8] From b1d43b187efc14e71a23a693b7db2b800ef7cd86 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:16:19 +0200 Subject: [PATCH 33/74] update path --- pyproject.toml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 79e5d94897..e7797ff745 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,12 +34,9 @@ build-backend = "scikit_build_core.build" [tool.scikit-build] cmake.version = ">=3.13" cmake.args = ["-DMEMILIO_BUILD_SHARED_LIBS:BOOL=ON"] -wheel.packages = ["memilio"] +wheel.packages = ["pycode/memilio-simulation/memilio"] wheel.install-dir = "memilio/simulation" -build-dir = "../build/memilio-simulation" - -[tool.setuptools] -packages = ["pycode/memilio-simulation"] +build-dir = "pycode/build/memilio-simulation" [tool.cibuildwheel] # Disable some wheels @@ -51,6 +48,4 @@ max-line-length = 79 [tool.pyright] include = ["pycode"] -exclude = ["pycode/memilio-simulation"] - - +exclude = ["pycode/memilio-simulation"] \ No newline at end of file From 80b08ce66fb4c6cfcea64527dbbb940247bb7b93 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:20:54 +0200 Subject: [PATCH 34/74] update version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e7797ff745..b94026dce2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "memilio-simulation" -version = "1.0.2" +version = "1.0.3" description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" requires-python = ">=3.8" From ed25c02a7baaf130888601c2b1d12f9af57e568e Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:27:44 +0200 Subject: [PATCH 35/74] include windows --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 9999952340..ebb350e730 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] # + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 From c3af9ce8133459b2ac2fe514eadf4d2f8f56f445 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:35:22 +0200 Subject: [PATCH 36/74] update actions for newer node.js version --- .github/workflows/build_wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ebb350e730..e99fbb4a4a 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -11,11 +11,11 @@ jobs: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: pypa/cibuildwheel@v2.16 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: cibw-wheels-${{ matrix.os }} path: ./wheelhouse/*.whl From 21f9983c2ab575315b0d65ca9fdffa62d8d7d130 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:36:36 +0200 Subject: [PATCH 37/74] again --- .github/workflows/build_wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index e99fbb4a4a..296574f645 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -24,11 +24,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: pipx run build --sdist - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: cibw-sdist path: dist/*.tar.gz From eacb371dc92d0372f29a377cfdb019a1f3f109a5 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:51:34 +0200 Subject: [PATCH 38/74] try dynamic versioning --- .github/workflows/build_wheels.yml | 11 ++++++++--- pyproject.toml | 7 +++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 296574f645..65b6de6401 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -12,6 +12,10 @@ jobs: steps: - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v6 - uses: pypa/cibuildwheel@v2.16 @@ -25,6 +29,8 @@ jobs: steps: - uses: actions/checkout@v5 + with: + fetch-depth: 0 - run: pipx run build --sdist @@ -43,7 +49,7 @@ jobs: # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v8 with: # unpacks all CIBW artifacts into dist/ pattern: cibw-* @@ -51,8 +57,7 @@ jobs: merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 - # To test uploads to TestPyPI, uncomment the following: with: skip-existing: true - # password: ${{ secrets.PYPI_TEST_TOKEN }} + # To test uploads to TestPyPI, uncomment the following: repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b94026dce2..b83a7c4ede 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [project] name = "memilio-simulation" -version = "1.0.3" +# version = "1.0.3" +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" @@ -27,6 +28,7 @@ Team = "https://memilio.readthedocs.io/en/latest/team.html" requires = [ "scikit-build-core>=0.9.0", "setuptools>=68", + "setuptools-scm>=8", "wheel" ] build-backend = "scikit_build_core.build" @@ -37,10 +39,11 @@ 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.cibuildwheel] # Disable some wheels -# build = ["cp38*"] +build = ["cp38*"] skip = ["pp*", "*musllinux*", "*-win32"] [tool.autopep8] From c2df5956caeb20baf8f6fbbb57ef1844c68fcad8 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:18:45 +0200 Subject: [PATCH 39/74] try again --- .github/workflows/build_wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 65b6de6401..10f9cb1a27 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -59,5 +59,6 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true + verbose: true # To test uploads to TestPyPI, uncomment the following: repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From bd64248ca3be20c4817cecc86483f90b037449cb Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:39:23 +0200 Subject: [PATCH 40/74] no local version --- .github/workflows/build_wheels.yml | 2 -- pyproject.toml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 10f9cb1a27..7dda722fdd 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -15,8 +15,6 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v6 - - uses: pypa/cibuildwheel@v2.16 - uses: actions/upload-artifact@v6 diff --git a/pyproject.toml b/pyproject.toml index b83a7c4ede..3d6c003e4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,9 @@ 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 build = ["cp38*"] From 2a982eba2c9e52f3fc661f89fc534f0e8971dad6 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 1 Apr 2026 15:26:45 +0200 Subject: [PATCH 41/74] general clean up --- .github/workflows/build_wheels.yml | 5 +- .github/workflows/epidata_main.yml | 294 ++++++------- .github/workflows/main.yml | 660 ++++++++++++++-------------- .github/workflows/message_bot.yml | 226 +++++----- README.md | 2 +- pycode/memilio-simulation/README.md | 6 +- pyproject.toml | 2 - 7 files changed, 595 insertions(+), 600 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 7dda722fdd..1806ab1433 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -43,9 +43,7 @@ jobs: environment: pypi permissions: id-token: write - # if: github.event_name == 'release' && github.event.action == 'published' - # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) - # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + steps: - uses: actions/download-artifact@v8 with: @@ -57,6 +55,5 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true - verbose: true # To test uploads to TestPyPI, uncomment the following: repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index e8e84dd564..3cd8fea21b 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -1,158 +1,158 @@ -# name: Epidata-CI +name: Epidata-CI -# on: -# schedule: -# - cron: "40 1 * * *" -# push: -# branches: -# - 'main' -# tags: -# - version-* -# paths: -# - '**/memilio-epidata/**' -# - '.github/**' -# pull_request: -# types: [opened, reopened, synchronize, ready_for_review] -# paths: -# - '**/memilio-epidata/**' -# - '.github/**' -# workflow_dispatch: +on: + schedule: + - cron: "40 1 * * *" + push: + branches: + - 'main' + tags: + - version-* + paths: + - '**/memilio-epidata/**' + - '.github/**' + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + paths: + - '**/memilio-epidata/**' + - '.github/**' + workflow_dispatch: -# jobs: -# pre-commit: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-python@v5 -# with: -# python-version: 3.12 -# - uses: pre-commit/action@v3.0.1 +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + - uses: pre-commit/action@v3.0.1 -# build-py-epidata: -# runs-on: ubuntu-latest -# container: quay.io/pypa/manylinux_2_28_x86_64 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/build-py -# with: -# package: epidata + build-py-epidata: + runs-on: ubuntu-latest + container: quay.io/pypa/manylinux_2_28_x86_64 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-py + with: + package: epidata -# build-py-plot: -# if: github.event.pull_request.draft == false -# runs-on: ubuntu-latest -# container: quay.io/pypa/manylinux_2_28_x86_64 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/build-py -# with: -# package: plot + build-py-plot: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + container: quay.io/pypa/manylinux_2_28_x86_64 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-py + with: + package: plot -# test-py-epidata: -# needs: build-py-epidata -# strategy: -# matrix: -# version: ["3.8", "3.12"] -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-py -# with: -# version: ${{ matrix.version }} -# package: epidata -# coverage: ON + test-py-epidata: + needs: build-py-epidata + strategy: + matrix: + version: ["3.8", "3.12"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-py + with: + version: ${{ matrix.version }} + package: epidata + coverage: ON -# test-py-plot: -# if: github.event.pull_request.draft == false -# needs: [build-py-plot, build-py-epidata] -# strategy: -# matrix: -# version: ["3.8", "3.12"] -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-py -# with: -# version: ${{ matrix.version }} -# package: plot -# coverage: ON + test-py-plot: + if: github.event.pull_request.draft == false + needs: [build-py-plot, build-py-epidata] + strategy: + matrix: + version: ["3.8", "3.12"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-py + with: + version: ${{ matrix.version }} + package: plot + coverage: ON -# merge-artifacts: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# packages: [epidata, plot] -# needs: [test-py-plot, test-py-epidata] -# steps: -# - name: merge epidata reports -# uses: actions/upload-artifact/merge@v4 -# with: -# name: test-py-coverage-reports-${{ matrix.packages }} -# pattern: test-py-coverage-reports-${{ matrix.packages }}-* + merge-artifacts: + runs-on: ubuntu-latest + strategy: + matrix: + packages: [epidata, plot] + needs: [test-py-plot, test-py-epidata] + steps: + - name: merge epidata reports + uses: actions/upload-artifact/merge@v4 + with: + name: test-py-coverage-reports-${{ matrix.packages }} + pattern: test-py-coverage-reports-${{ matrix.packages }}-* -# test-pylint-epidata: -# needs: build-py-epidata -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-pylint -# with: -# package: epidata + test-pylint-epidata: + needs: build-py-epidata + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-pylint + with: + package: epidata -# test-pylint-plot: -# needs: build-py-plot -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-pylint -# with: -# package: plot + test-pylint-plot: + needs: build-py-plot + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-pylint + with: + package: plot -# download-data: -# needs: build-py-epidata -# runs-on: ubuntu-latest -# continue-on-error: true -# steps: -# - uses: actions/checkout@v4 -# - name: Install dependencies -# run: | -# sudo apt-get -qq update -# sudo apt-get -qq -y install python3-pip gnupg -# python -m pip install --upgrade pip -# - name: Download Python Wheels -# uses: actions/download-artifact@v4 -# with: -# name: python-wheels-epidata -# path: pycode/wheelhouse -# - name: Set up Python 3.12 -# uses: actions/setup-python@v5 -# with: -# python-version: 3.12 -# - name: Install Python Wheels -# run: | -# for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific -# for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific -# - name: Download Data -# run: | -# mkdir -p data_dl -# getcasedata -o data_dl --no-progress-indicators -# getpopuldata -o data_dl --no-progress-indicators -# getjhdata -o data_dl --no-progress-indicators -# getdividata -o data_dl --no-progress-indicators -# getcommutermobility -o data_dl --no-progress-indicators -# getvaccinationdata -o data_dl --no-progress-indicators -# gethospitalizationdata -o data_dl --no-progress-indicators -# - name: Upload Data -# uses: actions/upload-artifact@v4 -# with: -# name: data -# path: | -# data_dl/*.json -# data_dl/Germany/*.json -# data_dl/Spain/*.json -# data_dl/France/*.json -# data_dl/Italy*.json -# data_dl/SouthKorea/*.json -# data_dl/US/*.json -# data_dl/China/*.json -# retention-days: 1 + download-data: + needs: build-py-epidata + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get -qq update + sudo apt-get -qq -y install python3-pip gnupg + python -m pip install --upgrade pip + - name: Download Python Wheels + uses: actions/download-artifact@v4 + with: + name: python-wheels-epidata + path: pycode/wheelhouse + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Install Python Wheels + run: | + for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific + for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific + - name: Download Data + run: | + mkdir -p data_dl + getcasedata -o data_dl --no-progress-indicators + getpopuldata -o data_dl --no-progress-indicators + getjhdata -o data_dl --no-progress-indicators + getdividata -o data_dl --no-progress-indicators + getcommutermobility -o data_dl --no-progress-indicators + getvaccinationdata -o data_dl --no-progress-indicators + gethospitalizationdata -o data_dl --no-progress-indicators + - name: Upload Data + uses: actions/upload-artifact@v4 + with: + name: data + path: | + data_dl/*.json + data_dl/Germany/*.json + data_dl/Spain/*.json + data_dl/France/*.json + data_dl/Italy*.json + data_dl/SouthKorea/*.json + data_dl/US/*.json + data_dl/China/*.json + retention-days: 1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4bafd6e343..b87795d7bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,355 +1,355 @@ -# name: CI +name: CI -# on: -# schedule: -# - cron: "40 2 * * *" -# push: -# branches: -# - "main" -# tags: -# - version-* -# paths-ignore: -# - "**/memilio-epidata/**" -# pull_request: -# types: [opened, reopened, synchronize, ready_for_review] -# paths-ignore: -# - "**/memilio-epidata/**" -# workflow_dispatch: +on: + schedule: + - cron: "40 2 * * *" + push: + branches: + - "main" + tags: + - version-* + paths-ignore: + - "**/memilio-epidata/**" + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + paths-ignore: + - "**/memilio-epidata/**" + workflow_dispatch: -# concurrency: -# group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true -# jobs: -# pre-commit: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-python@v5 -# with: -# python-version: 3.12 -# - uses: pre-commit/action@v3.0.1 +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + - uses: pre-commit/action@v3.0.1 -# build-cpp-gcc_clang: -# if: github.event.pull_request.draft == false -# strategy: -# matrix: -# compiler: ["gcc", "clang"] -# config: ["Debug", "Release"] -# version: ["latest", "min"] -# include: -# - version: "latest" -# os: "ubuntu-latest" -# - version: "min" -# os: "ubuntu-22.04" -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-build -# with: -# compiler: ${{ matrix.compiler }} -# config: ${{ matrix.config }} -# version: ${{ matrix.version }} -# coverage: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} # `c && t || f` is (usually) equivalent to `c ? t : f` -# sanitizers: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} + build-cpp-gcc_clang: + if: github.event.pull_request.draft == false + strategy: + matrix: + compiler: ["gcc", "clang"] + config: ["Debug", "Release"] + version: ["latest", "min"] + include: + - version: "latest" + os: "ubuntu-latest" + - version: "min" + os: "ubuntu-22.04" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-build + with: + compiler: ${{ matrix.compiler }} + config: ${{ matrix.config }} + version: ${{ matrix.version }} + coverage: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} # `c && t || f` is (usually) equivalent to `c ? t : f` + sanitizers: ${{ (matrix.compiler == 'gcc' && matrix.config == 'Debug' && matrix.version == 'latest') && 'ON' || 'OFF' }} -# build-cpp-gcc-no-optional-deps: -# if: github.event.pull_request.draft == false -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-build -# with: -# compiler: gcc -# version: latest -# config: Release -# optional-dependencies: OFF + build-cpp-gcc-no-optional-deps: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-build + with: + compiler: gcc + version: latest + config: Release + optional-dependencies: OFF -# build-cpp-gcc-openmp: -# if: github.event.pull_request.draft == false -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-build -# with: -# compiler: gcc -# version: latest -# config: Release -# openmp: ON + build-cpp-gcc-openmp: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-build + with: + compiler: gcc + version: latest + config: Release + openmp: ON -# build-cpp-msvc: -# if: github.event.pull_request.draft == false -# strategy: -# matrix: -# config: ["Debug", "Release"] -# version: ["latest", "min"] -# include: -# - version: "latest" -# os: "windows-2025" -# - version: "min" -# os: "windows-2022" -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/windows-build -# with: -# config: ${{ matrix.config }} -# version: ${{ matrix.version }} + build-cpp-msvc: + if: github.event.pull_request.draft == false + strategy: + matrix: + config: ["Debug", "Release"] + version: ["latest", "min"] + include: + - version: "latest" + os: "windows-2025" + - version: "min" + os: "windows-2022" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/windows-build + with: + config: ${{ matrix.config }} + version: ${{ matrix.version }} -# build-cpp-msvc-no-optional-deps: -# if: github.event.pull_request.draft == false -# runs-on: windows-2025 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/windows-build -# with: -# config: Release -# version: latest -# optional-dependencies: OFF + build-cpp-msvc-no-optional-deps: + if: github.event.pull_request.draft == false + runs-on: windows-2025 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/windows-build + with: + config: Release + version: latest + optional-dependencies: OFF -# test-cpp-gcc_clang: -# if: github.event.pull_request.draft == false -# needs: build-cpp-gcc_clang -# strategy: -# matrix: -# compiler: ["gcc", "clang"] -# config: ["Debug", "Release"] -# version: ["latest", "min"] -# include: -# - version: "latest" -# os: "ubuntu-latest" -# - version: "min" -# os: "ubuntu-22.04" -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-test -# with: -# artifact-pattern: ${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} -# coverage: ${{ (matrix.compiler == 'gcc' && matrix.version == 'latest' && matrix.config == 'Debug') && 'ON' || 'OFF' }} + test-cpp-gcc_clang: + if: github.event.pull_request.draft == false + needs: build-cpp-gcc_clang + strategy: + matrix: + compiler: ["gcc", "clang"] + config: ["Debug", "Release"] + version: ["latest", "min"] + include: + - version: "latest" + os: "ubuntu-latest" + - version: "min" + os: "ubuntu-22.04" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-test + with: + artifact-pattern: ${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} + coverage: ${{ (matrix.compiler == 'gcc' && matrix.version == 'latest' && matrix.config == 'Debug') && 'ON' || 'OFF' }} -# test-cpp-gcc-sbml: -# if: github.event.pull_request.draft == false -# needs: build-cpp-gcc_clang -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/sbml-test + test-cpp-gcc-sbml: + if: github.event.pull_request.draft == false + needs: build-cpp-gcc_clang + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/sbml-test -# merge-test-artifacts: -# needs: [test-cpp-gcc_clang, test-cpp-msvc, test-py-surrogatemodel] -# runs-on: ubuntu-latest -# steps: -# - name: merge-coverage-artifacts -# uses: actions/upload-artifact/merge@v4 -# with: -# name: test-cpp-coverage-reports -# pattern: test-cpp-coverage-reports-* -# - name: merge-linux-artifacts -# uses: actions/upload-artifact/merge@v4 -# with: -# name: test-cpp-linux-report -# pattern: test-cpp-linux-report-* -# - name: merge-windows-artifacts -# uses: actions/upload-artifact/merge@v4 -# with: -# name: test-cpp-win-report -# pattern: test-cpp-win-report-* -# - name: merge python reports -# uses: actions/upload-artifact/merge@v4 -# with: -# name: test-py-coverage-reports-surrogatemodel -# pattern: test-py-coverage-reports-surrogatemodel-* + merge-test-artifacts: + needs: [test-cpp-gcc_clang, test-cpp-msvc, test-py-surrogatemodel] + runs-on: ubuntu-latest + steps: + - name: merge-coverage-artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: test-cpp-coverage-reports + pattern: test-cpp-coverage-reports-* + - name: merge-linux-artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: test-cpp-linux-report + pattern: test-cpp-linux-report-* + - name: merge-windows-artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: test-cpp-win-report + pattern: test-cpp-win-report-* + - name: merge python reports + uses: actions/upload-artifact/merge@v4 + with: + name: test-py-coverage-reports-surrogatemodel + pattern: test-py-coverage-reports-surrogatemodel-* -# test-cpp-gcc-no-optional-deps: -# if: github.event.pull_request.draft == false -# needs: build-cpp-gcc-no-optional-deps -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-test -# with: -# artifact-pattern: gcc-latest-Release -# optional-deps: OFF + test-cpp-gcc-no-optional-deps: + if: github.event.pull_request.draft == false + needs: build-cpp-gcc-no-optional-deps + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-test + with: + artifact-pattern: gcc-latest-Release + optional-deps: OFF -# test-cpp-gcc-openmp: -# if: github.event.pull_request.draft == false -# needs: build-cpp-gcc-openmp -# runs-on: ubuntu-latest -# timeout-minutes: 30 -# env: -# OMP_NUM_THREADS: 4 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-test -# with: -# artifact-pattern: gcc-latest-Release -# num-repeat: 10 -# openmp: ON + test-cpp-gcc-openmp: + if: github.event.pull_request.draft == false + needs: build-cpp-gcc-openmp + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + OMP_NUM_THREADS: 4 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-test + with: + artifact-pattern: gcc-latest-Release + num-repeat: 10 + openmp: ON -# test-cpp-msvc: -# if: github.event.pull_request.draft == false -# needs: build-cpp-msvc -# strategy: -# matrix: -# config: ["Debug", "Release"] -# version: ["latest", "min"] -# include: -# - version: "latest" -# os: "windows-2025" -# - version: "min" -# os: "windows-2022" -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/windows-test -# with: -# artifact-pattern: msvc-${{ matrix.version }}-${{ matrix.config }} + test-cpp-msvc: + if: github.event.pull_request.draft == false + needs: build-cpp-msvc + strategy: + matrix: + config: ["Debug", "Release"] + version: ["latest", "min"] + include: + - version: "latest" + os: "windows-2025" + - version: "min" + os: "windows-2022" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/windows-test + with: + artifact-pattern: msvc-${{ matrix.version }}-${{ matrix.config }} -# test-cpp-msvc-no-optional-deps: -# if: github.event.pull_request.draft == false -# needs: build-cpp-msvc-no-optional-deps -# runs-on: windows-2025 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/windows-test -# with: -# artifact-pattern: msvc-latest-Release -# optional-deps: OFF + test-cpp-msvc-no-optional-deps: + if: github.event.pull_request.draft == false + needs: build-cpp-msvc-no-optional-deps + runs-on: windows-2025 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/windows-test + with: + artifact-pattern: msvc-latest-Release + optional-deps: OFF -# run_examples-cpp-gcc_clang: -# if: github.event.pull_request.draft == false -# needs: build-cpp-gcc_clang -# strategy: -# matrix: -# compiler: ["gcc", "clang"] -# config: ["Debug", "Release"] -# version: ["latest", "min"] -# include: -# - version: "latest" -# os: "ubuntu-latest" -# - version: "min" -# os: "ubuntu-22.04" -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/linux-run_examples -# with: -# build-artifact: build-cpp-linux-${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} + run_examples-cpp-gcc_clang: + if: github.event.pull_request.draft == false + needs: build-cpp-gcc_clang + strategy: + matrix: + compiler: ["gcc", "clang"] + config: ["Debug", "Release"] + version: ["latest", "min"] + include: + - version: "latest" + os: "ubuntu-latest" + - version: "min" + os: "ubuntu-22.04" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/linux-run_examples + with: + build-artifact: build-cpp-linux-${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }} -# run_examples-cpp-msvc: -# if: github.event.pull_request.draft == false -# needs: build-cpp-msvc -# strategy: -# matrix: -# config: ["Debug", "Release"] -# version: ["latest", "min"] -# include: -# - version: "latest" -# os: "windows-2025" -# - version: "min" -# os: "windows-2022" -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/windows-run_examples -# with: -# build-artifact: build-cpp-windows-msvc-${{ matrix.version }}-${{ matrix.config }} + run_examples-cpp-msvc: + if: github.event.pull_request.draft == false + needs: build-cpp-msvc + strategy: + matrix: + config: ["Debug", "Release"] + version: ["latest", "min"] + include: + - version: "latest" + os: "windows-2025" + - version: "min" + os: "windows-2022" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/windows-run_examples + with: + build-artifact: build-cpp-windows-msvc-${{ matrix.version }}-${{ matrix.config }} -# build-py-generation: -# if: github.event.pull_request.draft == false -# runs-on: ubuntu-latest -# container: quay.io/pypa/manylinux_2_28_x86_64 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/build-py -# with: -# package: generation + build-py-generation: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + container: quay.io/pypa/manylinux_2_28_x86_64 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-py + with: + package: generation -# build-py-simulation: -# if: github.event.pull_request.draft == false -# runs-on: ubuntu-latest -# container: quay.io/pypa/manylinux_2_28_x86_64 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/build-py -# with: -# package: simulation + build-py-simulation: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + container: quay.io/pypa/manylinux_2_28_x86_64 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-py + with: + package: simulation -# build-py-surrogatemodel: -# if: github.event.pull_request.draft == false -# runs-on: ubuntu-latest -# container: quay.io/pypa/manylinux_2_28_x86_64 -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/build-py -# with: -# package: surrogatemodel + build-py-surrogatemodel: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + container: quay.io/pypa/manylinux_2_28_x86_64 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/build-py + with: + package: surrogatemodel -# test-py-generation: -# if: github.event.pull_request.draft == false -# strategy: -# matrix: -# version: ["3.8", "3.12"] -# needs: build-py-generation -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-py -# with: -# package: generation + test-py-generation: + if: github.event.pull_request.draft == false + strategy: + matrix: + version: ["3.8", "3.12"] + needs: build-py-generation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-py + with: + package: generation -# test-py-simulation: -# if: github.event.pull_request.draft == false -# needs: build-py-simulation -# strategy: -# matrix: -# version: ["3.8", "3.12"] -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-py -# with: -# package: simulation + test-py-simulation: + if: github.event.pull_request.draft == false + needs: build-py-simulation + strategy: + matrix: + version: ["3.8", "3.12"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-py + with: + package: simulation -# test-py-surrogatemodel: -# if: github.event.pull_request.draft == false -# needs: [build-py-surrogatemodel, build-py-simulation] -# strategy: -# matrix: -# version: ["3.8", "3.12"] -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: ./.github/actions/test-py -# with: -# version: ${{ matrix.version }} -# package: surrogatemodel -# coverage: ON + test-py-surrogatemodel: + if: github.event.pull_request.draft == false + needs: [build-py-surrogatemodel, build-py-simulation] + strategy: + matrix: + version: ["3.8", "3.12"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-py + with: + version: ${{ matrix.version }} + package: surrogatemodel + coverage: ON -# codecov: -# if: github.event.pull_request.draft == false -# needs: merge-test-artifacts -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - name: Install dependencies -# run: | -# sudo apt-get -qq update -# sudo apt-get -qq -y install git curl -# - name: Download python coverage report -# uses: actions/download-artifact@v4 -# with: -# name: test-py-coverage-reports-surrogatemodel -# - name: Download cpp coverage report -# uses: actions/download-artifact@v4 -# with: -# name: test-cpp-coverage-reports -# - name: Deploy to codecov.io -# uses: codecov/codecov-action@v3 -# with: -# token: ${{ secrets.CODECOV_TOKEN }} -# directory: ./coverage_python -# files: ./coverage_python/**,./coverage.info -# verbose: true + codecov: + if: github.event.pull_request.draft == false + needs: merge-test-artifacts + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get -qq update + sudo apt-get -qq -y install git curl + - name: Download python coverage report + uses: actions/download-artifact@v4 + with: + name: test-py-coverage-reports-surrogatemodel + - name: Download cpp coverage report + uses: actions/download-artifact@v4 + with: + name: test-cpp-coverage-reports + - name: Deploy to codecov.io + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + directory: ./coverage_python + files: ./coverage_python/**,./coverage.info + verbose: true diff --git a/.github/workflows/message_bot.yml b/.github/workflows/message_bot.yml index 55fdb1545d..cd4f322ca1 100644 --- a/.github/workflows/message_bot.yml +++ b/.github/workflows/message_bot.yml @@ -1,134 +1,134 @@ -# # .github/workflows/discussion-monitor.yml -# name: Discussion Monitor +# .github/workflows/discussion-monitor.yml +name: Discussion Monitor -# on: -# schedule: -# - cron: '0 9 * * *' +on: + schedule: + - cron: '0 9 * * *' -# jobs: -# check-discussions: -# runs-on: ubuntu-latest -# permissions: -# contents: read -# discussions: read -# steps: -# - name: Check for new discussions -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} -# run: | -# npm install @octokit/rest -# cat > check.js << 'EOF' -# const { Octokit } = require('@octokit/rest'); +jobs: + check-discussions: + runs-on: ubuntu-latest + permissions: + contents: read + discussions: read + steps: + - name: Check for new discussions + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + run: | + npm install @octokit/rest + cat > check.js << 'EOF' + const { Octokit } = require('@octokit/rest'); -# const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); + const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); -# async function check() { -# const since = new Date(); -# since.setHours(since.getHours() - 25); + async function check() { + const since = new Date(); + since.setHours(since.getHours() - 25); -# const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); -# console.log(`Checking discussions for ${owner}/${repo}`); + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + console.log(`Checking discussions for ${owner}/${repo}`); -# try { -# const response = await octokit.graphql(` -# query { -# repository(owner: "${owner}", name: "${repo}") { -# discussions(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) { -# nodes { -# createdAt -# title -# url -# number -# author { -# login -# } -# category { -# name -# emoji -# } -# } -# } -# } -# } -# `); + try { + const response = await octokit.graphql(` + query { + repository(owner: "${owner}", name: "${repo}") { + discussions(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) { + nodes { + createdAt + title + url + number + author { + login + } + category { + name + emoji + } + } + } + } + } + `); -# console.log('Full GraphQL response:', JSON.stringify(response, null, 2)); + console.log('Full GraphQL response:', JSON.stringify(response, null, 2)); -# if (!response || !response.repository) { -# console.log('Repository not found or discussions not enabled'); -# console.log('Response keys:', Object.keys(response || {})); -# return; -# } + if (!response || !response.repository) { + console.log('Repository not found or discussions not enabled'); + console.log('Response keys:', Object.keys(response || {})); + return; + } -# if (!response.repository.discussions) { -# console.log('Discussions not available for this repository'); -# return; -# } + if (!response.repository.discussions) { + console.log('Discussions not available for this repository'); + return; + } -# const newDiscussions = response.repository.discussions.nodes.filter( -# d => new Date(d.createdAt) > since -# ); + const newDiscussions = response.repository.discussions.nodes.filter( + d => new Date(d.createdAt) > since + ); -# console.log(`Found ${newDiscussions.length} new discussions`); + console.log(`Found ${newDiscussions.length} new discussions`); -# if (newDiscussions.length > 0) { -# let message; + if (newDiscussions.length > 0) { + let message; -# if (newDiscussions.length === 1) { -# const discussion = newDiscussions[0]; -# message = { -# text: `${discussion.category.emoji || '💬'} New Discussion on ${owner}/${repo} + if (newDiscussions.length === 1) { + const discussion = newDiscussions[0]; + message = { + text: `${discussion.category.emoji || '💬'} New Discussion on ${owner}/${repo} -# **[${discussion.title}](${discussion.url})** + **[${discussion.title}](${discussion.url})** -# 👤 **Author:** ${discussion.author.login} -# 📂 **Category:** ${discussion.category.name} -# 🔢 **Discussion #${discussion.number}**`, -# username: "GitHub Discussion Bot", -# icon_emoji: ":github:" -# }; -# } else { -# const discussionList = newDiscussions.map(d => -# `- ${d.category.emoji || '💬'} **[${d.title}](${d.url})** by ${d.author.login}` -# ).join('\n'); + 👤 **Author:** ${discussion.author.login} + 📂 **Category:** ${discussion.category.name} + 🔢 **Discussion #${discussion.number}**`, + username: "GitHub Discussion Bot", + icon_emoji: ":github:" + }; + } else { + const discussionList = newDiscussions.map(d => + `- ${d.category.emoji || '💬'} **[${d.title}](${d.url})** by ${d.author.login}` + ).join('\n'); -# message = { -# text: `🎉 ${newDiscussions.length} New Discussions on ${owner}/${repo} + message = { + text: `🎉 ${newDiscussions.length} New Discussions on ${owner}/${repo} -# ${discussionList} + ${discussionList} -# --- -# *Check out the latest discussions above!*`, -# username: "GitHub Discussion Bot", -# icon_emoji: ":github:" -# }; -# } + --- + *Check out the latest discussions above!*`, + username: "GitHub Discussion Bot", + icon_emoji: ":github:" + }; + } -# const response = await fetch(process.env.MATTERMOST_WEBHOOK_URL, { -# method: 'POST', -# headers: { 'Content-Type': 'application/json' }, -# body: JSON.stringify(message) -# }); -# console.log('Mattermost notification sent'); -# } -# } catch (error) { -# console.error('Error details:', error); -# if (process.env.MATTERMOST_WEBHOOK_URL) { -# await fetch(process.env.MATTERMOST_WEBHOOK_URL, { -# method: 'POST', -# headers: { 'Content-Type': 'application/json' }, -# body: JSON.stringify({ -# text: '⚠️ **GitHub Discussion Bot Error**\nThere was an error checking discussions. Please check the workflow logs.', -# username: "GitHub Discussion Bot", -# icon_emoji: ":warning:" -# }) -# }); -# } -# } -# } + const response = await fetch(process.env.MATTERMOST_WEBHOOK_URL, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(message) + }); + console.log('Mattermost notification sent'); + } + } catch (error) { + console.error('Error details:', error); + if (process.env.MATTERMOST_WEBHOOK_URL) { + await fetch(process.env.MATTERMOST_WEBHOOK_URL, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + text: '⚠️ **GitHub Discussion Bot Error**\nThere was an error checking discussions. Please check the workflow logs.', + username: "GitHub Discussion Bot", + icon_emoji: ":warning:" + }) + }); + } + } + } -# check().catch(console.error); -# EOF -# node check.js + check().catch(console.error); + EOF + node check.js diff --git a/README.md b/README.md index 3e43d6499e..2b94fb33b4 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/pycode/memilio-simulation/README.md b/pycode/memilio-simulation/README.md index 76f0ab82e7..8f23dc82a0 100644 --- a/pycode/memilio-simulation/README.md +++ b/pycode/memilio-simulation/README.md @@ -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. @@ -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] diff --git a/pyproject.toml b/pyproject.toml index 3d6c003e4a..44ef0d806c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [project] name = "memilio-simulation" -# version = "1.0.3" dynamic = ["version"] description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" @@ -46,7 +45,6 @@ local_scheme = "no-local-version" [tool.cibuildwheel] # Disable some wheels -build = ["cp38*"] skip = ["pp*", "*musllinux*", "*-win32"] [tool.autopep8] From a3e25578dc0ad1ec77076bfed81ba56513f82625 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:06:13 +0200 Subject: [PATCH 42/74] update main ci, fix version for now --- .github/actions/build-py/action.yml | 13 ++++++++++--- pyproject.toml | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 757f9f58a0..4df8c2625d 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -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 @@ -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 + diff --git a/pyproject.toml b/pyproject.toml index 44ef0d806c..7fb6cdcee1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [project] name = "memilio-simulation" -dynamic = ["version"] +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" From 5b19727937fe81b66db238bda2d755cb21919c77 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:11:08 +0200 Subject: [PATCH 43/74] fix typo in if statement --- .github/actions/build-py/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 4df8c2625d..950b7119ed 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -13,7 +13,7 @@ runs: - name: Make artifact dir shell: bash run: | - if [[ "${{ inputs.package }}" != "simulation" ]; then + if [ "${{ inputs.package }}" != "simulation" ]; then cd pycode/memilio-${{ inputs.package }}/ // else stay in root directory fi @@ -21,7 +21,7 @@ runs: - name: Build Python Wheels shell: bash run: | - if [[ "${{ inputs.package }}" != "simulation" ]; then + if [ "${{ inputs.package }}" != "simulation" ]; then cd pycode/memilio-${{ inputs.package }}/ // else stay in root directory fi From 9f37563d34b0514d13ee53758baba4fb7851579f Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:11:58 +0200 Subject: [PATCH 44/74] update ci and link to logo --- .github/actions/build-py/action.yml | 10 ++++++---- README.md | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 950b7119ed..15dbee19ef 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -21,15 +21,17 @@ runs: - name: Build Python Wheels shell: bash run: | - if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${{ inputs.package }}/ - // else stay in root directory - fi + # 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 pip install setuptools-scm /opt/python/cp38-cp38/bin/python -m build --no-isolation --wheel /opt/python/cp312-cp312/bin/python -m pip install --upgrade pip setuptools wheel /opt/python/cp312-cp312/bin/python -m pip install scikit-build scikit-build-core + /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm /opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel # Exclude memilio-generation, because its a pure python package, cmake is only used in the build process to retrieve data from cpp if [[ -f "CMakeLists.txt" ]] && [ "${{ inputs.package }}" != "generation" ]; then diff --git a/README.md b/README.md index 2b94fb33b4..9105fa1c85 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MEmilio - a high performance Modular EpideMIcs simuLatIOn software # -![memilio_logo](https://github.com/SciCompMod/memilio/blob/main/docs/memilio-small.png) +![memilio_logo](https://github.com/SciCompMod/memilio/blob/main/docs/memilio-small.png?raw=true) [![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) From ed9f054eaa6e7b53aedf00523739c2eb41e844ae Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:22:58 +0200 Subject: [PATCH 45/74] update paths --- .github/actions/build-py/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 15dbee19ef..264b02488a 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -14,17 +14,17 @@ runs: shell: bash run: | if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${{ inputs.package }}/ + cd pycode/memilio-${inputs.package}/ // else stay in root directory fi mkdir wheelhouse - name: Build Python Wheels shell: bash run: | - # if [ "${{ inputs.package }}" != "simulation" ]; then - # cd pycode/memilio-${{ inputs.package }}/ - # // else stay in root directory - # fi + 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 pip install setuptools-scm From 15ed20fb32eeb3cb8b3fe3a48c41e33b93ab6cd4 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:34:15 +0200 Subject: [PATCH 46/74] again --- .github/actions/build-py/action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 264b02488a..9f4fdb2622 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -14,16 +14,18 @@ runs: shell: bash run: | if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${inputs.package}/ - // else stay in root directory + cd pycode/memilio-${{ inputs.package }} + else + // stay in root directory fi mkdir wheelhouse - name: Build Python Wheels shell: bash run: | if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${inputs.package}/ - // else stay in root directory + 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 From 40108ffac690f97ab40e0f49ce22144d09b3a385 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:42:45 +0200 Subject: [PATCH 47/74] update --- .github/actions/build-py/action.yml | 5 ++++- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 9f4fdb2622..dd3f401726 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -6,7 +6,10 @@ inputs: required: true runs: using: "composite" - steps: + steps: + - name: Configure Git safe directory + shell: bash + run: git config --global --add safe.directory "${{ github.workspace }}" - name: Install dependencies shell: bash run: yum install ninja-build cmake git -qy diff --git a/pyproject.toml b/pyproject.toml index 7fb6cdcee1..0a3c6dd941 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ version = "2.3.0" 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" } +license = { "Apache-2.0" } authors = [{ name = "MEmilio Team" }] maintainers = [ { email = "martin.kuehn@dlr.de" } From 7131d9e1415d80b48d1bbd3e4ad0197137456023 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:47:19 +0200 Subject: [PATCH 48/74] again --- .github/actions/build-py/action.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index dd3f401726..79d031b315 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -9,7 +9,7 @@ runs: steps: - name: Configure Git safe directory shell: bash - run: git config --global --add safe.directory "${{ github.workspace }}" + run: git config --global --add safe.directory /__w/memilio/memilio - name: Install dependencies shell: bash run: yum install ninja-build cmake git -qy diff --git a/pyproject.toml b/pyproject.toml index 0a3c6dd941..db8e81c58b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ version = "2.3.0" 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 = { "Apache-2.0" } +license = "Apache-2.0" authors = [{ name = "MEmilio Team" }] maintainers = [ { email = "martin.kuehn@dlr.de" } From 701aa3d53baec4c2e0e8d02c1e38ac6504259457 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:57:35 +0200 Subject: [PATCH 49/74] adapt else --- .github/actions/build-py/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 79d031b315..772dd9cb8c 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -17,9 +17,9 @@ runs: shell: bash run: | if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${{ inputs.package }} + cd pycode/memilio-${{ inputs.package }}/ else - // stay in root directory + cd . // stay in root directory fi mkdir wheelhouse - name: Build Python Wheels @@ -28,7 +28,7 @@ runs: if [ "${{ inputs.package }}" != "simulation" ]; then cd pycode/memilio-${{ inputs.package }}/ else - // stay in root directory + cd . // 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 From 3a79e46389c77a1964efb4ca10e649fcbbe06f99 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:01:20 +0200 Subject: [PATCH 50/74] again --- .github/actions/build-py/action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 772dd9cb8c..3c9735f673 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -18,8 +18,7 @@ runs: run: | if [ "${{ inputs.package }}" != "simulation" ]; then cd pycode/memilio-${{ inputs.package }}/ - else - cd . // stay in root directory + # else stay in root directory fi mkdir wheelhouse - name: Build Python Wheels @@ -27,8 +26,7 @@ runs: run: | if [ "${{ inputs.package }}" != "simulation" ]; then cd pycode/memilio-${{ inputs.package }}/ - else - cd . // stay in root directory + # 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 From fd247a1ed700f83d2facfae7ac6767081d684976 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:22:35 +0200 Subject: [PATCH 51/74] adapt path for storing wheels --- .github/actions/build-py/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 3c9735f673..bd6f92e4ad 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -44,7 +44,11 @@ runs: # no auditwheel necessary for pure python packages, so only copy the wheels to the same output directory cp dist/*.whl wheelhouse fi - cp -r wheelhouse .. + if [ "${{ inputs.package }}" != "simulation" ]; then + cp -r wheelhouse .. + else + cp -r wheelhouse pycode + fi - name: Upload Python Wheels uses: actions/upload-artifact@v6 with: From 969ec6c09b15844b9da82768a12df48be5db2301 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:16:26 +0200 Subject: [PATCH 52/74] try new version to test image --- .github/workflows/{build_wheels.yml => pypi.yml} | 4 +++- pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) rename .github/workflows/{build_wheels.yml => pypi.yml} (93%) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/pypi.yml similarity index 93% rename from .github/workflows/build_wheels.yml rename to .github/workflows/pypi.yml index 1806ab1433..7ed54fdfff 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/pypi.yml @@ -1,5 +1,7 @@ -name: Build wheels +name: memilio-simulation PyPI +# on: [release] +# remove following line before merge: on: [pull_request, release] jobs: diff --git a/pyproject.toml b/pyproject.toml index db8e81c58b..304cbf01c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,8 @@ [project] name = "memilio-simulation" -version = "2.3.0" # dynamic = ["version"] +# remove following line before merge: +version = "2.3.1" description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" requires-python = ">=3.8" From 13a1ea220f867057610e538b33edf1200f5406e5 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:24:35 +0200 Subject: [PATCH 53/74] prepare for upload to real pypi --- .github/workflows/pypi.yml | 8 ++++---- pyproject.toml | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 7ed54fdfff..528a3c8dc4 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,8 +1,8 @@ -name: memilio-simulation PyPI +name: PyPI -# on: [release] +on: [release] # remove following line before merge: -on: [pull_request, release] +# on: [pull_request, release] jobs: @@ -58,4 +58,4 @@ jobs: with: skip-existing: true # To test uploads to TestPyPI, uncomment the following: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 304cbf01c3..17045dfdc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,6 @@ [project] name = "memilio-simulation" -# dynamic = ["version"] -# remove following line before merge: -version = "2.3.1" +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" From b12999ba30f6f0f165e2ca7b0721e70f7caaeb41 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Fri, 10 Apr 2026 17:02:59 +0200 Subject: [PATCH 54/74] add static version for pr --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 17045dfdc8..94eb44e596 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,8 @@ [project] name = "memilio-simulation" dynamic = ["version"] +# remove following line before merge: +# version = "2.3.0" description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" requires-python = ">=3.8" From d60e0b5c35cb68f47625f2ff623a1cd1b3f12d5a Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 09:22:15 +0200 Subject: [PATCH 55/74] fix mpl backend --- .github/workflows/epidata_main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index 3cd8fea21b..3f191f5e47 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -111,6 +111,8 @@ jobs: needs: build-py-epidata runs-on: ubuntu-latest continue-on-error: true + env: + MPLBACKEND: Agg steps: - uses: actions/checkout@v4 - name: Install dependencies From 39c7dbe9481ee8d4ad29a1cc0b4bb63ee1a69bd9 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 09:48:43 +0200 Subject: [PATCH 56/74] debug pip env --- .github/workflows/epidata_main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index 3f191f5e47..9d3f883282 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -133,6 +133,9 @@ jobs: run: | for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific + - name: Debug pip environment + run: /opt/python/cp312-cp312/bin/python -m pip show matplotlib && \ + /opt/python/cp312-cp312/bin/python -m pip list | grep -i qt - name: Download Data run: | mkdir -p data_dl From e8f51a8dd5a59588b825eca6d740668831f81914 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 09:54:34 +0200 Subject: [PATCH 57/74] remove qt bindings --- .github/workflows/epidata_main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index 9d3f883282..db589dea36 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -134,8 +134,10 @@ jobs: for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific - name: Debug pip environment - run: /opt/python/cp312-cp312/bin/python -m pip show matplotlib && \ - /opt/python/cp312-cp312/bin/python -m pip list | grep -i qt + run: python -m pip show matplotlib && \ + python -m pip list | grep -i qt + - name: Remove Qt bindings + run: python -m pip uninstall -y PyQt5 PyQt6 PySide2 PySide6 || true - name: Download Data run: | mkdir -p data_dl From 0eb295f3c120f16f5f90b80e6f56f07cebf7dd98 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:05:17 +0200 Subject: [PATCH 58/74] update --- .github/workflows/epidata_main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index db589dea36..35ef449f52 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -134,10 +134,9 @@ jobs: for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific - name: Debug pip environment - run: python -m pip show matplotlib && \ - python -m pip list | grep -i qt + run: pip list | grep -i qt - name: Remove Qt bindings - run: python -m pip uninstall -y PyQt5 PyQt6 PySide2 PySide6 || true + run: pip uninstall -y PyQt5 PyQt6 PySide2 PySide6 || true - name: Download Data run: | mkdir -p data_dl From 4b6c310d5d80e40daf64056dd05162aad127ef42 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:09:26 +0200 Subject: [PATCH 59/74] again --- .github/workflows/epidata_main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index 35ef449f52..cac164840a 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -134,9 +134,11 @@ jobs: for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific - name: Debug pip environment - run: pip list | grep -i qt + run: | + pip list | grep -i qt - name: Remove Qt bindings - run: pip uninstall -y PyQt5 PyQt6 PySide2 PySide6 || true + run: | + pip uninstall -y PyQt5 PyQt6 PyQt6-Qt6 PyQt6_sip || true - name: Download Data run: | mkdir -p data_dl From 7568f834e3dce845b5b53874af2d2364a0052ffb Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:30:34 +0200 Subject: [PATCH 60/74] try again --- .github/workflows/epidata_main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index cac164840a..5fc1a104c3 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -142,6 +142,7 @@ jobs: - name: Download Data run: | mkdir -p data_dl + python -c "import matplotlib; matplotlib.use('Agg')" getcasedata -o data_dl --no-progress-indicators getpopuldata -o data_dl --no-progress-indicators getjhdata -o data_dl --no-progress-indicators From b4dd5766e8246f24a712066430bad542848c03d8 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:35:45 +0200 Subject: [PATCH 61/74] other version --- .github/actions/build-py/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index bd6f92e4ad..686df31e84 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -50,7 +50,7 @@ runs: cp -r wheelhouse pycode fi - name: Upload Python Wheels - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v4 with: name: python-wheels-${{ inputs.package }} path: pycode/wheelhouse From a37e771e7c105ed51792f7ac05032089aacd6909 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:45:54 +0200 Subject: [PATCH 62/74] reset epidata_main and action to previous state --- .github/actions/build-py/action.yml | 34 +++++++++++++++-------------- .github/workflows/epidata_main.yml | 9 -------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 686df31e84..e7ee443571 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -16,25 +16,27 @@ runs: - name: Make artifact dir shell: bash run: | - if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${{ inputs.package }}/ - # else stay in root directory - fi + # if [ "${{ inputs.package }}" != "simulation" ]; then + # cd pycode/memilio-${{ inputs.package }}/ + # # else stay in root directory + # fi + cd pycode/memilio-${{ inputs.package }}/ mkdir wheelhouse - name: Build Python Wheels shell: bash run: | - if [ "${{ inputs.package }}" != "simulation" ]; then - cd pycode/memilio-${{ inputs.package }}/ - # else stay in root directory - fi + # if [ "${{ inputs.package }}" != "simulation" ]; then + # cd pycode/memilio-${{ inputs.package }}/ + # # else stay in root directory + # fi + cd pycode/memilio-${{ inputs.package }}/ /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 pip install setuptools-scm + # /opt/python/cp38-cp38/bin/python -m pip install setuptools-scm /opt/python/cp38-cp38/bin/python -m build --no-isolation --wheel /opt/python/cp312-cp312/bin/python -m pip install --upgrade pip setuptools wheel /opt/python/cp312-cp312/bin/python -m pip install scikit-build scikit-build-core - /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm + # /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm /opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel # Exclude memilio-generation, because its a pure python package, cmake is only used in the build process to retrieve data from cpp if [[ -f "CMakeLists.txt" ]] && [ "${{ inputs.package }}" != "generation" ]; then @@ -44,14 +46,14 @@ runs: # no auditwheel necessary for pure python packages, so only copy the wheels to the same output directory cp dist/*.whl wheelhouse fi - if [ "${{ inputs.package }}" != "simulation" ]; then - cp -r wheelhouse .. - else - cp -r wheelhouse pycode - fi + # if [ "${{ inputs.package }}" != "simulation" ]; then + # cp -r wheelhouse .. + # else + # cp -r wheelhouse pycode + # fi + cp -r wheelhouse .. - name: Upload Python Wheels uses: actions/upload-artifact@v4 with: name: python-wheels-${{ inputs.package }} path: pycode/wheelhouse - diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index 5fc1a104c3..3cd8fea21b 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -111,8 +111,6 @@ jobs: needs: build-py-epidata runs-on: ubuntu-latest continue-on-error: true - env: - MPLBACKEND: Agg steps: - uses: actions/checkout@v4 - name: Install dependencies @@ -133,16 +131,9 @@ jobs: run: | for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific - - name: Debug pip environment - run: | - pip list | grep -i qt - - name: Remove Qt bindings - run: | - pip uninstall -y PyQt5 PyQt6 PyQt6-Qt6 PyQt6_sip || true - name: Download Data run: | mkdir -p data_dl - python -c "import matplotlib; matplotlib.use('Agg')" getcasedata -o data_dl --no-progress-indicators getpopuldata -o data_dl --no-progress-indicators getjhdata -o data_dl --no-progress-indicators From 1acecee951a32e5c64d687554f74eacc4b9bb1d1 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:55:29 +0200 Subject: [PATCH 63/74] reintroduce if statements --- .github/actions/build-py/action.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index e7ee443571..a29f35eaab 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -25,11 +25,10 @@ runs: - name: Build Python Wheels shell: bash run: | - # if [ "${{ inputs.package }}" != "simulation" ]; then - # cd pycode/memilio-${{ inputs.package }}/ - # # else stay in root directory - # fi - 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 pip install setuptools-scm @@ -46,12 +45,11 @@ runs: # no auditwheel necessary for pure python packages, so only copy the wheels to the same output directory cp dist/*.whl wheelhouse fi - # if [ "${{ inputs.package }}" != "simulation" ]; then - # cp -r wheelhouse .. - # else - # cp -r wheelhouse pycode - # fi - cp -r wheelhouse .. + if [ "${{ inputs.package }}" != "simulation" ]; then + cp -r wheelhouse .. + else + cp -r wheelhouse pycode + fi - name: Upload Python Wheels uses: actions/upload-artifact@v4 with: From a91d67c5e4c6cafd636e80c37201829c86a46b99 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:03:05 +0200 Subject: [PATCH 64/74] install setuptools again --- .github/actions/build-py/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index a29f35eaab..7d0b9ccf0e 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -31,11 +31,11 @@ runs: 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 pip install setuptools-scm + /opt/python/cp38-cp38/bin/python -m pip install setuptools-scm /opt/python/cp38-cp38/bin/python -m build --no-isolation --wheel /opt/python/cp312-cp312/bin/python -m pip install --upgrade pip setuptools wheel /opt/python/cp312-cp312/bin/python -m pip install scikit-build scikit-build-core - # /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm + /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm /opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel # Exclude memilio-generation, because its a pure python package, cmake is only used in the build process to retrieve data from cpp if [[ -f "CMakeLists.txt" ]] && [ "${{ inputs.package }}" != "generation" ]; then From cf930279ff8024f523558c2dfd4b7c38c2b5aa91 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:08:28 +0200 Subject: [PATCH 65/74] install setuptools only for memilio-simulation --- .github/actions/build-py/action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 7d0b9ccf0e..9a4a66ab1d 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -30,13 +30,16 @@ runs: # 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 pip install setuptools-scm + /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 /opt/python/cp312-cp312/bin/python -m pip install --upgrade pip setuptools wheel /opt/python/cp312-cp312/bin/python -m pip install scikit-build scikit-build-core - /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm /opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel + # Install setuptools-scm only for memilio-simulation + if [ "${{ inputs.package }}" == "simulation" ]; then + /opt/python/cp38-cp38/bin/python -m pip install setuptools-scm + /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm + fi # Exclude memilio-generation, because its a pure python package, cmake is only used in the build process to retrieve data from cpp if [[ -f "CMakeLists.txt" ]] && [ "${{ inputs.package }}" != "generation" ]; then # includes native dependencies in the wheel From 7dd3357bd61fa35599f9dc245178d601cdd642a3 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:17:35 +0200 Subject: [PATCH 66/74] forgot if statement --- .github/actions/build-py/action.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 9a4a66ab1d..f9b9dc6bc2 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -16,11 +16,10 @@ runs: - name: Make artifact dir shell: bash run: | - # if [ "${{ inputs.package }}" != "simulation" ]; then - # cd pycode/memilio-${{ inputs.package }}/ - # # else stay in root directory - # fi - 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 From 27bb822b69268109154cc29f473081497f52f563 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:29:12 +0200 Subject: [PATCH 67/74] fix order --- .github/actions/build-py/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index f9b9dc6bc2..cec6a7b367 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -29,16 +29,16 @@ runs: # 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 /opt/python/cp312-cp312/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/cp312-cp312/bin/python -m pip install scikit-build scikit-build-core - /opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel # Install setuptools-scm only for memilio-simulation if [ "${{ inputs.package }}" == "simulation" ]; then /opt/python/cp38-cp38/bin/python -m pip install setuptools-scm /opt/python/cp312-cp312/bin/python -m pip install setuptools-scm fi + /opt/python/cp38-cp38/bin/python -m build --no-isolation --wheel + /opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel # Exclude memilio-generation, because its a pure python package, cmake is only used in the build process to retrieve data from cpp if [[ -f "CMakeLists.txt" ]] && [ "${{ inputs.package }}" != "generation" ]; then # includes native dependencies in the wheel From 37b02339d531c3ea15efe0ecee7c48b212d073e5 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 14 Apr 2026 15:34:58 +0200 Subject: [PATCH 68/74] review suggestions, test changes on test pypi --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 94eb44e596..d423b845f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,15 @@ dependencies = [ # smaller pandas versions contain a bug that sometimes prevents reading "pandas>=2.0.0" ] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.12", + "Operating System :: POSIX :: Linux", + "Operating System :: Microsoft :: Windows" +] [project.optional-dependencies] dev = [] From 27e4ba77398d40ce8483b007b70d1c38820ec864 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 14 Apr 2026 15:41:39 +0200 Subject: [PATCH 69/74] update workflow according to review --- .github/workflows/pypi.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 528a3c8dc4..47b45d9ce4 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,8 +1,11 @@ name: PyPI -on: [release] +# on: +# release: +# types: +# - published # remove following line before merge: -# on: [pull_request, release] +on: [pull_request, release] jobs: @@ -13,13 +16,13 @@ jobs: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: pypa/cibuildwheel@v2.16 + - uses: pypa/cibuildwheel@v3.4.1 - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v4 with: name: cibw-wheels-${{ matrix.os }} path: ./wheelhouse/*.whl @@ -28,13 +31,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - run: pipx run build --sdist - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v4 with: name: cibw-sdist path: dist/*.tar.gz @@ -47,7 +50,7 @@ jobs: id-token: write steps: - - uses: actions/download-artifact@v8 + - uses: actions/download-artifact@v4 with: # unpacks all CIBW artifacts into dist/ pattern: cibw-* @@ -58,4 +61,4 @@ jobs: with: skip-existing: true # To test uploads to TestPyPI, uncomment the following: - # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 9ab4c4fe45e11f6e7f7546ef73ab2df7533ea4a7 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Wed, 15 Apr 2026 11:59:44 +0200 Subject: [PATCH 70/74] update classifiers and readthedocs --- docs/source/getting_started.rst | 19 ++++++++++++++----- pyproject.toml | 4 ++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index cd5a521f7e..9b0a0c71b1 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -131,25 +131,33 @@ Option A: Installing the Python packages (Recommended for nonexperienced users o You can run simulations, download data, or create plots, by only installing our Python packages. +If you want to use the simulation package ``memilio-simulation``, you can install it directly via: + +.. code-block:: + + pip install memilio-simulation + +For the other packages, you can proceed as follows. + 1. Navigate to the directory containing our Python code: .. code-block:: console cd pycode -2. To install the simulation package ``memilio-simulation``, from here you can do: +2. To install the simulation package ``memilio-epidata``, from here you can do: .. code-block:: console - cd memilio-simulation + cd memilio-epidata pip install -e . -3. For afterwards installing the ``memilio-epidata`` package for data downloading and handling, run: +3. For afterwards installing the ``memilio-surrogatemodel`` package for data downloading and handling, run: .. code-block:: console cd .. # Go back to the pycode directory - cd memilio-epidata + cd memilio-surrogatemodel pip install -e . .. tip:: For Contributors: Installing development packages @@ -162,7 +170,8 @@ You can run simulations, download data, or create plots, by only installing our pip install -e .[dev] - For regular use, the simple ``pip install -e .`` is sufficient. + For regular use, the simple ``pip install -e .`` is sufficient. For development of the ``memilio-simulation`` package, + please also use this command from the root of the MEmilio repository for installation. To install other packages, see the items below *Python Interface* in the menu on the left hand side. diff --git a/pyproject.toml b/pyproject.toml index d423b845f2..64d74ae75d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,11 @@ classifiers = [ "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows" ] From 414b679daf98ab05c49b9b80555d8fd1b3308d5b Mon Sep 17 00:00:00 2001 From: HenrZu <69154294+HenrZu@users.noreply.github.com> Date: Tue, 21 Apr 2026 08:10:39 +0200 Subject: [PATCH 71/74] extend documentation --- docs/source/getting_started.rst | 45 ++++++++++++++++++++++------- docs/source/python/m-simulation.rst | 44 ++++++++++++++++++++++++++-- pycode/memilio-simulation/README.md | 27 ++++++++++++++--- 3 files changed, 100 insertions(+), 16 deletions(-) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 9b0a0c71b1..99adc61b7c 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -131,13 +131,42 @@ Option A: Installing the Python packages (Recommended for nonexperienced users o You can run simulations, download data, or create plots, by only installing our Python packages. -If you want to use the simulation package ``memilio-simulation``, you can install it directly via: +Installing ``memilio-simulation`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. code-block:: +The simulation package ``memilio-simulation`` provides two installation options depending on your use case: + +**Option A.1: Install from PyPI (Recommended - no C++ compiler required)** + +If you just want to run simulations with the latest released version, install the pre-built wheel directly from PyPI: + +.. code-block:: console pip install memilio-simulation -For the other packages, you can proceed as follows. +This requires no C++ compiler or CMake. Pre-built wheels are provided for Linux and Windows on Python 3.8 to 3.13. + +.. note:: + macOS is currently not supported with pre-built wheels. macOS users can install from source (see Option A.2 below). + +**Option A.2: Install from source (for the latest development version or macOS)** + +If you need the latest (unreleased) code, want to contribute to the package, or are on macOS, you need to build from source. +This requires a **C++20 compiler** (e.g. GCC or Clang), **CMake** (>= 3.18), and **Ninja**. + +.. code-block:: console + + pip install -e .[dev] + +This command must be run from the **root of the MEmilio repository** (the directory containing the top-level ``pyproject.toml``). +This is necessary because the C++ build requires access to the ``cpp/`` directory. +Note that this only installs ``memilio-simulation`` and not any other Python packages. The root-level ``pyproject.toml`` belongs exclusively to ``memilio-simulation``. + +.. warning:: + C++ code changes always require re-running ``pip install -e .[dev]`` to recompile. + +Installing other Python packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1. Navigate to the directory containing our Python code: @@ -145,14 +174,14 @@ For the other packages, you can proceed as follows. cd pycode -2. To install the simulation package ``memilio-epidata``, from here you can do: +2. To install the ``memilio-epidata`` package for data downloading and handling: .. code-block:: console cd memilio-epidata pip install -e . -3. For afterwards installing the ``memilio-surrogatemodel`` package for data downloading and handling, run: +3. To install the ``memilio-surrogatemodel`` package for surrogate models: .. code-block:: console @@ -163,16 +192,12 @@ For the other packages, you can proceed as follows. .. tip:: For Contributors: Installing development packages The ``-e`` flag installs the package in a mode, which links the installation to your local source code folder. - - If you plan to contribute to MEmilio, you can also install all the necessary development dependencies by adding ``[dev]`` to the command: + If you plan to contribute to any package, install all development dependencies by adding ``[dev]``: .. code-block:: console pip install -e .[dev] - For regular use, the simple ``pip install -e .`` is sufficient. For development of the ``memilio-simulation`` package, - please also use this command from the root of the MEmilio repository for installation. - To install other packages, see the items below *Python Interface* in the menu on the left hand side. Option B: Building the C++ core (Advanced) diff --git a/docs/source/python/m-simulation.rst b/docs/source/python/m-simulation.rst index fc1d97abe2..b4343b3a14 100644 --- a/docs/source/python/m-simulation.rst +++ b/docs/source/python/m-simulation.rst @@ -5,12 +5,52 @@ MEmilio Simulation is a Python interface to the MEmilio C++ library. Using pytho The package is contained inside the folder `pycode/memilio-simulation `_. +Installation +------------ + +The ``memilio-simulation`` package can be installed in two ways depending on your use case. + +**Option 1: Install from PyPI (Recommended - no C++ compiler required)** + +Pre-built wheels are provided for Linux and Windows on Python 3.8 to 3.13. + +.. code-block:: console + + pip install memilio-simulation + +This is the easiest way to get started. No C++ compiler or CMake is needed. + +.. note:: + macOS is currently not supported with pre-built wheels. macOS users must install from source (see Option 2). + +**Option 2: Install from source (latest development version, macOS, or contributing)** + +If you need the latest unreleased code, want to modify the bindings, or are on macOS, build from source. + +Requirements: + +* A **C++20 compiler** +* **CMake** >= 3.18 +* **Ninja** build tool +* All :doc:`C++ library dependencies <../getting_started>` + +Install from the **root of the MEmilio repository** (the directory containing the top-level ``pyproject.toml``): + +.. code-block:: console + + pip install -e .[dev] + +This is necessary because the C++ build requires access to the ``cpp/`` directory. +Note that this only installs ``memilio-simulation`` and not any other Python packages.The ``-e`` flag links the installation to your local source code so Python changes are reflected immediately. +C++ changes require re-running this command to recompile. + Dependencies ------------ -Required Python packages: +Required Python packages (installed automatically): -* scikit-build +* numpy >= 1.22 (not 1.25.*) +* pandas >= 2.0.0 For a successful build, the development libraries for Python need to be installed, i.e. python3.x-dev. Additionally, as this package builds upon the MEmilio C++ library, diff --git a/pycode/memilio-simulation/README.md b/pycode/memilio-simulation/README.md index 8f23dc82a0..05a6955251 100644 --- a/pycode/memilio-simulation/README.md +++ b/pycode/memilio-simulation/README.md @@ -4,17 +4,36 @@ This package contains Python bindings for the MEmilio C++ library. It enables se ## Installation -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. +### Option 1: Install from PyPI (Recommended) -To install the package, use the command +Pre-built wheels are provided for Linux and Windows on Python 3.8 to 3.13. ```bash pip install memilio-simulation ``` -This builds the C++ library and C++ Python extension module and copies everything required to your site-packages. +**Note:** macOS is currently not supported with pre-built wheels. macOS users must install from source (see Option 2). -All the requirements of the [C++ library](../../cpp/README.md) must be met in order to build and use the python bindings. A virtual environment is recommended. +### Option 2: Install from source (latest code, macOS, or development) + +Use this option if you need the latest unreleased code, want to modify the C++ bindings, or use macOS. + +This project is configured via `pyproject.toml`. The following tools must be available on the system: + +- A **C++20 compiler** +- **CMake** >= 3.18 +- **Ninja** +- All [C++ library dependencies](../../cpp/README.md) + +A virtual environment is recommended. Install from the **root of the MEmilio repository** (the directory containing the top-level `pyproject.toml`): + +```bash +pip install -e .[dev] +``` + +This is necessary because the C++ build requires access to the `cpp/` directory. Note that this only installs `memilio-simulation` and not any other Python packages. + +**Note:** The `-e` flag links the installation to your local source code. Python changes take effect immediately, but C++ changes require re-running this command to recompile. CMake is executed internally by scikit-build-core. All the options provided by the CMake configuration of the C++ library are available when building the Python extension as well. Additionally, the CMake configuration for the bindings provide the following CMake options: From 1b652a1233c2d5bb6e3de34a6f460ec6a3d8e3ba Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 21 Apr 2026 09:08:57 +0200 Subject: [PATCH 72/74] docu and dont build wheels for python 3.14 --- docs/source/getting_started.rst | 7 ++----- docs/source/python/m-simulation.rst | 7 ++----- pycode/memilio-simulation/README.md | 6 ++---- pyproject.toml | 4 +++- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 99adc61b7c..f042e3ee8d 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -146,12 +146,9 @@ If you just want to run simulations with the latest released version, install th This requires no C++ compiler or CMake. Pre-built wheels are provided for Linux and Windows on Python 3.8 to 3.13. -.. note:: - macOS is currently not supported with pre-built wheels. macOS users can install from source (see Option A.2 below). - -**Option A.2: Install from source (for the latest development version or macOS)** +**Option A.2: Install from source (for the latest development version)** -If you need the latest (unreleased) code, want to contribute to the package, or are on macOS, you need to build from source. +If you need the latest (unreleased) code, or want to contribute to the package, you need to build from source. This requires a **C++20 compiler** (e.g. GCC or Clang), **CMake** (>= 3.18), and **Ninja**. .. code-block:: console diff --git a/docs/source/python/m-simulation.rst b/docs/source/python/m-simulation.rst index b4343b3a14..f47a6e0045 100644 --- a/docs/source/python/m-simulation.rst +++ b/docs/source/python/m-simulation.rst @@ -20,12 +20,9 @@ Pre-built wheels are provided for Linux and Windows on Python 3.8 to 3.13. This is the easiest way to get started. No C++ compiler or CMake is needed. -.. note:: - macOS is currently not supported with pre-built wheels. macOS users must install from source (see Option 2). +**Option 2: Install from source (latest development version, or contributing)** -**Option 2: Install from source (latest development version, macOS, or contributing)** - -If you need the latest unreleased code, want to modify the bindings, or are on macOS, build from source. +If you need the latest unreleased code, or want to modify the bindings, build from source. Requirements: diff --git a/pycode/memilio-simulation/README.md b/pycode/memilio-simulation/README.md index 05a6955251..d521a36e04 100644 --- a/pycode/memilio-simulation/README.md +++ b/pycode/memilio-simulation/README.md @@ -12,11 +12,9 @@ Pre-built wheels are provided for Linux and Windows on Python 3.8 to 3.13. pip install memilio-simulation ``` -**Note:** macOS is currently not supported with pre-built wheels. macOS users must install from source (see Option 2). +### Option 2: Install from source (latest code or development) -### Option 2: Install from source (latest code, macOS, or development) - -Use this option if you need the latest unreleased code, want to modify the C++ bindings, or use macOS. +Use this option if you need the latest unreleased code, or want to modify the C++ bindings. This project is configured via `pyproject.toml`. The following tools must be available on the system: diff --git a/pyproject.toml b/pyproject.toml index 64d74ae75d..070131e437 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,6 @@ [project] +# Note that this file is only installing the memilio-simulation package. For installing the other Python packages, +# please go to the respective folder pycode/memilio-* and install from there. name = "memilio-simulation" dynamic = ["version"] # remove following line before merge: @@ -60,7 +62,7 @@ local_scheme = "no-local-version" [tool.cibuildwheel] # Disable some wheels -skip = ["pp*", "*musllinux*", "*-win32"] +skip = ["pp*", "*musllinux*", "*-win32", "cp314*"] [tool.autopep8] max-line-length = 79 From 70ba18b54893e0e6da6df66ad02b0d1f65574a09 Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:18:02 +0200 Subject: [PATCH 73/74] upload to pypi as version 2.3.0 --- .github/workflows/pypi.yml | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 47b45d9ce4..c04e992fae 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -61,4 +61,4 @@ jobs: with: skip-existing: true # To test uploads to TestPyPI, uncomment the following: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 070131e437..0a70437463 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,9 @@ # Note that this file is only installing the memilio-simulation package. For installing the other Python packages, # please go to the respective folder pycode/memilio-* and install from there. name = "memilio-simulation" -dynamic = ["version"] +# dynamic = ["version"] # remove following line before merge: -# version = "2.3.0" +version = "2.3.0" description = "Part of MEmilio project, Python bindings to the C++ libraries that contain the models and simulations." readme = "README.md" requires-python = ">=3.8" From eaf9b945d3acb1185d5226509cf6e7e0787cfe3e Mon Sep 17 00:00:00 2001 From: Anna Wendler <106674756+annawendler@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:27:54 +0200 Subject: [PATCH 74/74] prepare for merge --- .github/workflows/pypi.yml | 10 ++++------ pyproject.toml | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c04e992fae..57a2a3a782 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,11 +1,9 @@ name: PyPI -# on: -# release: -# types: -# - published -# remove following line before merge: -on: [pull_request, release] +on: + release: + types: + - published jobs: diff --git a/pyproject.toml b/pyproject.toml index 0a70437463..15fa1202dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,7 @@ # Note that this file is only installing the memilio-simulation package. For installing the other Python packages, # please go to the respective folder pycode/memilio-* and install from there. name = "memilio-simulation" -# dynamic = ["version"] -# remove following line before merge: -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"