From a6d3a80222f85f8c0d87be755ea445d20b721fa3 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 11:48:54 +0200 Subject: [PATCH 01/14] Use Ubuntu 24.04. --- .github/workflows/build-env.yml | 6 +++--- .github/workflows/build-spack.yml | 2 +- spack/README.md | 6 +++--- ...4.dockerfile => ci-spack-pyprecice-deps-2404.dockerfile} | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename spack/{ci-spack-pyprecice-deps-2204.dockerfile => ci-spack-pyprecice-deps-2404.dockerfile} (94%) diff --git a/.github/workflows/build-env.yml b/.github/workflows/build-env.yml index 8de2030a..cf44d754 100644 --- a/.github/workflows/build-env.yml +++ b/.github/workflows/build-env.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Docker uses: docker/setup-buildx-action@v1 - name: Login to registry - uses: docker/login-action@v1 + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -24,5 +24,5 @@ jobs: with: push: true context: . - file: spack/ci-spack-pyprecice-deps-2204.dockerfile - tags: precice/ci-spack-pyprecice-deps-2204 + file: spack/ci-spack-pyprecice-deps-2404.dockerfile + tags: precice/ci-spack-pyprecice-deps-2404 diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index f4633796..5e5449f2 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -14,7 +14,7 @@ # name: build_spack # runs-on: ubuntu-latest # timeout-minutes: 15 -# container: precice/ci-spack-pyprecice-deps-2204 +# container: precice/ci-spack-pyprecice-deps-2404 # defaults: # run: # shell: "bash --login -eo pipefail {0}" diff --git a/spack/README.md b/spack/README.md index f905741f..a8f92f4c 100644 --- a/spack/README.md +++ b/spack/README.md @@ -2,11 +2,11 @@ The Spack package `py-pyprecice` provides the python bindings via Spack and was submitted via [pull request 19558](https://github.com/spack/spack/pull/19558) in the Spack repository. This folder contains the Spack package script that can be used for testing whether the Spack installation works. -## Docker image `precice/ci-spack-pyprecice-deps-2204` +## Docker image `precice/ci-spack-pyprecice-deps-2404` -The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` creates the image `precice/ci-spack-pyprecice-deps-2204`. This image contains all dependencies of `py-pyprecice@develop`. +The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` creates the image `precice/ci-spack-pyprecice-deps-2404`. This image contains all dependencies of `py-pyprecice@develop`. -The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-2204` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version. +The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-2404` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version. ## When a new Spack release is necessary diff --git a/spack/ci-spack-pyprecice-deps-2204.dockerfile b/spack/ci-spack-pyprecice-deps-2404.dockerfile similarity index 94% rename from spack/ci-spack-pyprecice-deps-2204.dockerfile rename to spack/ci-spack-pyprecice-deps-2404.dockerfile index 545b4baf..13051242 100644 --- a/spack/ci-spack-pyprecice-deps-2204.dockerfile +++ b/spack/ci-spack-pyprecice-deps-2404.dockerfile @@ -1,5 +1,5 @@ # Build stage with Spack pre-installed and ready to be used -FROM spack/ubuntu-jammy:latest +FROM spack/ubuntu-noble:latest # Mount the current sources into the build container # and build the default environment From 853441e9e8c03eb65cf76ef4f8777a2d530c15ab Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 12:04:23 +0200 Subject: [PATCH 02/14] Update hashes, urls, and versions. --- spack/repo/packages/py-pyprecice/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 56a744f9..0ab778af 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -14,14 +14,14 @@ class PyPyprecice(PythonPackage): homepage = "https://precice.org" git = "https://github.com/precice/python-bindings.git" - url = "https://github.com/precice/python-bindings/archive/v2.4.0.0.tar.gz" + url = "https://github.com/precice/python-bindings/archive/v3.1.0.tar.gz" maintainers("ajaust", "BenjaminRodenberg", "IshaanDesai") # Always prefer final version of release candidate version("develop", branch="develop") - version("2.5.0.2", sha256="6d7b78da830db6c5133b44617196ee90be8c7d6c8e14c8994a4800b3d4856416") - version("2.5.0.1", sha256="e2602f828d4f907ea93e34f7d4adb8db086044a75a446592a4099423d56ed62c") - version("2.5.0.0", sha256="9f55a22594bb602cde8a5987217728569f16d9576ea53ed00497e9046a2e1794") + version("3.1.0", sha256="8d9bd9e28859001ab503a1e2f90e54b3c000079f04c14dc7c0c04c61c5666641") + version("3.0.0.0", sha256="7e2c4b106a231b0df2a430d86d4a7b295f85adbe3478c425f863d1a4bebee9f7") + version("2.5.0.4", sha256="7f9449573eb52ce48ca3f0ab35529ea0064942487842515ae0a2c9299aa0f0db") version("2.4.0.0", sha256="e80d16417b8ce1fdac80c988cb18ae1e16f785c5eb1035934d8b37ac18945242") version("2.3.0.1", sha256="ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789") version("2.2.1.1", sha256="139bac5077c3807e1b7b83d8d0da5ca0fc8c17393fd0df4bc5999cd63a351b78") @@ -37,6 +37,8 @@ class PyPyprecice(PythonPackage): for ver in [ "develop", + "3.1", # only consider major.minor from 3.1.0. See https://github.com/precice/python-bindings/pull/199 + "3.0.0", "2.5.0", "2.4.0", "2.3.0", From ab58144c51d822c844efcb9c4d9090215723decd Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 13:58:37 +0200 Subject: [PATCH 03/14] Activate test. --- .github/workflows/build-spack.yml | 70 +++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 5e5449f2..665ec23c 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -1,35 +1,35 @@ -# name: Build Spack -# on: -# push: -# branches: -# - "*" -# pull_request: -# branches: -# - "*" -# schedule: -# - cron: '0 4 * * 1' # Schedule it every Sunday -# -# jobs: -# build_spack: -# name: build_spack -# runs-on: ubuntu-latest -# timeout-minutes: 15 -# container: precice/ci-spack-pyprecice-deps-2404 -# defaults: -# run: -# shell: "bash --login -eo pipefail {0}" -# steps: -# - name: Checkout Repository -# uses: actions/checkout@v2 -# - name: Move Package Script -# run: | -# cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ -# - name: Try to build py-pyprecice with spack and test it -# run: | -# . /opt/spack/share/spack/setup-env.sh -# spack env activate ci && spack arch -# spack remove py-pyprecice -# spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop -# spack install && spack find -# spack load py-pyprecice -# BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file +name: Build Spack +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" + schedule: + - cron: '0 4 * * 1' # Schedule it every Sunday + +jobs: + build_spack: + name: build_spack + runs-on: ubuntu-latest + timeout-minutes: 15 + container: precice/ci-spack-pyprecice-deps-2404 + defaults: + run: + shell: "bash --login -eo pipefail {0}" + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Move Package Script + run: | + cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ + - name: Try to build py-pyprecice with spack and test it + run: | + . /opt/spack/share/spack/setup-env.sh + spack env activate ci && spack arch + spack remove py-pyprecice + spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop + spack install && spack find + spack load py-pyprecice + BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file From d6ce4eb43e3c0df1ea0238bfd8b87ecd5184d555 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 14:15:43 +0200 Subject: [PATCH 04/14] Install develop and latest version. --- .github/workflows/build-spack.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 665ec23c..51e96d6e 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -24,7 +24,7 @@ jobs: - name: Move Package Script run: | cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - - name: Try to build py-pyprecice with spack and test it + - name: Try to build py-pyprecice@develop with spack and test it run: | . /opt/spack/share/spack/setup-env.sh spack env activate ci && spack arch @@ -32,4 +32,13 @@ jobs: spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop spack install && spack find spack load py-pyprecice + BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" + - name: Try to build py-pyprecice@latest with spack and test it + run: | + . /opt/spack/share/spack/setup-env.sh + spack env activate ci && spack arch + spack remove py-pyprecice + spack add pyprecice.test.py-pyprecice@latest && spack develop pyprecice.test.py-pyprecice@latest + spack install && spack find + spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file From 84e15d55d0477ee400aaa364c84c9f6575b79897 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 14:19:32 +0200 Subject: [PATCH 05/14] Try without @latest. --- .github/workflows/build-spack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 51e96d6e..6a783975 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -38,7 +38,7 @@ jobs: . /opt/spack/share/spack/setup-env.sh spack env activate ci && spack arch spack remove py-pyprecice - spack add pyprecice.test.py-pyprecice@latest && spack develop pyprecice.test.py-pyprecice@latest + spack add pyprecice.test.py-pyprecice && spack develop pyprecice.test.py-pyprecice spack install && spack find spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file From 24a21f1d4325988abc54d0dccb272c40b4837826 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 14:37:21 +0200 Subject: [PATCH 06/14] Provide concrete version. --- .github/workflows/build-spack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 6a783975..f7a7aac6 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -33,12 +33,12 @@ jobs: spack install && spack find spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" - - name: Try to build py-pyprecice@latest with spack and test it + - name: Try to build py-pyprecice@3.1.0 with spack and test it run: | . /opt/spack/share/spack/setup-env.sh spack env activate ci && spack arch spack remove py-pyprecice - spack add pyprecice.test.py-pyprecice && spack develop pyprecice.test.py-pyprecice + spack add pyprecice.test.py-pyprecice@3.1.0 && spack develop pyprecice.test.py-pyprecice@3.1.0 spack install && spack find spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file From 3c299ae7316b1af36b4d78c13d3d0ba9e52b4ecd Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 15:03:36 +0200 Subject: [PATCH 07/14] Remove @3.1.0, because build time is too large. --- .github/workflows/build-spack.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index f7a7aac6..8ff0b6cb 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -32,13 +32,4 @@ jobs: spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop spack install && spack find spack load py-pyprecice - BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" - - name: Try to build py-pyprecice@3.1.0 with spack and test it - run: | - . /opt/spack/share/spack/setup-env.sh - spack env activate ci && spack arch - spack remove py-pyprecice - spack add pyprecice.test.py-pyprecice@3.1.0 && spack develop pyprecice.test.py-pyprecice@3.1.0 - spack install && spack find - spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file From e08f7a3210bee1d3359b0a1d633545c2b1df4516 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 15:16:03 +0200 Subject: [PATCH 08/14] Add newest release 3.1.1 --- spack/repo/packages/py-pyprecice/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 0ab778af..4a055fbd 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -14,11 +14,12 @@ class PyPyprecice(PythonPackage): homepage = "https://precice.org" git = "https://github.com/precice/python-bindings.git" - url = "https://github.com/precice/python-bindings/archive/v3.1.0.tar.gz" + url = "https://github.com/precice/python-bindings/archive/v3.1.1.tar.gz" maintainers("ajaust", "BenjaminRodenberg", "IshaanDesai") # Always prefer final version of release candidate version("develop", branch="develop") + version("3.1.1", sha256="50a0f1cbdb8fc362c22d316151c0e757958ff136a094e63b9b82d045d01d19c7") version("3.1.0", sha256="8d9bd9e28859001ab503a1e2f90e54b3c000079f04c14dc7c0c04c61c5666641") version("3.0.0.0", sha256="7e2c4b106a231b0df2a430d86d4a7b295f85adbe3478c425f863d1a4bebee9f7") version("2.5.0.4", sha256="7f9449573eb52ce48ca3f0ab35529ea0064942487842515ae0a2c9299aa0f0db") From a5563aae730baa665bf4ceea715a2c50b383d8a1 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 8 Jul 2024 16:09:48 +0200 Subject: [PATCH 09/14] Add missing checksums. --- spack/repo/packages/py-pyprecice/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 4a055fbd..3f86a584 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -23,6 +23,10 @@ class PyPyprecice(PythonPackage): version("3.1.0", sha256="8d9bd9e28859001ab503a1e2f90e54b3c000079f04c14dc7c0c04c61c5666641") version("3.0.0.0", sha256="7e2c4b106a231b0df2a430d86d4a7b295f85adbe3478c425f863d1a4bebee9f7") version("2.5.0.4", sha256="7f9449573eb52ce48ca3f0ab35529ea0064942487842515ae0a2c9299aa0f0db") + version("2.5.0.3", sha256="b983229b9fdf6bd4605ae8710985eb681025f6fb28ad8d7736cdf92593eef6df") + version("2.5.0.2", sha256="6d7b78da830db6c5133b44617196ee90be8c7d6c8e14c8994a4800b3d4856416") + version("2.5.0.1", sha256="d7c666e6ebff9e007c3703d8e3c3fcdf0f45289e36c2c17223b3aedc3259ab6c") + version("2.5.0.0", sha256="9f55a22594bb602cde8a5987217728569f16d9576ea53ed00497e9046a2e1794") version("2.4.0.0", sha256="e80d16417b8ce1fdac80c988cb18ae1e16f785c5eb1035934d8b37ac18945242") version("2.3.0.1", sha256="ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789") version("2.2.1.1", sha256="139bac5077c3807e1b7b83d8d0da5ca0fc8c17393fd0df4bc5999cd63a351b78") From 561b21532eae5db8afbccd06f61104757d36af5f Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 9 Jul 2024 11:13:12 +0200 Subject: [PATCH 10/14] Require setuptools>=61 (#207) * Require setuptools>=61. Will ensure use of pyproject.toml. * Simplify setup.py w.r.t noisy warning (always shown when building with spack). --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- setup.py | 12 ------------ spack/repo/packages/py-pyprecice/package.py | 4 ++-- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8741bca3..ab2af4e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## latest + +* Require setuptools >= 61 to guarantee that pyproject.toml is used https://github.com/precice/python-bindings/pull/207 +* Fix CI pipeline for spack https://github.com/precice/python-bindings/pull/206 + ## v3.1.1 * Fix NumPy include order to not conflict with system NumPy and the one installed via pip https://github.com/precice/python-bindings/pull/204 diff --git a/pyproject.toml b/pyproject.toml index a618c480..27c696d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] # PEP 518 - minimum build system requirements -requires = ["setuptools", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] +requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] diff --git a/setup.py b/setup.py index 31750061..c4c50541 100644 --- a/setup.py +++ b/setup.py @@ -5,17 +5,6 @@ uses_pip = "pip" in __file__ -# check whether pip is used for installation. If pip is not used, dependencies defined in pyproject.toml might be -# missing. -if not uses_pip: - warnings.warn( - "It looks like you are not using pip for installation. Installing the package via 'pip3 install " - "--user .' is recommended. You can still use 'python3 setup.py install --user', if you want and if " - "the bindings work correctly, you do not have to worry. However, if you face problems during " - "installation or running pyprecice, this means that you have to make sure that all dependencies are " - "installed correctly and repeat the installation of pyprecice. Refer to pyproject.toml for a list " - "of dependencies.") - if uses_pip: # If installed with pip we need to check its version try: @@ -45,7 +34,6 @@ " flag.".format(pip.__version__)) from setuptools import setup -from setuptools import Command from setuptools.command.test import test from setuptools.command.install import install from Cython.Distutils.extension import Extension diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 3f86a584..765cd557 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) @@ -58,7 +58,7 @@ class PyPyprecice(PythonPackage): depends_on("precice@" + ver, when="@" + ver) depends_on("python@3:", type=("build", "link", "run")) - depends_on("py-setuptools", type="build") + depends_on("py-setuptools@61:", type="build") depends_on("py-numpy", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") From 624f1fa41243f2a108d4347c1ec5eff55bd232df Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 11 Jul 2024 13:29:17 +0200 Subject: [PATCH 11/14] Use correct docker image name in the release guide (#210) --- docs/ReleaseGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ReleaseGuide.md b/docs/ReleaseGuide.md index 8cf10da0..5e9aa226 100644 --- a/docs/ReleaseGuide.md +++ b/docs/ReleaseGuide.md @@ -25,7 +25,7 @@ The release of the `python-bindings` repository is made directly from a release 7. If everything is in order up to this point then the new version can be released by hitting the "Publish release" button in your release Draft. This will create the corresponding tag and trigger [publishing the release to PyPI](https://github.com/precice/python-bindings/actions?query=workflow%3A%22Upload+Python+Package%22). -8. Now there exists be a tag corresponding to the release on `master`. Re-run the [docker release workflow `build-docker.yml` via dispatch]([https://github.com/precice/fenics-adapter/actions/workflows/build-docker.yml](https://github.com/precice/python-bindings/actions/workflows/build-docker.yml)) such that the correct version is picked up by `versioneer`. Check the version in the container via `docker pull precice/pythonbindings`, then `docker run -ti precice/pythonbindings`, and inside the container `$ python3 -c "import precice; print(precice.__version__)"`. ⚠️ There is an open issue that needs fixing https://github.com/precice/python-bindings/issues/195 ⚠️ +8. Now there exists be a tag corresponding to the release on `master`. Re-run the [docker release workflow `build-docker.yml` via dispatch]([https://github.com/precice/fenics-adapter/actions/workflows/build-docker.yml](https://github.com/precice/python-bindings/actions/workflows/build-docker.yml)) such that the correct version is picked up by `versioneer`. Check the version in the container via `docker pull precice/python-bindings`, then `docker run -ti precice/python-bindings`, and inside the container `$ python3 -c "import precice; print(precice.__version__)"`. ⚠️ There is an open issue that needs fixing https://github.com/precice/python-bindings/issues/195 ⚠️ 9. Add an empty commit (details https://github.com/precice/python-bindings/issues/109) on master by running the steps: From 45b3ecc241e86ef1509338a0efc725f822c09839 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Sun, 21 Jul 2024 13:16:57 -0700 Subject: [PATCH 12/14] Add relative dt to the docstring examples of the read_data function --- cyprecice/cyprecice.pyx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cyprecice/cyprecice.pyx b/cyprecice/cyprecice.pyx index a2897186..557e8f04 100644 --- a/cyprecice/cyprecice.pyx +++ b/cyprecice/cyprecice.pyx @@ -818,7 +818,8 @@ cdef class Participant: >>> mesh_name = "MeshOne" >>> data_name = "DataOne" >>> vertex_ids = [1, 2, 3, 4, 5] - >>> values = read_data(mesh_name, data_name, vertex_ids) + >>> dt = 1.0 + >>> values = read_data(mesh_name, data_name, vertex_ids, dt) >>> values.shape >>> (5, ) @@ -826,7 +827,8 @@ cdef class Participant: >>> mesh_name = "MeshOne" >>> data_name = "DataOne" >>> vertex_ids = [1, 2, 3, 4, 5] - >>> values = read_data(mesh_name, data_name, vertex_ids) + >>> dt = 1.0 + >>> values = read_data(mesh_name, data_name, vertex_ids, dt) >>> values.shape >>> (5, 2) @@ -834,7 +836,8 @@ cdef class Participant: >>> mesh_name = "MeshOne" >>> data_name = "DataOne" >>> vertex_ids = [1, 2, 3, 4, 5] - >>> values = read_data(mesh_name, data_name, vertex_ids) + >>> dt = 1.0 + >>> values = read_data(mesh_name, data_name, vertex_ids, dt) >>> values.shape >>> (5, 3) """ From 75da6d879e95b9b6f8dd61c36bdd06449b47f8af Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 12:44:14 +0200 Subject: [PATCH 13/14] Restrict to numpy < 2 and setuptools < 72 for better compatibiltiy with CI pipeline (#213) * Restrict to numpy<2 since we do not support numpy 2 yet. * Restrict to setuptools < 72 since the "test" command was removed in Setuptools 72. See #214. --- CHANGELOG.md | 2 ++ pyproject.toml | 2 +- setup.py | 2 +- spack/repo/packages/py-pyprecice/package.py | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab2af4e0..2c46a1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## latest +* Restrict to numpy < 2 for better compatibility with CI pipeline. https://github.com/precice/python-bindings/pull/213 +* Require setuptools < 72 since support for the test command was removed in Setuptools 72. https://github.com/precice/python-bindings/pull/213 * Require setuptools >= 61 to guarantee that pyproject.toml is used https://github.com/precice/python-bindings/pull/207 * Fix CI pipeline for spack https://github.com/precice/python-bindings/pull/206 diff --git a/pyproject.toml b/pyproject.toml index 27c696d5..6f8c358a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] # PEP 518 - minimum build system requirements -requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] +requires = ["setuptools>=61,<72", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy<2", "mpi4py", "pkgconfig"] \ No newline at end of file diff --git a/setup.py b/setup.py index c4c50541..2adf7a44 100644 --- a/setup.py +++ b/setup.py @@ -137,7 +137,7 @@ def initialize_options(self): author_email='info@precice.org', license='LGPL-3.0', python_requires='>=3', - install_requires=['numpy', 'mpi4py', 'Cython'], + install_requires=['numpy<2', 'mpi4py', 'Cython'], # mpi4py is only needed, if preCICE was compiled with MPI # see https://github.com/precice/python-bindings/issues/8 packages=['precice'], diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 765cd557..7ee79d6e 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -58,8 +58,8 @@ class PyPyprecice(PythonPackage): depends_on("precice@" + ver, when="@" + ver) depends_on("python@3:", type=("build", "link", "run")) - depends_on("py-setuptools@61:", type="build") - depends_on("py-numpy", type=("build", "link", "run")) + depends_on("py-setuptools@61:71", type="build") + depends_on("py-numpy@:1", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") depends_on("py-packaging", type="build") From 087b9f6a85a4a2e4b2d5ca40a2c81d3ea155f28d Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 20:26:26 +0200 Subject: [PATCH 14/14] Bump version. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c46a1bf..aa26432a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. -## latest +## v3.1.2 * Restrict to numpy < 2 for better compatibility with CI pipeline. https://github.com/precice/python-bindings/pull/213 * Require setuptools < 72 since support for the test command was removed in Setuptools 72. https://github.com/precice/python-bindings/pull/213