From 1fddb6754122d0ac7078f0ee263e82082008f8eb Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Mon, 8 Dec 2025 14:09:22 +0100 Subject: [PATCH 1/9] CHG: Use Python 3.13 for tests in CI --- .github/actions/build-py/action.yml | 6 +++--- .github/actions/test-pylint/action.yml | 8 ++++---- .github/workflows/epidata_main.yml | 12 ++++++------ .github/workflows/main.yml | 8 ++++---- docs/source/getting_started.rst | 2 +- pycode/README.rst | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index e0632831b3..12c111872b 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -22,9 +22,9 @@ runs: /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/cp311-cp311/bin/python -m pip install --upgrade pip setuptools wheel - /opt/python/cp311-cp311/bin/python -m pip install scikit-build scikit-build-core - /opt/python/cp311-cp311/bin/python -m build --no-isolation --wheel + /opt/python/cp313-cp313/bin/python -m pip install --upgrade pip setuptools wheel + /opt/python/cp313-cp313/bin/python -m pip install scikit-build scikit-build-core + /opt/python/cp313-cp313/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 diff --git a/.github/actions/test-pylint/action.yml b/.github/actions/test-pylint/action.yml index d645c76aa2..365723d613 100644 --- a/.github/actions/test-pylint/action.yml +++ b/.github/actions/test-pylint/action.yml @@ -13,12 +13,12 @@ runs: sudo apt-get -qq update sudo apt-get -qq -y install python3-pip gnupg python -m pip install --upgrade pip - # Pylint runs against the prebuilt wheels in pycode/wheelhouse/*cp311*. + # Pylint runs against the prebuilt wheels in pycode/wheelhouse/*cp313*. # So, use current latest supported Python version. - - name: Set up Python 3.11 + - name: Set up Python 3.13 uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.13" - name: Download Python Wheels uses: actions/download-artifact@v4 with: @@ -28,7 +28,7 @@ runs: shell: bash run: | shopt -s nullglob - for pkg in pycode/wheelhouse/*cp311*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific + for pkg in pycode/wheelhouse/*cp313*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific for pkg in pycode/wheelhouse/*py3*.whl; do python -m pip install "$pkg"; done # pure python packages are not version specific python -m pip install --upgrade-strategy only-if-needed --prefer-binary --find-links pycode/wheelhouse "memilio-${{ inputs.package }}[dev]" - name: Run pylint diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index e3ee6ac2ca..e789ad0f61 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.13 - uses: pre-commit/action@v3.0.1 build-py-epidata: @@ -51,7 +51,7 @@ jobs: needs: build-py-epidata strategy: matrix: - version: ["3.8", "3.11"] + version: ["3.8", "3.13"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -66,7 +66,7 @@ jobs: needs: [build-py-plot, build-py-epidata] strategy: matrix: - version: ["3.8", "3.11"] + version: ["3.8", "3.13"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -123,13 +123,13 @@ jobs: with: name: python-wheels-epidata path: pycode/wheelhouse - - name: Set up Python 3.11 + - name: Set up Python 3.13 uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.13 - name: Install Python Wheels run: | - for pkg in `ls pycode/wheelhouse/*cp311*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific + for pkg in `ls pycode/wheelhouse/*cp313*.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: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b0c6505ea..e7d31dda2a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.13 - uses: pre-commit/action@v3.0.1 build-cpp-gcc_clang: @@ -291,7 +291,7 @@ jobs: if: github.event.pull_request.draft == false strategy: matrix: - version: ["3.8", "3.11"] + version: ["3.8", "3.13"] needs: build-py-generation runs-on: ubuntu-latest steps: @@ -305,7 +305,7 @@ jobs: needs: build-py-simulation strategy: matrix: - version: ["3.8", "3.11"] + version: ["3.8", "3.13"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -318,7 +318,7 @@ jobs: needs: [build-py-surrogatemodel, build-py-simulation] strategy: matrix: - version: ["3.8", "3.11"] + version: ["3.8", "3.13"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index d57a103cb2..d754082922 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -89,7 +89,7 @@ Before you can install MEmilio, you need to install some common development tool * **Python:** Required for the Python packages. - * MEmilio is tested daily with Python 3.8 and 3.11. While other versions may also work, we recommend using the latest release of either of these. You can download it from the official website `python.org `__. + * MEmilio is tested daily with Python 3.8 and 3.13. While other versions may also work, we recommend using the latest release of either of these. You can download it from the official website `python.org `__. * **C++ Compiler and CMake:** diff --git a/pycode/README.rst b/pycode/README.rst index 1639291e00..409a0dbb5b 100644 --- a/pycode/README.rst +++ b/pycode/README.rst @@ -25,4 +25,4 @@ We recommend to use a virtual python environment to avoid dependency conflicts w Refer to the `Python documentation `_ for more information about virtual environments. -The packages are tested for Python 3.8 - 3.11. +The packages are tested for Python 3.8 - 3.13. From 9a0c500b3b267a7bbf4dbf018be5b90bdb70b123 Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:18:25 +0100 Subject: [PATCH 2/9] CHG: Update pre-commit --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 934cd51526..58c80bd6c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: hooks: - id: pyupgrade args: [--py37-plus] -- repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v2.0.0 +- repo: https://github.com/hhatto/autopep8 + rev: v2.3.2 hooks: - id: autopep8 From f42ec17c40d729274b1a26ea20ce0656b0ef93ed Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:24:03 +0100 Subject: [PATCH 3/9] CHG: Upgrade twill --- pycode/memilio-epidata/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycode/memilio-epidata/pyproject.toml b/pycode/memilio-epidata/pyproject.toml index b0ce32b705..173ce4921d 100644 --- a/pycode/memilio-epidata/pyproject.toml +++ b/pycode/memilio-epidata/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ "requests", "pyxlsb", "wget", - "twill==3.1", + "twill==3.3", "PyQt6-sip<13.9", "PyQt6", "python-calamine", From d43981515e4817a280a1e18b4d1ebb11b017c61b Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:53:56 +0100 Subject: [PATCH 4/9] CHG: Switch to Python 3.12 as otherwise we need to get rid of pkg_resources --- .github/actions/build-py/action.yml | 6 +++--- .github/actions/test-pylint/action.yml | 8 ++++---- .github/workflows/epidata_main.yml | 12 ++++++------ .github/workflows/main.yml | 8 ++++---- docs/source/getting_started.rst | 2 +- pycode/README.rst | 2 +- pycode/memilio-epidata/pyproject.toml | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index 12c111872b..757f9f58a0 100644 --- a/.github/actions/build-py/action.yml +++ b/.github/actions/build-py/action.yml @@ -22,9 +22,9 @@ runs: /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/cp313-cp313/bin/python -m pip install --upgrade pip setuptools wheel - /opt/python/cp313-cp313/bin/python -m pip install scikit-build scikit-build-core - /opt/python/cp313-cp313/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 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 diff --git a/.github/actions/test-pylint/action.yml b/.github/actions/test-pylint/action.yml index 365723d613..049fa88ddf 100644 --- a/.github/actions/test-pylint/action.yml +++ b/.github/actions/test-pylint/action.yml @@ -13,12 +13,12 @@ runs: sudo apt-get -qq update sudo apt-get -qq -y install python3-pip gnupg python -m pip install --upgrade pip - # Pylint runs against the prebuilt wheels in pycode/wheelhouse/*cp313*. + # Pylint runs against the prebuilt wheels in pycode/wheelhouse/*cp312*. # So, use current latest supported Python version. - - name: Set up Python 3.13 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" - name: Download Python Wheels uses: actions/download-artifact@v4 with: @@ -28,7 +28,7 @@ runs: shell: bash run: | shopt -s nullglob - for pkg in pycode/wheelhouse/*cp313*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific + for pkg in pycode/wheelhouse/*cp312*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific for pkg in pycode/wheelhouse/*py3*.whl; do python -m pip install "$pkg"; done # pure python packages are not version specific python -m pip install --upgrade-strategy only-if-needed --prefer-binary --find-links pycode/wheelhouse "memilio-${{ inputs.package }}[dev]" - name: Run pylint diff --git a/.github/workflows/epidata_main.yml b/.github/workflows/epidata_main.yml index e789ad0f61..3cd8fea21b 100644 --- a/.github/workflows/epidata_main.yml +++ b/.github/workflows/epidata_main.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.13 + python-version: 3.12 - uses: pre-commit/action@v3.0.1 build-py-epidata: @@ -51,7 +51,7 @@ jobs: needs: build-py-epidata strategy: matrix: - version: ["3.8", "3.13"] + version: ["3.8", "3.12"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -66,7 +66,7 @@ jobs: needs: [build-py-plot, build-py-epidata] strategy: matrix: - version: ["3.8", "3.13"] + version: ["3.8", "3.12"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -123,13 +123,13 @@ jobs: with: name: python-wheels-epidata path: pycode/wheelhouse - - name: Set up Python 3.13 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.13 + python-version: 3.12 - name: Install Python Wheels run: | - for pkg in `ls pycode/wheelhouse/*cp313*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific + 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: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7d31dda2a..b87795d7bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.13 + python-version: 3.12 - uses: pre-commit/action@v3.0.1 build-cpp-gcc_clang: @@ -291,7 +291,7 @@ jobs: if: github.event.pull_request.draft == false strategy: matrix: - version: ["3.8", "3.13"] + version: ["3.8", "3.12"] needs: build-py-generation runs-on: ubuntu-latest steps: @@ -305,7 +305,7 @@ jobs: needs: build-py-simulation strategy: matrix: - version: ["3.8", "3.13"] + version: ["3.8", "3.12"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -318,7 +318,7 @@ jobs: needs: [build-py-surrogatemodel, build-py-simulation] strategy: matrix: - version: ["3.8", "3.13"] + version: ["3.8", "3.12"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index d754082922..175d70988e 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -89,7 +89,7 @@ Before you can install MEmilio, you need to install some common development tool * **Python:** Required for the Python packages. - * MEmilio is tested daily with Python 3.8 and 3.13. While other versions may also work, we recommend using the latest release of either of these. You can download it from the official website `python.org `__. + * MEmilio is tested daily with Python 3.8 and 3.12. While other versions may also work, we recommend using the latest release of either of these. You can download it from the official website `python.org `__. * **C++ Compiler and CMake:** diff --git a/pycode/README.rst b/pycode/README.rst index 409a0dbb5b..bc304b43fe 100644 --- a/pycode/README.rst +++ b/pycode/README.rst @@ -25,4 +25,4 @@ We recommend to use a virtual python environment to avoid dependency conflicts w Refer to the `Python documentation `_ for more information about virtual environments. -The packages are tested for Python 3.8 - 3.13. +The packages are tested for Python 3.8 - 3.12. diff --git a/pycode/memilio-epidata/pyproject.toml b/pycode/memilio-epidata/pyproject.toml index 173ce4921d..b0ce32b705 100644 --- a/pycode/memilio-epidata/pyproject.toml +++ b/pycode/memilio-epidata/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ "requests", "pyxlsb", "wget", - "twill==3.3", + "twill==3.1", "PyQt6-sip<13.9", "PyQt6", "python-calamine", From 32162447b9ded802c29ab1e13b0abf8c82783ad3 Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Mon, 8 Dec 2025 16:04:30 +0100 Subject: [PATCH 5/9] CHG: Add setuptools explicitely --- .github/actions/test-py/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-py/action.yml b/.github/actions/test-py/action.yml index 9a1cc4b2e1..e0839ac761 100644 --- a/.github/actions/test-py/action.yml +++ b/.github/actions/test-py/action.yml @@ -24,7 +24,7 @@ runs: else sudo apt-get -qq -y install python3-pip gnupg fi - python -m pip install --upgrade pip + python -m pip install --upgrade pip setuptools - name: Download Python Wheels uses: actions/download-artifact@v4 with: From 2fe8f7a3de87eaa76108fcaeac1ab78856344846 Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:44:45 +0100 Subject: [PATCH 6/9] CHG: Update Pylint --- pycode/memilio-epidata/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycode/memilio-epidata/pyproject.toml b/pycode/memilio-epidata/pyproject.toml index b0ce32b705..bfd06fa821 100644 --- a/pycode/memilio-epidata/pyproject.toml +++ b/pycode/memilio-epidata/pyproject.toml @@ -42,8 +42,8 @@ dependencies = [ dev = [ "coverage>=7.0.1", # pylint 2.16 creates problem with wrapt package version - "pylint>=2.13.0,<2.16", - "pylint_json2html==0.4.0" + "pylint>=3.0", + "pylint_json2html==0.5.0" ] [project.scripts] From 451e6fc1d69203f05889cfe7cffacaf5d5475e52 Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:59:40 +0100 Subject: [PATCH 7/9] CHG: add setuptools --- pycode/memilio-epidata/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pycode/memilio-epidata/pyproject.toml b/pycode/memilio-epidata/pyproject.toml index bfd06fa821..b9c5520344 100644 --- a/pycode/memilio-epidata/pyproject.toml +++ b/pycode/memilio-epidata/pyproject.toml @@ -14,6 +14,7 @@ maintainers = [ { email = "martin.kuehn@dlr.de" } ] dependencies = [ + "setuptools>=68", "pandas>=2.0.0", "pyarrow", "matplotlib", From 397a1fc623ac39d1a477dc906a8eb9dd6837bd64 Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:40:37 +0100 Subject: [PATCH 8/9] CHG: Update pylint version --- pycode/memilio-epidata/pyproject.toml | 1 - pycode/memilio-plot/pyproject.toml | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pycode/memilio-epidata/pyproject.toml b/pycode/memilio-epidata/pyproject.toml index b9c5520344..75eef7bbe2 100644 --- a/pycode/memilio-epidata/pyproject.toml +++ b/pycode/memilio-epidata/pyproject.toml @@ -42,7 +42,6 @@ dependencies = [ [project.optional-dependencies] dev = [ "coverage>=7.0.1", - # pylint 2.16 creates problem with wrapt package version "pylint>=3.0", "pylint_json2html==0.5.0" ] diff --git a/pycode/memilio-plot/pyproject.toml b/pycode/memilio-plot/pyproject.toml index 6f45f8634a..45f6efdbc7 100644 --- a/pycode/memilio-plot/pyproject.toml +++ b/pycode/memilio-plot/pyproject.toml @@ -36,9 +36,8 @@ dependencies = [ [project.optional-dependencies] dev = [ "coverage>=7.0.1", - # pylint 2.16 creates problem with wrapt package version - "pylint>=2.13.0,<2.16", - "pylint_json2html==0.4.0" + "pylint>=3.0", + "pylint_json2html==0.5.0" ] [project.urls] From be06553a2f11d9d385cf2030f4fc106ac1fbd4fc Mon Sep 17 00:00:00 2001 From: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:40:46 +0100 Subject: [PATCH 9/9] CHG: Add setuptools --- pycode/memilio-plot/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pycode/memilio-plot/pyproject.toml b/pycode/memilio-plot/pyproject.toml index 45f6efdbc7..3f8d15d540 100644 --- a/pycode/memilio-plot/pyproject.toml +++ b/pycode/memilio-plot/pyproject.toml @@ -14,6 +14,7 @@ maintainers = [ { email = "martin.kuehn@dlr.de" } ] dependencies = [ + "setuptools>=68", "pandas>=1.2.2", "matplotlib", # smaller numpy versions cause a security issue, 1.25 does not work together with pyfakefs