Skip to content

Commit 791107e

Browse files
authored
Merge pull request #235 from precice/python-bindings-v3.2.0
Release v3.2.0
2 parents bfe1c08 + 1a30360 commit 791107e

20 files changed

Lines changed: 398 additions & 446 deletions

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

Lines changed: 38 additions & 67 deletions
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

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/build-env.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/build-spack.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/run-solverdummy.yml

Lines changed: 12 additions & 5 deletions
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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@
22

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

5-
## v3.1.2
5+
## 3.2.0
6+
7+
* Update `requirements.txt` of the solver dummy https://github.com/precice/python-bindings/pull/233
8+
* Add API functions for Just-in-time mapping https://github.com/precice/python-bindings/pull/231
9+
* Discontinued maintainment of Docker image `precice/python-bindings`. Python packages should be installed using virtual environments instead. Please refer to `README.md` for further information. https://github.com/precice/python-bindings/pull/228
10+
* Added profiling API functions https://github.com/precice/python-bindings/pull/226
11+
* Added API function `reset_mesh()` https://github.com/precice/python-bindings/pull/224
12+
* Removed testing of spack package https://github.com/precice/python-bindings/pull/221
13+
* Use the newer `precice/precice.hpp` header to access C++ API https://github.com/precice/python-bindings/pull/193
14+
15+
## 3.1.2
616

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

12-
## v3.1.1
22+
## 3.1.1
1323

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

16-
## v3.1.0
26+
## 3.1.0
1727

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

0 commit comments

Comments
 (0)