Skip to content

Commit

Permalink
Merge pull request #57 from precice/micro-manager-v0.3.0
Browse files Browse the repository at this point in the history
Release v0.3.0
  • Loading branch information
IshaanDesai authored Aug 28, 2023
2 parents 2ef3e89 + fe55271 commit 5e46e96
Show file tree
Hide file tree
Showing 65 changed files with 3,524 additions and 491 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check links (manual)
on: workflow_dispatch
jobs:
check_links:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Check links in markdown files (markdown-link-check)
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
config-file: '.markdown-link-check-config.json'
13 changes: 13 additions & 0 deletions .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint docs
on: [push, pull_request]
jobs:
check_md:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Lint markdown files (markdownlint)
uses: articulate/actions-markdownlint@v1
with:
config: .markdownlint.json
files: '.'
3 changes: 2 additions & 1 deletion .github/workflows/check-pep8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: autopep8
on:
push:
branches:
- "*"
- main
- develop
pull_request:
branches:
- "*"
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/run-adaptivity-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Test adaptivity
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
integration_test:
name: Run integration test
runs-on: ubuntu-latest
container: precice/precice
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: micro-manager

- name: Install dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Install Micro Manager
working-directory: micro-manager
run: pip3 install --user .

- name: Run integration test with local adaptivity
timeout-minutes: 3
working-directory: micro-manager/tests/integration/test_unit_cube
run: python3 unit_cube.py & python3 run_micro_manager.py --config micro-manager-config-local-adaptivity.json

- name: Run integration test serially with global adaptivity
timeout-minutes: 3
working-directory: micro-manager/tests/integration/test_unit_cube
run: python3 unit_cube.py & python3 run_micro_manager.py --config micro-manager-config-global-adaptivity.json

unit_tests_serial:
name: Run unit tests (serial variants)
runs-on: ubuntu-latest
container: precice/precice
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: micro-manager

- name: Install Dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Install Micro Manager
working-directory: micro-manager
run: pip3 install --user .

- name: Run unit tests
working-directory: micro-manager/tests/unit
run: python3 -m unittest test_adaptivity_serial.py

unit_tests_parallel:
name: Run unit tests (parallel variants)
runs-on: ubuntu-latest
container: precice/precice
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: micro-manager

- name: Install sudo for MPI
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install sudo
- name: Use mpi4py
uses: mpi4py/setup-mpi@v1

- name: Add user precice
run: useradd -m -s /bin/bash precice

- name: Install Dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
su -c "python -m pip install --upgrade pip" precice
su -c "pip install setuptools wheel twine" precice
- name: Install Micro Manager
working-directory: micro-manager
run: su -c "pip3 install --user ." precice

- name: Run unit tests
working-directory: micro-manager/tests/unit
run: su -c "mpiexec -n 2 python3 -m unittest test_adaptivity_parallel.py" precice
83 changes: 83 additions & 0 deletions .github/workflows/run-domain-decomposition-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Test domain decomposition
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
integration_test:
name: Run integration tests
runs-on: ubuntu-latest
container: precice/precice
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: micro-manager

- name: Install sudo for MPI
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install sudo
- name: Use mpi4py
uses: mpi4py/setup-mpi@v1

- name: Add user precice
run: useradd -m -s /bin/bash precice

- name: Install Dependencies
working-directory: micro-manager
run: |
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
su -c "python -m pip install --upgrade pip" precice
su -c "pip install setuptools wheel twine" precice
- name: Install micro-manager
working-directory: micro-manager
run: su -c "pip3 install --user ." precice

- name: Run integration test (variant 1)
timeout-minutes: 3
working-directory: micro-manager/tests/integration
run: |
chown -R precice test_unit_cube/
cd test_unit_cube/
su -c "mpiexec -n 2 python3 run_micro_manager.py --config micro-manager-config-parallel-1.json & python3 unit_cube.py" precice
- name: Run integration test (variant 2)
timeout-minutes: 3
working-directory: micro-manager/tests/integration
run: |
cd test_unit_cube/
su -c "mpiexec -n 6 --oversubscribe python3 run_micro_manager.py --config micro-manager-config-parallel-2.json & python3 unit_cube.py" precice
unit_tests:
name: Run unit tests
runs-on: ubuntu-latest
container: precice/precice
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: micro-manager

- name: Install Dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Install Micro Manager
working-directory: micro-manager
run: pip3 install --user .

