Skip to content

Commit

Permalink
Update dependencies 2024 09 (#137)
Browse files Browse the repository at this point in the history
* update dependencies

* update nfde, imgui

* auto cleanup of imports

* clang-tidy-18

* tidy fixes

* ignore fmt includes

* workarounds

* pyyaml 6.0.2

* add internal fmt header

* format

* contributing
  • Loading branch information
krupkat authored Sep 22, 2024
1 parent 5e626f6 commit 16caf69
Show file tree
Hide file tree
Showing 61 changed files with 214 additions and 91 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Checks: >
HeaderFilterRegex: "xpano.*xpano.*"

CheckOptions:
- key: misc-include-cleaner.IgnoreHeaders
value: SDL.*;opencv2.*;exiv2.*;spdlog.*;nfd.*;fmt.*
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/clang-tidy-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ permissions:

env:
BUILD_TYPE: Release
CATCH_VERSION: "v3.6.0"
EXIV2_VERSION: "v0.28.2"
CATCH_VERSION: "v3.7.1"
EXIV2_VERSION: "v0.28.3"

jobs:
clang-tidy-check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -79,13 +79,15 @@ jobs:
- name: Run clang-tidy
run: |
run-clang-tidy-15 `pwd`/xpano `pwd`/tests \
run-clang-tidy-18 `pwd`/xpano `pwd`/tests \
-p=build \
-quiet \
-header-filter=xpano/xpano.*xpano \
-export-fixes=fixes.yml
- name: Check clang-tidy results
run: |
pip install -r misc/scripts/python/requirements.txt
python -m venv venv
source venv/bin/activate
python -m pip install -r misc/scripts/python/requirements.txt
python misc/scripts/python/check_fixes.py fixes.yml
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ permissions:

env:
BUILD_TYPE: Release
SDL_VERSION: "release-2.30.3"
SDL_VERSION: "release-2.30.7"
OPENCV_VERSION: "4.10.0"
CATCH_VERSION: "v3.6.0"
CATCH_VERSION: "v3.7.1"
SPDLOG_VERSION: "v1.14.1"
EXIV2_VERSION: "v0.28.2"
EXIV2_VERSION: "v0.28.3"
GENERATOR: "Ninja Multi-Config"

jobs:
Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@ The repository mostly uses the Google C++ [style guide](https://google.github.io

## clang-format

Formatting is checked upon submission, please format your files with the included `.clang-format` configuration. Use the provided scripts for your convenience:
Formatting is checked when you make a PR, please format your files with the included `.clang-format` configuration. Use the provided scripts for your convenience:

```
/misc/scripts/format.ps1
/misc/scripts/format.sh
```
## clang-tidy

Static analysis is checked upon submission, please make sure there are 0 clang-tidy warnings in your code, using the included `.clang-tidy` configutaion. Use the provided scripts for your convenience:
Static analysis is checked when you make a PR, please make sure there are 0 clang-tidy warnings in your code, using the included `.clang-tidy` configutaion. Use the provided scripts for your convenience:

```
/misc/scripts/tidy.ps1
/misc/scripts/tidy.sh
```

### Clang tools versions

The CI currently works with the clang-18 tools from the [Ubuntu 24.04 runner](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md)

## Copyright

Feel free to add your copyright to the files you modify by adding this comment:
Expand Down
2 changes: 1 addition & 1 deletion external/imgui
Submodule imgui updated 89 files
+1 −1 .github/FUNDING.yml
+64 −4 .github/workflows/build.yml
+12 −0 .github/workflows/manual.yml
+1 −1 .github/workflows/static-analysis.yml
+1 −0 .gitignore
+13 −8 backends/imgui_impl_allegro5.cpp
+1 −0 backends/imgui_impl_allegro5.h
+2 −0 backends/imgui_impl_android.cpp
+1 −0 backends/imgui_impl_android.h
+1 −0 backends/imgui_impl_dx10.cpp
+1 −0 backends/imgui_impl_dx10.h
+1 −0 backends/imgui_impl_dx11.cpp
+1 −0 backends/imgui_impl_dx11.h
+1 −0 backends/imgui_impl_dx12.cpp
+2 −0 backends/imgui_impl_dx12.h
+1 −0 backends/imgui_impl_dx9.cpp
+1 −0 backends/imgui_impl_dx9.h
+102 −34 backends/imgui_impl_glfw.cpp
+7 −2 backends/imgui_impl_glfw.h
+1 −0 backends/imgui_impl_glut.cpp
+1 −0 backends/imgui_impl_glut.h
+2 −0 backends/imgui_impl_metal.h
+4 −2 backends/imgui_impl_metal.mm
+4 −0 backends/imgui_impl_opengl2.cpp
+1 −0 backends/imgui_impl_opengl2.h
+6 −1 backends/imgui_impl_opengl3.cpp
+1 −1 backends/imgui_impl_opengl3.h
+1 −1 backends/imgui_impl_opengl3_loader.h
+2 −0 backends/imgui_impl_osx.h
+18 −9 backends/imgui_impl_osx.mm
+88 −33 backends/imgui_impl_sdl2.cpp
+1 −0 backends/imgui_impl_sdl2.h
+211 −119 backends/imgui_impl_sdl3.cpp
+3 −3 backends/imgui_impl_sdl3.h
+20 −22 backends/imgui_impl_sdlrenderer2.cpp
+2 −1 backends/imgui_impl_sdlrenderer2.h
+46 −23 backends/imgui_impl_sdlrenderer3.cpp
+4 −1 backends/imgui_impl_sdlrenderer3.h
+9 −4 backends/imgui_impl_vulkan.cpp
+2 −2 backends/imgui_impl_vulkan.h
+30 −0 backends/imgui_impl_wgpu.cpp
+8 −0 backends/imgui_impl_wgpu.h
+70 −32 backends/imgui_impl_win32.cpp
+1 −0 backends/imgui_impl_win32.h
+20 −20 docs/BACKENDS.md
+588 −7 docs/CHANGELOG.txt
+8 −41 docs/EXAMPLES.md
+40 −7 docs/FAQ.md
+5 −1 docs/FONTS.md
+8 −8 docs/README.md
+9 −12 docs/TODO.txt
+1 −1 examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml
+1 −1 examples/example_android_opengl3/main.cpp
+5 −0 examples/example_glfw_opengl2/main.cpp
+6 −1 examples/example_glfw_opengl3/main.cpp
+13 −11 examples/example_glfw_vulkan/main.cpp
+18 −1 examples/example_glfw_wgpu/CMakeLists.txt
+7 −1 examples/example_glfw_wgpu/main.cpp
+1 −1 examples/example_null/Makefile
+5 −0 examples/example_sdl2_directx11/main.cpp
+5 −0 examples/example_sdl2_opengl2/main.cpp
+5 −0 examples/example_sdl2_opengl3/main.cpp
+8 −2 examples/example_sdl2_sdlrenderer2/main.cpp
+13 −11 examples/example_sdl2_vulkan/main.cpp
+3 −3 examples/example_sdl3_opengl3/Makefile
+3 −3 examples/example_sdl3_opengl3/README.md
+7 −5 examples/example_sdl3_opengl3/main.cpp
+3 −3 examples/example_sdl3_sdlrenderer3/Makefile
+14 −7 examples/example_sdl3_sdlrenderer3/main.cpp
+14 −2 examples/example_win32_directx10/main.cpp
+13 −2 examples/example_win32_directx11/main.cpp
+15 −2 examples/example_win32_directx12/main.cpp
+18 −4 examples/example_win32_directx9/main.cpp
+8 −0 examples/example_win32_opengl3/build_mingw.bat
+5 −0 examples/example_win32_opengl3/main.cpp
+20 −0 examples/imgui_examples.sln
+4 −3 examples/libs/emscripten/emscripten_mainloop_stub.h
+1 −1 examples/libs/usynergy/uSynergy.h
+9 −4 imconfig.h
+1,164 −574 imgui.cpp
+536 −189 imgui.h
+2,180 −442 imgui_demo.cpp
+37 −19 imgui_draw.cpp
+408 −305 imgui_internal.h
+101 −68 imgui_tables.cpp
+1,758 −509 imgui_widgets.cpp
+64 −36 imstb_textedit.h
+1 −1 imstb_truetype.h
+5 −4 misc/freetype/imgui_freetype.cpp
6 changes: 3 additions & 3 deletions misc/build/build-bullseye.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export BUILD_TYPE='Release'
export SDL_VERSION='release-2.30.3'
export SDL_VERSION='release-2.30.7'
# export OPENCV_VERSION='4.10.0'
export CATCH_VERSION='v3.6.0'
export CATCH_VERSION='v3.7.1'
export SPDLOG_VERSION='v1.14.1'
export EXIV2_VERSION='v0.28.2'
export EXIV2_VERSION='v0.28.3'
# export GENERATOR='Ninja Multi-Config'

git submodule update --init
Expand Down
6 changes: 3 additions & 3 deletions misc/build/build-macos.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DO NOT MODIFY: Auto-generated by the gen_installer.py script from the .github/workflows/test.yml Github Action

export BUILD_TYPE='Release'
export SDL_VERSION='release-2.30.3'
export SDL_VERSION='release-2.30.7'
export OPENCV_VERSION='4.10.0'
export CATCH_VERSION='v3.6.0'
export CATCH_VERSION='v3.7.1'
export SPDLOG_VERSION='v1.14.1'
export EXIV2_VERSION='v0.28.2'
export EXIV2_VERSION='v0.28.3'
export GENERATOR='Ninja Multi-Config'

git submodule update --init
Expand Down
6 changes: 3 additions & 3 deletions misc/build/build-ubuntu-20.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DO NOT MODIFY: Auto-generated by the gen_installer.py script from the .github/workflows/test.yml Github Action

export BUILD_TYPE='Release'
export SDL_VERSION='release-2.30.3'
export SDL_VERSION='release-2.30.7'
export OPENCV_VERSION='4.10.0'
export CATCH_VERSION='v3.6.0'
export CATCH_VERSION='v3.7.1'
export SPDLOG_VERSION='v1.14.1'
export EXIV2_VERSION='v0.28.2'
export EXIV2_VERSION='v0.28.3'
export GENERATOR='Ninja Multi-Config'

git submodule update --init
Expand Down
6 changes: 3 additions & 3 deletions misc/build/build-ubuntu-22.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DO NOT MODIFY: Auto-generated by the gen_installer.py script from the .github/workflows/test.yml Github Action

export BUILD_TYPE='Release'
export SDL_VERSION='release-2.30.3'
export SDL_VERSION='release-2.30.7'
export OPENCV_VERSION='4.10.0'
export CATCH_VERSION='v3.6.0'
export CATCH_VERSION='v3.7.1'
export SPDLOG_VERSION='v1.14.1'
export EXIV2_VERSION='v0.28.2'
export EXIV2_VERSION='v0.28.3'
export GENERATOR='Ninja Multi-Config'

git submodule update --init
Expand Down
6 changes: 3 additions & 3 deletions misc/build/build-universal.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export BUILD_TYPE='Release'
export SDL_VERSION='release-2.30.3'
export SDL_VERSION='release-2.30.7'
export OPENCV_VERSION='4.10.0'
export CATCH_VERSION='v3.6.0'
export CATCH_VERSION='v3.7.1'
export SPDLOG_VERSION='v1.14.1'
export EXIV2_VERSION='v0.28.2'
export EXIV2_VERSION='v0.28.3'
export GENERATOR='Ninja Multi-Config'
export C_COMPILER='gcc'
export CXX_COMPILER='g++'
Expand Down
6 changes: 3 additions & 3 deletions misc/build/build-windows-latest.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DO NOT MODIFY: Auto-generated by the gen_installer.py script from the .github/workflows/test.yml Github Action

$env:BUILD_TYPE = 'Release'
$env:SDL_VERSION = 'release-2.30.3'
$env:SDL_VERSION = 'release-2.30.7'
$env:OPENCV_VERSION = '4.10.0'
$env:CATCH_VERSION = 'v3.6.0'
$env:CATCH_VERSION = 'v3.7.1'
$env:SPDLOG_VERSION = 'v1.14.1'
$env:EXIV2_VERSION = 'v0.28.2'
$env:EXIV2_VERSION = 'v0.28.3'
$env:GENERATOR = 'Ninja Multi-Config'

git submodule update --init
Expand Down
4 changes: 4 additions & 0 deletions misc/scripts/clean_includes.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$xpano_sources = @(Get-ChildItem -Recurse -Path xpano/ -Include *.cc,*.h).fullname
$test_sources = @(Get-ChildItem -Recurse -Path tests/ -Include *.cc,*.h).fullname

clang-include-cleaner -p build --edit --insert --remove --ignore-headers="SDL.*,opencv2.*,exiv2.*,spdlog\\fmt\\.*" @($xpano_sources + $test_sources)
2 changes: 1 addition & 1 deletion misc/scripts/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PyYAML==6.0
PyYAML==6.0.2
2 changes: 1 addition & 1 deletion misc/scripts/tidy.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$tidy_runner = (Get-Command run-clang-tidy).Path
python $tidy_runner xpano tests -p .\build -quiet
python $tidy_runner xpano\\xpano xpano\\tests -p .\build -quiet
2 changes: 1 addition & 1 deletion misc/scripts/tidy.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run-clang-tidy-15 `pwd`/xpano `pwd`/tests -p=build -quiet
run-clang-tidy-18 `pwd`/xpano `pwd`/tests -p=build -quiet
11 changes: 11 additions & 0 deletions tests/stitcher_pipeline_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,29 @@

#include "xpano/pipeline/stitcher_pipeline.h"

#include <algorithm>
#include <array>
#include <chrono>
#include <filesystem>
#include <future>
#include <iterator>
#include <optional>
#include <string>
#include <thread>
#include <utility>
#include <variant>
#include <vector>

#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#include <catch2/matchers/catch_matchers_vector.hpp>

#include "xpano/algorithm/algorithm.h"
#include "xpano/pipeline/options.h"
#include "xpano/utils/vec.h"

#ifdef XPANO_WITH_EXIV2
#include <exiv2/exiv2.hpp>
#endif
Expand Down
1 change: 1 addition & 0 deletions xpano/algorithm/algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "xpano/algorithm/auto_crop.h"
#include "xpano/algorithm/blenders.h"
#include "xpano/algorithm/image.h"
#include "xpano/algorithm/options.h"
#include "xpano/algorithm/stitcher.h"
#include "xpano/algorithm/warpers.h"
#include "xpano/utils/disjoint_set.h"
Expand Down
2 changes: 2 additions & 0 deletions xpano/algorithm/blenders.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <vector>

#ifdef XPANO_WITH_MULTIBLEND
#include <mb/image.h>
#include <mb/multiblend.h>
#endif

Expand Down
16 changes: 11 additions & 5 deletions xpano/algorithm/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once

#include <array>
#include <cstdint>

#include "xpano/constants.h"

Expand All @@ -12,7 +13,7 @@ namespace xpano::algorithm {
// Bump kOptionsVersion in xpano/pipeline/options.h when changing the
// definitions

enum class ProjectionType {
enum class ProjectionType : std::uint8_t {
kPerspective,
kCylindrical,
kSpherical,
Expand All @@ -24,16 +25,21 @@ enum class ProjectionType {
kTransverseMercator
};

enum class FeatureType { kSift, kOrb };
enum class FeatureType : std::uint8_t { kSift, kOrb };

enum class WaveCorrectionType { kOff, kAuto, kHorizontal, kVertical };
enum class WaveCorrectionType : std::uint8_t {
kOff,
kAuto,
kHorizontal,
kVertical
};

enum class InpaintingMethod {
enum class InpaintingMethod : std::uint8_t {
kNavierStokes,
kTelea,
};

enum class BlendingMethod { kOpenCV, kMultiblend };
enum class BlendingMethod : std::uint8_t { kOpenCV, kMultiblend };

const char* Label(ProjectionType projection_type);
const char* Label(FeatureType feature_type);
Expand Down
3 changes: 2 additions & 1 deletion xpano/algorithm/progress.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#pragma once

#include <atomic>
#include <cstdint>

namespace xpano::algorithm {

enum class ProgressType {
enum class ProgressType : std::uint8_t {
kNone,
kLoadingImages,
kStitchingPano,
Expand Down
4 changes: 3 additions & 1 deletion xpano/algorithm/stitcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@
#include <numeric>
#include <string_view>
#include <utility>
#include <vector>

#include <spdlog/common.h>
#include <spdlog/spdlog.h>

#include "xpano/constants.h"
#include "xpano/algorithm/progress.h"
#include "xpano/utils/opencv.h"

namespace xpano::algorithm::stitcher {
Expand Down
3 changes: 2 additions & 1 deletion xpano/algorithm/stitcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

#pragma once

#include <cstdint>
#include <vector>

#include <opencv2/core.hpp>
Expand All @@ -59,7 +60,7 @@

namespace xpano::algorithm::stitcher {

enum class Status {
enum class Status : std::uint8_t {
kSuccess,
kSuccessResolutionCapped,
kCancelled,
Expand Down
3 changes: 2 additions & 1 deletion xpano/cli/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

#include <exception>
#include <filesystem>
#include <optional>
#include <string>
#include <vector>

#include <spdlog/fmt/fmt.h>
#include <spdlog/spdlog.h>

#include "xpano/constants.h"
#include "xpano/utils/fmt.h"
#include "xpano/utils/path.h"

namespace xpano::cli {
Expand Down
5 changes: 5 additions & 0 deletions xpano/cli/pano_cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <atomic>
#include <exception>
#include <filesystem>
#include <optional>
#include <utility>

#include <spdlog/spdlog.h>

Expand All @@ -20,6 +22,9 @@
#include "xpano/version_fmt.h"

#ifdef _WIN32
#include <consoleapi.h>
#include <minwindef.h>

#include "xpano/cli/windows_console.h"
#endif

Expand Down
3 changes: 2 additions & 1 deletion xpano/cli/pano_cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

#pragma once

#include <cstdint>
#include <optional>
#include <utility>

#include "xpano/cli/args.h"

namespace xpano::cli {

enum class ResultType {
enum class ResultType : std::uint8_t {
kSuccess,
kError,
kForwardToGui,
Expand Down
3 changes: 2 additions & 1 deletion xpano/cli/signal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#include "xpano/cli/signal.h"

#ifdef _WIN32
#include <windows.h>
#include <consoleapi.h>
#include <minwindef.h>

#include <spdlog/spdlog.h>
#else
Expand Down
Loading

0 comments on commit 16caf69

Please sign in to comment.