Skip to content

Commit 1b3b372

Browse files
committed
Merge branch 'next' into refactor-coordinates
* next: (774 commits) Bump externalpackages/googletest from `73a63ea` to `d72f9c8` Bump pygments from 2.19.2 to 2.20.0 Update pygithub requirement from ~=2.8 to ~=2.9 Add docs for updating uv tools Update prek file Update uv.lock file Enable `uv lock` Add communicator for XZ planes Move `field_type()` to `FieldData`; deprecate `FieldData::is3D()` Apply `clang-tidy` fixes Communicate `FieldPerp` consistently with other Fields Revert "Use annotations instead of comments for `clang-tidy-review`" Fixes for prek Add headers from clang-tidy Add missing headers from clang-tidy Remove duplicate definitions Remove stray doc string Only generate grids once Expose Mesh::get for Field3D Formatting fixes ...
2 parents 80e01ad + 5a18d87 commit 1b3b372

697 files changed

Lines changed: 20420 additions & 29385 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci_fedora.sh

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ then
2121
cmd="sudo docker"
2222
fi
2323
test . != ".$2" && mpi="$2" || mpi=openmpi
24-
test . != ".$3" && version="$3" || version=rawhide
25-
time $cmd pull registry.fedoraproject.org/fedora:$version
24+
time $cmd pull ghcr.io/dschwoerer/bout-container-base:ci-fedora
2625
time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
2726
--shm-size 256M \
28-
--name mobydick registry.fedoraproject.org/fedora:$version \
27+
--name mobydick ghcr.io/dschwoerer/bout-container-base:ci-fedora \
2928
/tmp/BOUT-dev/.ci_fedora.sh $mpi
3029
time $cmd cp ${TRAVIS_BUILD_DIR:-$(pwd)} mobydick:/tmp/BOUT-dev
3130
time $cmd start -a mobydick
@@ -34,26 +33,8 @@ fi
3433

3534
test . != ".$1" && mpi="$1" || mpi=openmpi
3635

37-
## If we are called as root, setup everything
38-
if [ $UID -eq 0 ]
39-
then
40-
cat /etc/os-release
41-
# Ignore weak depencies
42-
echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
43-
echo "minrate=10M" >> /etc/dnf/dnf.conf
44-
time dnf -y install dnf5
45-
time dnf5 -y install dnf5-plugins cmake python3-zoidberg python3-natsort
46-
# Allow to override packages - see #2073
47-
time dnf5 copr enable -y davidsch/fixes4bout || :
48-
time dnf5 -y upgrade
49-
time dnf5 -y builddep bout++
50-
useradd test
51-
cp -a /tmp/BOUT-dev /home/test/
52-
chown -R test /home/test
53-
chmod u+rwX /home/test -R
54-
su - test -c "${0/\/tmp/\/home\/test} $mpi"
5536
## If we are called as normal user, run test
56-
else
37+
cp -a /tmp/BOUT-dev /home/test/
5738
. /etc/profile.d/modules.sh
5839
module load mpi/${1}-x86_64
5940
export OMPI_MCA_rmaps_base_oversubscribe=yes
@@ -75,4 +56,3 @@ else
7556

7657
time make -C build build-check -j 2
7758
time make -C build check
78-
fi

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ PenaltyBreakString: 1000
9393
PenaltyExcessCharacter: 1000000
9494
PenaltyReturnTypeOnItsOwnLine: 60
9595
PointerAlignment: Left
96+
QualifierAlignment: Left
9697
ReflowComments: false
9798
SortIncludes: true
9899
# SortUsingDeclarations: true

