diff --git a/.github/actions/build-py/action.yml b/.github/actions/build-py/action.yml index e0632831b3..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/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/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-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: diff --git a/.github/actions/test-pylint/action.yml b/.github/actions/test-pylint/action.yml index d645c76aa2..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/*cp311*. + # Pylint runs against the prebuilt wheels in pycode/wheelhouse/*cp312*. # So, use current latest supported Python version. - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.11" + 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/*cp311*.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 e3ee6ac2ca..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.11 + 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.11"] + 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.11"] + 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.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - 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/*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 9b0c6505ea..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.11 + 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.11"] + 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.11"] + 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.11"] + version: ["3.8", "3.12"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 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 diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index d57a103cb2..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.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.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 1639291e00..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.11. +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 b0ce32b705..75eef7bbe2 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", @@ -41,9 +42,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.scripts] diff --git a/pycode/memilio-plot/pyproject.toml b/pycode/memilio-plot/pyproject.toml index 6f45f8634a..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 @@ -36,9 +37,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]