Skip to content

Commit 3154cb4

Browse files
Merge branch 'develop' into use-new-header
2 parents bc06e42 + b4b9fe1 commit 3154cb4

21 files changed

+161
-326
lines changed

.github/workflows/build-and-test.yml

+38-67
Original file line numberDiff line numberDiff line change
@@ -8,81 +8,38 @@ on:
88
- "*"
99

1010
jobs:
11-
setup_for_spack:
12-
name: Run setup.py phases needed by spack
13-
needs: [setup_test]
14-
runs-on: ubuntu-latest
15-
container:
16-
image: precice/precice:develop
17-
options: --user root
18-
steps:
19-
- name: Checkout Repository
20-
uses: actions/checkout@v2
21-
- name: Install & upgrade pip3
22-
run: |
23-
apt-get -yy update
24-
apt-get install -y python3-pip pkg-config
25-
rm -rf /var/lib/apt/lists/*
26-
pip3 install --upgrade --user pip
27-
- name: Install dependencies
28-
run: |
29-
pip3 install --user toml
30-
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
31-
- name: Run setup.py phases needed by spack
32-
run: |
33-
python3 setup.py install_lib
34-
python3 setup.py build_ext
35-
3611
setup_install:
3712
name: Run setup install
3813
runs-on: ubuntu-latest
3914
container:
40-
image: precice/precice:develop
15+
image: precice/precice:nightly
4116
options: --user root
4217
steps:
4318
- name: Checkout Repository
4419
uses: actions/checkout@v2
4520
- name: Install pip3, pkgconfig and upgrade pip3
4621
run: |
4722
apt-get -yy update
48-
apt-get install -y python3-pip pkg-config
23+
apt-get install -y python3-pip python3.12-venv pkg-config
4924
rm -rf /var/lib/apt/lists/*
50-
pip3 install --upgrade --user pip
25+
- name: Create venv
26+
run: python3 -m venv .venv
27+
- name: Activate venv
28+
# see https://stackoverflow.com/a/74669486
29+
run: |
30+
. .venv/bin/activate
31+
echo PATH=$PATH >> $GITHUB_ENV
5132
- name: Install dependencies
5233
run: |
53-
pip3 install --user toml
34+
pip3 install toml
5435
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
5536
- name: Run setup install
56-
run: python3 setup.py install --user
37+
run: python3 setup.py install
5738
- name: Test install
5839
run: |
5940
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
6041
python3 -c "import precice"
6142
62-
setup_install_single_version_externally_managed:
63-
name: Run setup install --single-version-externally-managed (for spack)
64-
needs: [setup_install]
65-
runs-on: ubuntu-latest
66-
container:
67-
image: precice/precice:develop
68-
options: --user root
69-
steps:
70-
- name: Checkout Repository
71-
uses: actions/checkout@v2
72-
- name: Install pip3, pkgconfig and upgrade pip3
73-
run: |
74-
su root
75-
apt-get -yy update
76-
apt-get install -y python3-pip pkg-config
77-
rm -rf /var/lib/apt/lists/*
78-
pip3 install --upgrade --user pip
79-
- name: Install dependencies
80-
run: |
81-
pip3 install --user toml
82-
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
83-
- name: Run setup install --single-version-externally-managed
84-
run: python3 setup.py install --single-version-externally-managed --root=/
85-
8643
setup_test:
8744
name: Run setup test
8845
runs-on: ubuntu-latest
@@ -104,7 +61,7 @@ jobs:
10461
mkdir -p precice
10562
cp precice-core/src/precice/Participant.hpp precice/Participant.hpp
10663
cp precice-core/src/precice/Tooling.hpp precice/Tooling.hpp
107-
cp precice-core/src/precice/Tooling.hpp precice/Tooling.cpp
64+
cp precice-core/src/precice/Tooling.cpp precice/Tooling.cpp
10865
cd precice-core
10966
mkdir build && cd build
11067
cmake .. -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DBUILD_TESTING=OFF
@@ -124,42 +81,56 @@ jobs:
12481
needs: [setup_test]
12582
runs-on: ubuntu-latest
12683
container:
127-
image: precice/precice:develop
84+
image: precice/precice:nightly
12885
options: --user root
12986
steps:
13087
- name: Checkout Repository
13188
uses: actions/checkout@v2
132-
- name: Install pip3, pkgconfig and upgrade pip3
89+
- name: Install dependencies
13390
run: |
13491
apt-get -yy update
135-
apt-get install -y python3-pip pkg-config
92+
apt-get install -y python3-pip python3.12-venv pkg-config
13693
rm -rf /var/lib/apt/lists/*
137-
pip3 install --upgrade --user pip
138-
- name: Run pip install
139-
run: pip3 install --user .
94+
- name: Create venv
95+
run: |
96+
python3 -m venv .venv
97+
- name: Activate venv
98+
# see https://stackoverflow.com/a/74669486
99+
run: |
100+
. .venv/bin/activate
101+
echo PATH=$PATH >> $GITHUB_ENV
140102
- name: Run pip install
103+
run: pip3 install .
104+
- name: Check import
141105
run: |
142106
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
143107
python3 -c "import precice"
144108
145109
solverdummy_test:
146110
name: Run solverdummy
147-
needs: [setup_install, setup_test]
111+
needs: [pip_install]
148112
runs-on: ubuntu-latest
149113
container:
150-
image: precice/precice:develop
114+
image: precice/precice:nightly
151115
options: --user root
152116
steps:
153117
- name: Checkout Repository
154118
uses: actions/checkout@v2
155-
- name: Install pip3, pkgconfig and upgrade pip3
119+
- name: Install dependencies
156120
run: |
157121
apt-get -yy update
158-
apt-get install -y python3-pip pkg-config
122+
apt-get install -y python3-pip python3.12-venv pkg-config
159123
rm -rf /var/lib/apt/lists/*
160-
pip3 install --upgrade --user pip
124+
- name: Create venv
125+
run: |
126+
python3 -m venv .venv
127+
- name: Activate venv
128+
# see https://stackoverflow.com/a/74669486
129+
run: |
130+
. .venv/bin/activate
131+
echo PATH=$PATH >> $GITHUB_ENV
161132
- name: Run pip install
162-
run: pip3 install --user .
133+
run: pip3 install .
163134
- name: Run solverdummy
164135
run: |
165136
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

.github/workflows/build-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set PRECICE_TAG and the TAG depending on branch
3232
shell: bash
3333
run: |
34-
echo "PRECICE_TAG=${{ env.BINDINGS_REF }}" >> "$GITHUB_ENV"
34+
echo "PRECICE_TAG=${{ env.BINDINGS_REF == 'develop' && 'nightly' || env.BINDINGS_REF }}" >> "$GITHUB_ENV"
3535
echo "TAG=${{ env.BINDINGS_REF }}" >> "$GITHUB_ENV"
3636
echo "Building TAG: ${{ env.BINDINGS_REF }}"
3737
- name: Checkout Repository

.github/workflows/build-env.yml

-28
This file was deleted.

.github/workflows/build-spack.yml

-35
This file was deleted.

.github/workflows/run-solverdummy.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,29 @@ jobs:
1111
name: Run solverdummies
1212
runs-on: ubuntu-latest
1313
container:
14-
image: precice/precice:develop
14+
image: precice/precice:nightly
1515
options: --user root
1616
steps:
1717
- name: Checkout Repository
1818
uses: actions/checkout@v2
1919
- name: Install Dependencies
2020
run: |
2121
apt-get -qq update
22-
apt-get -qq install software-properties-common python3-dev python3-pip git apt-utils pkg-config
22+
apt-get -qq install software-properties-common python3-dev python3-pip python3.12-venv git apt-utils pkg-config
2323
rm -rf /var/lib/apt/lists/*
24-
pip3 install --upgrade --user pip
24+
- name: Create venv
25+
run: |
26+
python3 -m venv .venv
27+
- name: Activate venv
28+
# see https://stackoverflow.com/a/74669486
29+
run: |
30+
. .venv/bin/activate
31+
echo PATH=$PATH >> $GITHUB_ENV
2532
- name: Install bindings
26-
run: pip3 install --user .
33+
run: pip3 install .
2734
- name: Check whether preCICE was built with MPI # reformat version information as a dict and check whether preCICE was compiled with MPI
2835
run: python3 -c "import precice; assert({item.split('=')[0]:item.split('=')[-1] for item in str(precice.get_version_information()).split(';')}['PRECICE_FEATURE_MPI_COMMUNICATION']=='Y')"
2936
- name: Run solverdummies
3037
run: |
3138
cd examples/solverdummy/
32-
python3 solverdummy.py precice-config.xml SolverOne & python3 solverdummy.py precice-config.xml SolverTwo
39+
python3 solverdummy.py precice-config.xml SolverOne & python3 solverdummy.py precice-config.xml SolverTwo

CHANGELOG.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## latest
5+
## 3.1.2
66

7+
* Restrict to numpy < 2 for better compatibility with CI pipeline. https://github.com/precice/python-bindings/pull/213
8+
* Require setuptools < 72 since support for the test command was removed in Setuptools 72. https://github.com/precice/python-bindings/pull/213
79
* Require setuptools >= 61 to guarantee that pyproject.toml is used https://github.com/precice/python-bindings/pull/207
810
* Fix CI pipeline for spack https://github.com/precice/python-bindings/pull/206
911

10-
## v3.1.1
12+
## 3.1.1
1113

1214
* Fix NumPy include order to not conflict with system NumPy and the one installed via pip https://github.com/precice/python-bindings/pull/204
1315

14-
## v3.1.0
16+
## 3.1.0
1517

1618
* Change versioning scheme https://github.com/precice/python-bindings/pull/199
1719

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
⚠️ The latest version of the documentation for the python bindings can be found on [precice.org](https://precice.org/installation-bindings-python.html). The information from this `README` is currently under revision and will be moved ⚠️
44

5-
[![Upload Python Package](https://github.com/precice/python-bindings/workflows/Upload%20Python%20Package/badge.svg?branch=master)](https://pypi.org/project/pyprecice/)
5+
[![Upload Python Package](https://github.com/precice/python-bindings/workflows/Upload%20Python%20Package/badge.svg)](https://pypi.org/project/pyprecice/)
66

77
This package provides python language bindings for the C++ library [preCICE](https://github.com/precice/precice). Note that the first two digits of the version number of the bindings indicate the major and minor version of the preCICE version that the bindings support. The last digit represents the version of the bindings. Example: `v3.1.0` and `v3.1.1` of the bindings represent versions `0` and `1` of the bindings that are compatible with preCICE `v3.1.x`. Note that this versioning scheme was introduced from bindings `v3.1.0`, which is different than the [old versioning scheme](#old-versioning-scheme).
88

changelog-entries/221.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Removed testing of spack package

changelog-entries/224.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Added API function `reset_mesh()`

cyprecice/Participant.pxd

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ cdef extern from "precice/precice.hpp" namespace "precice":
6565

6666
void setMeshTetrahedra (const string& meshName, vector[int] vertices)
6767

68+
# remeshing
69+
70+
void resetMesh (const string& meshName)
71+
6872
# data access
6973

7074
void writeData (const string& meshName, const string& dataName, vector[int] vertices, vector[double] values)

0 commit comments

Comments
 (0)