.clang-format-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ignore matlab files
2+
**/*.m

.clang-tidy

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Checks: 'clang-diagnostic-*,clang-analyzer-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-clang-analyzer-optin.mpi*,-bugprone-exception-escape,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-readability-function-cognitive-complexity,-misc-no-recursion,-bugprone-easily-swappable-parameters,-readability-identifier-length'
2+
Checks: 'clang-diagnostic-*,clang-analyzer-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-misc-non-private-member-variables-in-classes,-clang-analyzer-optin.mpi*,-bugprone-exception-escape,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-readability-function-cognitive-complexity,-misc-no-recursion,-bugprone-easily-swappable-parameters,-readability-identifier-length,-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access'
33
WarningsAsErrors: ''
44
HeaderFilterRegex: ''
55
FormatStyle: file
@@ -9,6 +9,18 @@ CheckOptions:
99
# otherwise this breaks `ASSERT` macros!
1010
- key: readability-simplify-boolean-expr.IgnoreMacros
1111
value: 'true'
12+
13+
- key: misc-include-cleaner.IgnoreHeaders
14+
value: 'petsc.*\.h;mpi\.h'
15+
16+
- key: readability-qualified-auto.IgnoreAliasing
17+
value: 'false'
18+
19+
- key: readability-qualified-auto.AllowedTypes
20+
value: 'MPI_Comm'
21+
22+
- key: misc-include-cleaner.IgnoreHeaders
23+
value: 'adios2/.*;bits/.*;cpptrace/.*;petsc.*\.h'
1224
---
1325

1426
Disabled checks and reasons:
@@ -17,6 +29,7 @@ These are all basically unavoidable in HPC numeric code:
1729
-readability-magic-numbers
1830
-cppcoreguidelines-avoid-magic-numbers
1931
-cppcoreguidelines-pro-bounds-pointer-arithmetic
32+
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access
2033
-readability-function-cognitive-complexity
2134
-bugprone-easily-swappable-parameters
2235
-readability-identifier-length

.clangd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Diagnostics:
2+
MissingIncludes: Strict
3+
ClangTidy:
4+
FastCheckFilter: None
5+
Includes:
6+
IgnoreHeader: ["adios2/.*", "bits/.*", "cpptrace/.*", "petsc.*"]

.docker/fedora/Dockerfile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,26 @@ RUN git clone $URL \
2222
&& git checkout $COMMIT \
2323
&& git submodule update --init --recursive
2424

25-
25+
ENV HOME=/home/boutuser
2626
WORKDIR /home/boutuser/BOUT-dev
2727

28-
RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/bout++/ \
28+
RUN cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local/ \
29+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2930
-DBOUT_GENERATE_FIELDOPS=OFF \
30-
-DBOUT_USE_PETSC=ON -DPETSc_ROOT=/opt/petsc \
31+
-DBOUT_USE_PETSC=ON -DPETSc_ROOT=/usr/local \
3132
-DBOUT_ENABLE_PYTHON=ON \
3233
-DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=/usr/lib64/$MPI/ -DSUNDIALS_INCLUDE_DIR=/usr/include/$MPI-x86_64/sundials/ \
33-
$CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1)
34+
$CMAKE_OPTIONS || (cat /home/boutuser/BOUT-dev/build/CMakeFiles/CMake{Output,Error}.log ; exit 1); \
35+
make -C build -j 2 VERBOSE=1; \
36+
sudo make -C build install; \
37+
rm -rf build
3438

39+
# Add unversioned path for python
40+
RUN sudo ln -s /usr/local/lib/python3.* /usr/local/lib/python3.x
3541

36-
RUN make -C build -j 2
37-
RUN sudo make -C build install
42+
ENV PATH=/usr/local/bin:$PATH \
43+
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
44+
PYTHONPATH=/usr/local/lib/python3.x/site-packages/:$PYTHONPATH
3845

39-
RUN find /opt/bout++
46+
# smoke test
47+
RUN python3 -c 'import boutpp'

.git-blame-ignore-revs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
# Clang-format whole repo
22
d8f14fdddb5ca0fbb32d8e2bf5ac2960d6ac5ce6
33
ed2117e6d6826a98b6988e2f18c0c34e408563b6
4+
# CMake formatting
5+
17ac13c28aa3b34a0e46dbe87bb3874f6b25e706
6+
# Added by the bot
7+
4b010b7634aee1045743be80c268d4644522cd29
8+
52301380586fdbf890f620c04f689b08d89a6c34
9+
a71cad2dd6ace5741a754e2ca7daacd4bb094e0e
10+
83cf77923a4c72e44303354923021acf932b4fd2
11+
2c2402ed59c91164eaff46dee0f79386b7347e9e
12+
05b7c571544c3bcb153fce67d12b9ac48947fc2d
13+
c8f38049359170a34c915e209276238ea66b9a1e
14+
65880e4af16cb95438437bf057c4b9fdb427b142
15+
d1cfb8abd6aa5c76e6c1a4d7ab20929c65f8afc2
16+
8d5cb39e03c2644715a50684f8cd0318b4e82676
17+
ec69e8838be2dde140a915e50506f8e1ce3cb534
18+
f2bc0488a298f136294c523bc5ab4086d090059b
19+
1b4707187a3a85126338303dc766280b8fb2dc56
20+
b2e2f3575e68f771be2a4341af5fd14e2870469e
21+
64e4285ec38569f66d31e589a4610cefd16d8076
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: format-command
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
clang-format:
8+
# Release candidate branches tend to have big PRs which causes all sorts of problems
9+
if: ${{ !endsWith(github.head_ref, '-rc') }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Checkout the pull request branch, also include all history
13+
- uses: actions/checkout@v6
14+
with:
15+
ref: ${{ github.head_ref }}
16+
fetch-depth: 0
17+
18+
- name: "Set up Python"
19+
uses: actions/setup-python@v6
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
enable-cache: true
25+
26+
- name: Install dev tools
27+
run: uv sync --only-dev
28+
29+
- name: Check prek versions are up-to-date
30+
run: uv tool run sync-with-uv --check --diff
31+
32+
- name: Run everything
33+
run: uv tool run prek run --show-diff-on-failure --from-ref origin/${{ github.base_ref }}

.github/workflows/black-fix.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/clang-format.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)