Skip to content

Commit

Permalink
Fix/ci versions and formatting (#20)
Browse files Browse the repository at this point in the history
* Update and fix versions used in CI

* Fix formatting to satisfy clang format

* Fix formatting to satisfy markdown linting
  • Loading branch information
mathiskelm authored Feb 21, 2023
1 parent 8a5b1cc commit 84bf373
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/style-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.10'
python-version: '3.10.10'
- name: "Install style checker"
run: pip install --user black
run: pip install --user black~=22.12
- name: "Run style check"
run: black --check .
cpp_linting:
Expand All @@ -31,5 +31,5 @@ jobs:
- uses: actions/checkout@v2
- name: Run format check
run: |
sudo apt-get install clang-format-10
sudo apt-get install clang-format-14
./scripts/format/run-clang-format.sh
2 changes: 1 addition & 1 deletion doc/user/docs/example-usage.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Adapter usage

Please check out the examples in the `examples/` directory to get an idea on how to use the adapter.
Please check out the examples in the `examples/` directory to get an idea on how to use the adapter.
2 changes: 1 addition & 1 deletion doc/user/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ The DuMuX-preCICE adapter should build fine if DuMuX, preCICE and their dependen
If any tests fails, you should verify if something went wrong with the installation.
There are advanced ways of managing DUNE modules, e.g. using the environment variable `DUNE_CONTROL_PATH`, that are beyond the scope of this short documentation. You can find more information in the [DUNE FAQ](https://www.dune-project.org/doc/installation/#faq).
There are advanced ways of managing DUNE modules, e.g. using the environment variable `DUNE_CONTROL_PATH`, that are beyond the scope of this short documentation. You can find more information in the [DUNE FAQ](https://www.dune-project.org/doc/installation/#faq).
2 changes: 1 addition & 1 deletion doc/user/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Note that the DuMuX-preCICE adapter is a [DUNE module](https://www.dune-project.
- `docker/`: A Docker recipe that creates a container with DUNE, DuMuX and preCICE. The recipe is mainly used for the automated tests. Check the `README.md` in the subdirectory for more details.
- `dumux-precice/`: The preCICE adapter source code and further code for some of the tests and examples.
- `scripts/`: Contains useful scripts to run simulations and for checking the code's formatting.
- `test/`: Contains test cases and reference solutions (`reference-solutions/`). The directory also contains several DUNE configuration files (`.opts` files) for configuring the project.
- `test/`: Contains test cases and reference solutions (`reference-solutions/`). The directory also contains several DUNE configuration files (`.opts` files) for configuring the project.
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

- `dummysolver/` contains a dummy solver similar to the dummy solver provided by preCICE. However, the included dummy solver uses the DuMuX-preCICE adapter.
- `ff-pm/` contains examples of coupled free flow (`ff`) and porous medium (`pm`) flow

6 changes: 5 additions & 1 deletion examples/ff-pm/flow-over-cube-3d/ffproblem-reversed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ public:
*
* This problem assumes a temperature of 10 degrees Celsius.
*/
Scalar temperature() const { return 273.15 + 10; } // 10°C
Scalar temperature() const
{
// 10°C
return 273.15 + 10;
}
#endif

/*!
Expand Down
6 changes: 5 additions & 1 deletion examples/ff-pm/flow-over-cube-3d/pmproblem-reversed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ public:
* \brief Return the temperature within the domain in [K].
*
*/
Scalar temperature() const { return 273.15 + 10; } // 10°C
Scalar temperature() const
{
// 10°C
return 273.15 + 10;
}
// \}
#endif

Expand Down
6 changes: 5 additions & 1 deletion examples/ff-pm/flow-over-square-2d/ffproblem-reversed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ public:
*
* This problem assumes a temperature of 10 degrees Celsius.
*/
Scalar temperature() const { return 273.15 + 10; } // 10°C
Scalar temperature() const
{
// 10°C
return 273.15 + 10;
}
#endif

/*!
Expand Down
6 changes: 5 additions & 1 deletion examples/ff-pm/flow-over-square-2d/pmproblem-reversed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ public:
* \brief Return the temperature within the domain in [K].
*
*/
Scalar temperature() const { return 273.15 + 10; } // 10°C
Scalar temperature() const
{
// 10°C
return 273.15 + 10;
}
// \}
#endif
/*!
Expand Down
2 changes: 1 addition & 1 deletion scripts/format/run-clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for DIRECTORY in "${DIRECTORIES[@]}"; do
#echo "Check files in ${DIRECTORY}"
for FILE in $(find "${DIRECTORY}" -regex '.*\.\(cc\|hh\)' ); do
#echo "$FILE"
clang-format-10 --dry-run -style=file -Werror -i ${FILE}
clang-format-14 --dry-run -style=file -Werror -i ${FILE}
done
if [ $? -ne 0 ]; then
exit $?
Expand Down

0 comments on commit 84bf373

Please sign in to comment.