Skip to content

Commit

Permalink
Merge pull request #152 from precice/develop
Browse files Browse the repository at this point in the history
Release preCICE v2 compatible ASTE version
  • Loading branch information
davidscn authored Sep 28, 2022
2 parents 89cb5b3 + 13582a8 commit 9e7b31c
Show file tree
Hide file tree
Showing 149 changed files with 68,802 additions and 10,055 deletions.
119 changes: 119 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 1
- Regex: '.*'
Priority: 2
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 100
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 2
UseTab: Never
...
9 changes: 9 additions & 0 deletions .github/dependency_bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Update Github action dependencies regularly

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Main changes of this PR

## Author's checklist

* [ ] I used the [`pre-commit` hook](https://precice.org/dev-docs-dev-tooling.html#setting-up-pre-commit) and used `pre-commit run --all` to apply all available hooks.
* [ ] I added a test to cover the proposed changes in our test suite.
* [ ] I updated the documentation in `docs/README.md`.
* [ ] I updated potential breaking changes in the tutorial [`precice/tutorials/aste-turbine`](https://github.com/precice/tutorials/tree/develop/aste-turbine).

<!-- add more questions/tasks if necessary -->
63 changes: 63 additions & 0 deletions .github/workflows/aste_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: ASTE CI

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CXX_FLAGS: "-Werror -Wall -Wextra -Wno-unused-parameter"
CTEST_OUTPUT_ON_FAILURE: "Yes"
steps:
- uses: actions/checkout@v2
- name: install preCICE
run: |
wget https://github.com/precice/precice/releases/download/v2.5.0/libprecice2_2.5.0_focal.deb && \
sudo apt-get -y update && \
sudo apt-get -y install ./libprecice2_2.5.0_focal.deb
- name: install VTK
run: |
sudo apt-get -y install libvtk7-dev
- name: install example dependencies
run: |
python3 -m pip install sympy scipy jinja2
- name: prepare directories
run: |
mkdir build_gcc build_clang
- name: build aste gcc
working-directory: build_gcc
env:
CC: gcc
CXX: g++
run: |
cmake ..
cmake --build .
- name: run test gcc
working-directory: build_gcc
run: |
ctest
- name: install clang
run: |
sudo apt-get -y install clang
- name: build aste clang
working-directory: build_clang
env:
CC: clang
CXX: clang++
run: |
cmake ..
cmake --build .
sudo cmake --install .
- name: run test clang
working-directory: build_clang
run: |
ctest
27 changes: 27 additions & 0 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Code Style
on:
pull_request:
paths:
- "**.[ch]pp"
- "**.[ch]"
- "**.xml"
- "**.py"

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout preCICE
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v3
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: git status
- name: Full diff
if: always()
run: git diff
14 changes: 14 additions & 0 deletions .github/workflows/link_check.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"
20 changes: 20 additions & 0 deletions .github/workflows/lint_markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint docs

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

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: "."
ignore: changelog-entries
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
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*.o
a.out
rank_*
iterations-*
convergence-*
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
Expand All @@ -27,3 +25,9 @@ testMesh.txt
*.synctex.gz
compile_commands.json
build/
.vscode/*
examples/replay_mode/precice-Fluid-events-summary.log
examples/replay_mode/precice-Fluid-events.json
examples/replay_mode/precice-Solid-events-summary.log
examples/replay_mode/precice-Solid-events.json
examples/replay_mode/precice-Solid-watchpoint-Flap-Tip.log
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"MD013": false,
"MD033": false
}
6 changes: 6 additions & 0 deletions .pep8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pycodestyle]
max_line_length = 120
ignore = E402
in-place = true
aggressive = 2
recursive = true
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
repos:
# Official repo for the clang-format hook
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v14.0.6"
hooks:
- id: clang-format
exclude: "^thirdparty"
types_or: [c++, c]
# isort for python imports
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
# black repo for python formatting
- repo: https://github.com/ambv/black
rev: 22.6.0
hooks:
- id: black
# Official repo for default hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.3.0"
hooks:
- id: check-xml
exclude: "tools"
- id: check-merge-conflict
- id: mixed-line-ending
- id: trailing-whitespace
- id: end-of-file-fixer
- id: requirements-txt-fixer
# Custom repo for the preCICE configuration formatter
- repo: https://github.com/precice/precice-pre-commit-hooks
rev: "v2.1"
hooks:
- id: format-precice-config
exclude: "tools"
Loading

0 comments on commit 9e7b31c

Please sign in to comment.