- name: Run unit tests
working-directory: micro-manager/tests/unit
run: python3 -m unittest test_domain_decomposition.py
48 changes: 38 additions & 10 deletions .github/workflows/run-macro-micro-dummy.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,58 @@
name: Run macro-micro dummy case
name: Run macro-micro dummy
on:
push:
branches:
- "*"
- main
- develop
pull_request:
branches:
- "*"
jobs:
run_macro_micro_dummy:
name: Run macro-micro dummy
run_dummy:
name: Run dummy
runs-on: ubuntu-latest
container: precice/precice
steps:

- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: micro-manager

- name: Install Dependencies
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
apt-get -qq install sudo
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Install pyprecice
run: pip3 install --user pyprecice
- name: Install micro-manager
working-directory: micro-manager
run: pip3 install --user .
- name: Run macro-micro dummy

- name: Run python macro-micro dummy
timeout-minutes: 3
working-directory: micro-manager/examples
run: python3 python-dummy/run_micro_manager.py --config micro-manager-config.json & python3 macro_dummy.py

- name: Run adaptive python macro-micro dummy
timeout-minutes: 3
working-directory: micro-manager/examples
run: python3 python-dummy/run_micro_manager.py --config micro-manager-adaptivity-config.json & python3 macro_dummy.py

- name: Run c++ macro-micro dummy
timeout-minutes: 3
working-directory: micro-manager/examples
run: |
cd examples/macro-micro-dummy/
python3 macro_dummy.py & python3 run_micro_manager.py
cd cpp-dummy/
pip install pybind11
c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) micro_cpp_dummy.cpp -o micro_dummy$(python3-config --extension-suffix)
cd ../
python3 cpp-dummy/run_micro_manager.py --config micro-manager-config.json & python3 macro_dummy.py
- name: Run adaptive c++ macro-micro dummy
timeout-minutes: 3
working-directory: micro-manager/examples
run: python3 cpp-dummy/run_micro_manager.py --config micro-manager-adaptivity-config.json & python3 macro_dummy.py
29 changes: 29 additions & 0 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run unit tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"
jobs:
unit-tests:
runs-on: ubuntu-latest
container: precice/precice
steps:
- uses: actions/checkout@v3
with:
path: micro-manager

- name: Install Micro Manager and uninstall pyprecice
working-directory: micro-manager
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
python3 -m pip install --user .
python3 -m pip uninstall -y pyprecice
- name: Run unit tests
working-directory: micro-manager/tests/unit
run: python3 -m unittest test_micro_manager.py
22 changes: 22 additions & 0 deletions .github/workflows/update-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Update website
on:
push:
branches:
- 'develop'
paths:
- 'docs/**'
jobs:
trigger:
runs-on: ubuntu-latest
env:
WORKFLOW_FILENAME: update-submodules.yml
steps:
- name: Trigger workflow
run: |
curl \
--request POST \
--url https://api.github.com/repos/precice/precice.github.io/actions/workflows/$WORKFLOW_FILENAME/dispatches \
--header "authorization: token ${{ secrets.WORKFLOW_DISPATCH_TOKEN }}" \
--header "Accept: application/vnd.github.v3+json" \
--data '{"ref":"master"}' \
--fail
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ __pycache__

# Building artifacts
build
micro_manager_precice.egg-info/
micro_manager.egg-info/

# Packaging artifacts
dist

# vscode
.vscode

# Tests output
*.log
3 changes: 3 additions & 0 deletions .markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"aliveStatusCodes": [429, 200]
}
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"MD013": false,
"MD033": false,
"MD034": false
}
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

## latest

## v0.3.0

- Add global variant to adaptivity (still experimental) https://github.com/precice/micro-manager/pull/42
- Add norm-based (L1 and L2) support for functions in similarity distance calculation with absolute and relative variants https://github.com/precice/micro-manager/pull/40
- New domain decomposition strategy based on user input of number of processors along each axis https://github.com/precice/micro-manager/pull/41
- Add pickling support for C++ solver dummy https://github.com/precice/micro-manager/pull/30
- Add C++ solver dummy to show how a C++ micro simulation can be controlled by the Micro Manager https://github.com/precice/micro-manager/pull/22
- Add local adaptivity https://github.com/precice/micro-manager/pull/21

## v0.2.1

- Fixing the broken action workflow `run-macro-micro-dummy`
- Fixing the broken action workflow `run-macro-micro-dummy`

## v0.2.0

Expand Down
Loading

0 comments on commit 5e46e96

Please sign in to comment.