Skip to content

Commit 633fb89

Browse files
authored
Merge pull request #168 from precice/python-bindings-v2.5.0.2
Release v2.5.0.2
2 parents 0d28cf0 + 34860d9 commit 633fb89

File tree

8 files changed

+204
-103
lines changed

8 files changed

+204
-103
lines changed

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

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
name: Build and Test
2-
on:
2+
on:
33
push:
44
branches:
55
- "*"
66
pull_request:
77
branches:
88
- "*"
9-
10-
jobs:
9+
10+
jobs:
1111
setup_for_spack:
1212
name: Run setup.py phases needed by spack
1313
needs: [setup_test]
1414
runs-on: ubuntu-latest
15-
container: precice/precice
15+
container:
16+
image: benjaminrodenberg/precice:2.5.0
17+
options: --user root
1618
steps:
1719
- name: Checkout Repository
1820
uses: actions/checkout@v2
@@ -34,7 +36,9 @@ jobs:
3436
setup_install:
3537
name: Run setup install
3638
runs-on: ubuntu-latest
37-
container: precice/precice
39+
container:
40+
image: benjaminrodenberg/precice:2.5.0
41+
options: --user root
3842
steps:
3943
- name: Checkout Repository
4044
uses: actions/checkout@v2
@@ -52,12 +56,14 @@ jobs:
5256
run: python3 setup.py install --user
5357
- name: Test install
5458
run: python3 -c "import precice"
55-
59+
5660
setup_install_single_version_externally_managed:
5761
name: Run setup install --single-version-externally-managed (for spack)
5862
needs: [setup_install]
5963
runs-on: ubuntu-latest
60-
container: precice/precice
64+
container:
65+
image: benjaminrodenberg/precice:2.5.0
66+
options: --user root
6167
steps:
6268
- name: Checkout Repository
6369
uses: actions/checkout@v2
@@ -73,7 +79,7 @@ jobs:
7379
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
7480
- name: Run setup install --single-version-externally-managed
7581
run: python3 setup.py install --single-version-externally-managed --root=/
76-
82+
7783
setup_test:
7884
name: Run setup test
7985
runs-on: ubuntu-latest
@@ -91,7 +97,7 @@ jobs:
9197
packages: toml
9298
- name: Checkout precice and make required files discoverable
9399
run: |
94-
git clone https://github.com/precice/precice.git precice-core
100+
git clone -b v2.5.0 https://github.com/precice/precice.git precice-core
95101
mkdir -p precice
96102
cp precice-core/src/precice/SolverInterface.hpp precice/SolverInterface.hpp
97103
cd precice-core
@@ -107,12 +113,14 @@ jobs:
107113
run: |
108114
export CFLAGS=-I$GITHUB_WORKSPACE
109115
python3 setup.py test
110-
116+
111117
pip_install:
112118
name: Run pip install
113119
needs: [setup_test]
114120
runs-on: ubuntu-latest
115-
container: precice/precice
121+
container:
122+
image: benjaminrodenberg/precice:2.5.0
123+
options: --user root
116124
steps:
117125
- name: Checkout Repository
118126
uses: actions/checkout@v2
@@ -131,7 +139,9 @@ jobs:
131139
name: Run solverdummy
132140
needs: [setup_install, setup_test]
133141
runs-on: ubuntu-latest
134-
container: precice/precice
142+
container:
143+
image: benjaminrodenberg/precice:2.5.0
144+
options: --user root
135145
steps:
136146
- name: Checkout Repository
137147
uses: actions/checkout@v2
@@ -147,4 +157,4 @@ jobs:
147157
run: |
148158
cd examples/solverdummy/
149159
python3 solverdummy.py precice-config.xml SolverOne MeshOne & python3 solverdummy.py precice-config.xml SolverTwo MeshTwo
150-
160+

