Skip to content

Commit c0288c8

Browse files
authored
Merge pull request #190 from precice/python-bindings-v3.0.0.0
Release v3.0.0.0
2 parents 51cf4fb + d73996c commit c0288c8

24 files changed

Lines changed: 1385 additions & 2123 deletions

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

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
needs: [setup_test]
1414
runs-on: ubuntu-latest
1515
container:
16-
image: precice/precice:latest
16+
image: precice/precice:develop
1717
options: --user root
1818
steps:
1919
- name: Checkout Repository
@@ -37,7 +37,7 @@ jobs:
3737
name: Run setup install
3838
runs-on: ubuntu-latest
3939
container:
40-
image: precice/precice:latest
40+
image: precice/precice:develop
4141
options: --user root
4242
steps:
4343
- name: Checkout Repository
@@ -55,20 +55,23 @@ jobs:
5555
- name: Run setup install
5656
run: python3 setup.py install --user
5757
- name: Test install
58-
run: python3 -c "import precice"
58+
run: |
59+
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
60+
python3 -c "import precice"
5961
6062
setup_install_single_version_externally_managed:
6163
name: Run setup install --single-version-externally-managed (for spack)
6264
needs: [setup_install]
6365
runs-on: ubuntu-latest
6466
container:
65-
image: precice/precice:latest
67+
image: precice/precice:develop
6668
options: --user root
6769
steps:
6870
- name: Checkout Repository
6971
uses: actions/checkout@v2
7072
- name: Install pip3, pkgconfig and upgrade pip3
7173
run: |
74+
su root
7275
apt-get -yy update
7376
apt-get install -y python3-pip pkg-config
7477
rm -rf /var/lib/apt/lists/*
@@ -97,12 +100,14 @@ jobs:
97100
packages: toml
98101
- name: Checkout precice and make required files discoverable
99102
run: |
100-
git clone -b v2.5.0 https://github.com/precice/precice.git precice-core
103+
git clone --branch develop https://github.com/precice/precice.git precice-core
101104
mkdir -p precice
102-
cp precice-core/src/precice/SolverInterface.hpp precice/SolverInterface.hpp
105+
cp precice-core/src/precice/Participant.hpp precice/Participant.hpp
106+
cp precice-core/src/precice/Tooling.hpp precice/Tooling.hpp
107+
cp precice-core/src/precice/Tooling.hpp precice/Tooling.cpp
103108
cd precice-core
104109
mkdir build && cd build
105-
cmake .. -DPRECICE_MPICommunication=OFF -DPRECICE_PETScMapping=OFF -DPRECICE_PythonActions=OFF -DBUILD_TESTING=OFF
110+
cmake .. -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DBUILD_TESTING=OFF
106111
- name: Install dependencies
107112
run: |
108113
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
@@ -119,7 +124,7 @@ jobs:
119124
needs: [setup_test]
120125
runs-on: ubuntu-latest
121126
container:
122-
image: precice/precice:latest
127+
image: precice/precice:develop
123128
options: --user root
124129
steps:
125130
- name: Checkout Repository
@@ -133,14 +138,16 @@ jobs:
133138
- name: Run pip install
134139
run: pip3 install --user .
135140
- name: Run pip install
136-
run: python3 -c "import precice"
141+
run: |
142+
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
143+
python3 -c "import precice"
137144
138145
solverdummy_test:
139146
name: Run solverdummy
140147
needs: [setup_install, setup_test]
141148
runs-on: ubuntu-latest
142149
container:
143-
image: precice/precice:latest
150+
image: precice/precice:develop
144151
options: --user root
145152
steps:
146153
- name: Checkout Repository
@@ -155,6 +162,6 @@ jobs:
155162
run: pip3 install --user .
156163
- name: Run solverdummy
157164
run: |
165+
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
158166
cd examples/solverdummy/
159167
python3 solverdummy.py precice-config.xml SolverOne MeshOne & python3 solverdummy.py precice-config.xml SolverTwo MeshTwo
160-

.github/workflows/build-docker.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
name: Update docker image
22

33
on:
4-
workflow_dispatch: # Trigger by hand from the UI
4+
workflow_dispatch: # Trigger by hand from the UI
5+
inputs:
6+
branch:
7+
type: choice
8+
description: branch to build the image from
9+
options:
10+
- develop
11+
- master
512
push:
613
branches:
714
- develop
15+
- master
16+
817

918
jobs:
1019
build-and-release-docker-image:
@@ -13,10 +22,26 @@ jobs:
1322
env:
1423
docker_username: precice
1524
steps:
16-
- name: Get branch name
17-
if: github.event_name != 'pull_request'
25+
- name: Set branch name for manual triggering
26+
if: github.event_name == 'workflow_dispatch'
27+
shell: bash
28+
run: echo "BINDINGS_REF=${{ inputs.branch }}" >> $GITHUB_ENV
29+
- name: Set branch name for "on pull request" triggering
30+
if: github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch'
31+
shell: bash
32+
run: echo "BINDINGS_REF=${{ github.ref_name }}" >> $GITHUB_ENV
33+
- name: Set PRECICE_TAG and the TAG depending on branch
1834
shell: bash
19-
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
35+
run: |
36+
if [[ '${{ env.BINDINGS_REF }}' == 'master' ]]; then
37+
echo "PRECICE_TAG=latest" >> "$GITHUB_ENV"
38+
echo "TAG=latest" >> "$GITHUB_ENV"
39+
echo "Building TAG: latest"
40+
else
41+
echo "PRECICE_TAG=${{ env.BINDINGS_REF }}" >> "$GITHUB_ENV"
42+
echo "TAG=${{ env.BINDINGS_REF }}" >> "$GITHUB_ENV"
43+
echo "Building TAG: ${{ env.BINDINGS_REF }}"
44+
fi
2045
- name: Checkout Repository
2146
uses: actions/checkout@v2
2247
- name: Set up Docker Buildx
@@ -31,6 +56,7 @@ jobs:
3156
with:
3257
push: true
3358
file: "./tools/releasing/packaging/docker/Dockerfile"
34-
tags: ${{ env.docker_username }}/python-bindings:${{ env.branch }},${{ env.docker_username }}/python-bindings:latest
59+
tags: ${{ env.docker_username }}/python-bindings:${{ env.TAG }}
3560
build-args: |
36-
branch=${{ env.branch }}
61+
PRECICE_TAG=${{ env.PRECICE_TAG }}
62+
PYTHON_BINDINGS_REF=${{ env.BINDINGS_REF }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint docs
2+
on: [push, pull_request]
3+
jobs:
4+
check_md:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Check out repository
8+
uses: actions/checkout@v2
9+
- name: Lint markdown files (markdownlint)
10+
uses: articulate/actions-markdownlint@v1
11+
with:
12+
config: .markdownlint.json
13+
files: '.'
14+
ignore: changelog-entries

.github/workflows/pythonpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
pkgconfig
2828
- name: Build and publish
2929
env:
30-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
31-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30+
TWINE_USERNAME: __token__
31+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
3232
run: |
3333
python setup.py sdist
3434
twine upload dist/*

.github/workflows/run-solverdummy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Run solverdummies
1212
runs-on: ubuntu-latest
1313
container:
14-
image: precice/precice:latest
14+
image: precice/precice:develop
1515
options: --user root
1616
steps:
1717
- name: Checkout Repository
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install bindings
2626
run: pip3 install --user .
2727
- name: Check whether preCICE was built with MPI # reformat version information as a dict and check whether preCICE was compiled with MPI
28-
run: python3 -c "import precice; assert({item.split('=')[0]:item.split('=')[-1] for item in str(precice.get_version_information()).split(';')}['PRECICE_MPICommunication']=='Y')"
28+
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')"
2929
- name: Run solverdummies
3030
run: |
3131
cd examples/solverdummy/

.markdownlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"MD013": false,
3+
"MD014": false,
4+
"MD024": false,
5+
"MD034": false,
6+
"MD033": false
7+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

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

5+
## 3.0.0.0
6+
7+
* Add Cython as build time dependency https://github.com/precice/python-bindings/pull/177
8+
* Update CMake configuration flags for preCICE source installation in Actions. https://github.com/precice/python-bindings/commit/23a840144c2647d6cf09c0ed87be3b768a22feb7
9+
* Remove API functions `has_mesh` and `has_data` and rename `get_mesh_vertices_and_ids` to `get_mesh_vertices_and_coordinates`. https://github.com/precice/python-bindings/commit/cd446d2807b841d81a4cf5c9dd6656ab43c278c3
10+
* Update API according to preCICE v3.0.0 https://github.com/precice/python-bindings/pull/179
11+
512
## 2.5.0.4
613

714
* Add `tag_prefix = v` in versioneer configuration of `setup.cfg`.

0 commit comments

Comments
 (0)