.github/workflows/build-spack.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
name: Build Spack
2-
on:
3-
push:
4-
branches:
5-
- "*"
6-
pull_request:
7-
branches:
8-
- "*"
9-
schedule:
10-
- cron: '0 4 * * 1' # Schedule it every Sunday
11-
12-
jobs:
13-
build_spack:
14-
name: build_spack
15-
runs-on: ubuntu-latest
16-
timeout-minutes: 15
17-
container: precice/ci-spack-pyprecice-deps-2204
18-
defaults:
19-
run:
20-
shell: "bash --login -eo pipefail {0}"
21-
steps:
22-
- name: Checkout Repository
23-
uses: actions/checkout@v2
24-
- name: Move Package Script
25-
run: |
26-
cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/
27-
- name: Try to build py-pyprecice with spack and test it
28-
run: |
29-
. /opt/spack/share/spack/setup-env.sh
30-
spack env activate ci && spack arch
31-
spack remove py-pyprecice
32-
spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop
33-
spack install && spack find
34-
spack load py-pyprecice
35-
BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}"
1+
# name: Build Spack
2+
# on:
3+
# push:
4+
# branches:
5+
# - "*"
6+
# pull_request:
7+
# branches:
8+
# - "*"
9+
# schedule:
10+
# - cron: '0 4 * * 1' # Schedule it every Sunday
11+
#
12+
# jobs:
13+
# build_spack:
14+
# name: build_spack
15+
# runs-on: ubuntu-latest
16+
# timeout-minutes: 15
17+
# container: precice/ci-spack-pyprecice-deps-2204
18+
# defaults:
19+
# run:
20+
# shell: "bash --login -eo pipefail {0}"
21+
# steps:
22+
# - name: Checkout Repository
23+
# uses: actions/checkout@v2
24+
# - name: Move Package Script
25+
# run: |
26+
# cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/
27+
# - name: Try to build py-pyprecice with spack and test it
28+
# run: |
29+
# . /opt/spack/share/spack/setup-env.sh
30+
# spack env activate ci && spack arch
31+
# spack remove py-pyprecice
32+
# spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop
33+
# spack install && spack find
34+
# spack load py-pyprecice
35+
# BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}"

.github/workflows/run-solverdummy.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,27 @@ on:
66
pull_request:
77
branches:
88
- "*"
9-
jobs:
9+
jobs:
1010
run_solverdummies:
1111
name: Run solverdummies
1212
runs-on: ubuntu-latest
13-
container: precice/precice
13+
container:
14+
image: benjaminrodenberg/precice:2.5.0
15+
options: --user root
1416
steps:
1517
- name: Checkout Repository
16-
uses: actions/checkout@v2
18+
uses: actions/checkout@v2
1719
- name: Install Dependencies
1820
run: |
1921
apt-get -qq update
2022
apt-get -qq install software-properties-common python3-dev python3-pip git apt-utils pkg-config
2123
rm -rf /var/lib/apt/lists/*
24+
pip3 install --upgrade --user pip
2225
- name: Install bindings
2326
run: pip3 install --user .
2427
- name: Check whether preCICE was built with MPI # reformat version information as a dict and check whether preCICE was compiled with MPI
2528
run: python3 -c "import precice; assert({item.split('=')[0]:item.split('=')[-1] for item in str(precice.get_version_information()).split(';')}['PRECICE_MPICommunication']=='Y')"
2629
- name: Run solverdummies
27-
run: |
30+
run: |
2831
cd examples/solverdummy/
29-
python3 solverdummy.py precice-config.xml SolverOne MeshOne & python3 solverdummy.py precice-config.xml SolverTwo MeshTwo
32+
python3 solverdummy.py precice-config.xml SolverOne & python3 solverdummy.py precice-config.xml SolverTwo

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44

55
## latest
66

7+
## 2.5.0.2
8+
9+
* Add Waveform API introduced in preCICE v2.4.0.
10+
711
## 2.5.0.1
812

913
* Add pkgconfig as dependency to the pythonpublish workflow https://github.com/precice/python-bindings/commit/200dc2aba160e18a7d1dae44ef3493d546e69eb9

cyprecice/SolverInterface.pxd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,21 @@ cdef extern from "precice/SolverInterface.hpp" namespace "precice":
9595

9696
void readBlockVectorData (const int dataID, const int size, const int* valueIndices, double* values) const
9797

98+
void readBlockVectorData (const int dataID, const int size, const int* valueIndices, double relativeReadTime, double* values) const
99+
98100
void readVectorData (const int dataID, const int valueIndex, double* value) const
99101

102+
void readVectorData (const int dataID, const int valueIndex, double relativeReadTime, double* value) const
103+
100104
void readBlockScalarData (const int dataID, const int size, const int* valueIndices, double* values) const
101105

106+
void readBlockScalarData (const int dataID, const int size, const int* valueIndices, double relativeReadTime, double* values) const
107+
102108
void readScalarData (const int dataID, const int valueIndex, double& value) const
103109

104-
# Gradient related API
110+
void readScalarData (const int dataID, const int valueIndex, double relativeReadTime, double& value) const
111+
112+
# Gradient related API
105113

106114
bool isGradientDataRequired(int dataID) const;
107115

0 commit comments

Comments
 (0)