diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 7cda6b7a2..62f0fdd4b 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -124,7 +124,11 @@ jobs: -DENABLE_DEVELOPER_MODE=ON \ -DOPT_ENABLE_INTERPROCEDURAL_OPTIMIZATION=OFF \ -DOPT_ENABLE_SANITIZER_ADDRESS=OFF \ + -DOPT_ENABLE_SANITIZER_LEAK=OFF \ + -DOPT_ENABLE_SANITIZER_POINTER_COMPARE=OFF \ + -DOPT_ENABLE_SANITIZER_POINTER_SUBTRACT=OFF \ -DOPT_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR=OFF \ + -DOPT_ENABLE_CPPCHECK=OFF \ -DOPT_ENABLE_CLANG_TIDY=OFF \ -DHICTK_BUILD_EXAMPLES=OFF \ -DHICTK_ENABLE_TESTING=ON \ diff --git a/.github/workflows/fuzzy-testing.yml b/.github/workflows/fuzzy-testing.yml index 488b5180b..2a28d852d 100644 --- a/.github/workflows/fuzzy-testing.yml +++ b/.github/workflows/fuzzy-testing.yml @@ -123,7 +123,7 @@ jobs: } container: - image: ghcr.io/paulsengroup/ci-docker-images/ubuntu-24.04-cxx-clang-18 + image: ghcr.io/paulsengroup/ci-docker-images/ubuntu-24.04-cxx-clang-19 options: "--user=root" env: diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index ffa004fe3..2ca57eab0 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -68,11 +68,11 @@ jobs: var includes = [] - includes.push({ compiler_name: 'apple-clang', compiler_version: '14', os: 'macos-12', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-13', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-14', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-13', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-14', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'apple-clang', compiler_version: '14', os: 'macos-12', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-13', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-14', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-13', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'apple-clang', compiler_version: '15', os: 'macos-14', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) return { include: includes } diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index b4f519b26..3c73379a6 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -46,7 +46,7 @@ jobs: name: Test find_package() needs: build-conan-deps container: - image: ghcr.io/paulsengroup/ci-docker-images/ubuntu-24.04-cxx-clang-18 + image: ghcr.io/paulsengroup/ci-docker-images/ubuntu-24.04-cxx-clang-19 options: "--user=root" env: @@ -113,7 +113,7 @@ jobs: name: Test add_subdirectory() needs: build-conan-deps container: - image: ghcr.io/paulsengroup/ci-docker-images/ubuntu-24.04-cxx-clang-18 + image: ghcr.io/paulsengroup/ci-docker-images/ubuntu-24.04-cxx-clang-19 options: "--user=root" env: diff --git a/.github/workflows/run-clang-tidy.yml b/.github/workflows/run-clang-tidy.yml index d1b197f0a..ac8e8a639 100644 --- a/.github/workflows/run-clang-tidy.yml +++ b/.github/workflows/run-clang-tidy.yml @@ -118,7 +118,11 @@ jobs: -DCMAKE_PREFIX_PATH="$PWD/conan-env" \ -DENABLE_DEVELOPER_MODE=ON \ -DOPT_ENABLE_SANITIZER_ADDRESS=OFF \ + -DOPT_ENABLE_SANITIZER_LEAK=OFF \ + -DOPT_ENABLE_SANITIZER_POINTER_COMPARE=OFF \ + -DOPT_ENABLE_SANITIZER_POINTER_SUBTRACT=OFF \ -DOPT_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR=OFF \ + -DOPT_ENABLE_CPPCHECK=OFF \ -DOPT_ENABLE_CLANG_TIDY=ON \ -DHICTK_BUILD_BENCHMARKS=ON \ -DHICTK_BUILD_EXAMPLES=ON \ diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 163d10433..53aa1afd0 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -79,57 +79,59 @@ jobs: var includes = [] // Debug builds (short CI) - includes.push({ compiler: 'gcc-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'ON' }) - includes.push({ compiler: 'clang-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-18', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'ON' }) + includes.push({ compiler: 'gcc-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'ON' }) + includes.push({ compiler: 'clang-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-19', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'ON' }) // Release builds (short CI) - includes.push({ compiler: 'gcc-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'ON' }) - includes.push({ compiler: 'clang-18', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'ON' }) + includes.push({ compiler: 'gcc-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'ON' }) + includes.push({ compiler: 'clang-19', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'ON' }) if (ci_short) { return { include: includes } } // Debug builds (long CI) - includes.push({ compiler: 'gcc-9', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-10', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-11', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-12', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-13', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-9', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-10', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-11', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-12', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-13', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-15', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-16', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-17', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-9', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-10', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-11', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-12', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-13', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-9', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-10', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-11', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-12', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-13', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-15', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-16', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-17', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-18', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) // Release builds (long CI) - includes.push({ compiler: 'gcc-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-9', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-10', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-11', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-12', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'gcc-13', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-9', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-10', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-11', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-12', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-13', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-15', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-16', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) - includes.push({ compiler: 'clang-17', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-9', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-10', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-11', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-12', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'gcc-13', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-8', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-9', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-10', os: 'ubuntu-20.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-11', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-12', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-13', os: 'ubuntu-22.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-14', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-15', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-16', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-17', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-18', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) // Make sure project builds with CMake 3.25 - includes.push({ compiler: 'clang-18', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.25.2', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-19', os: 'ubuntu-24.04', generator: 'Ninja', cmake: '3.25.2', build_type: 'Release', developer_mode: 'OFF' }) // Make sure project builds with make - includes.push({ compiler: 'clang-18', os: 'ubuntu-24.04', generator: 'Unix Makefiles', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler: 'clang-19', os: 'ubuntu-24.04', generator: 'Unix Makefiles', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) return { include: includes } diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index a35b066b8..452ba89de 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -61,8 +61,8 @@ jobs: var includes = [] - includes.push({ compiler_name: 'msvc', os: 'windows-2022', cmake: '3.29.*', build_type: 'Debug', developer_mode: 'OFF' }) - includes.push({ compiler_name: 'msvc', os: 'windows-2022', cmake: '3.29.*', build_type: 'Release', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'msvc', os: 'windows-2022', cmake: '3.30.*', build_type: 'Debug', developer_mode: 'OFF' }) + includes.push({ compiler_name: 'msvc', os: 'windows-2022', cmake: '3.30.*', build_type: 'Release', developer_mode: 'OFF' }) return { include: includes } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9881d09f..595599a6b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ default_language_version: exclude: ^test/data repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -23,7 +23,7 @@ repos: - id: trailing-whitespace # Formatters should be run late so that they can re-format any prior changes. - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black args: ["--line-length", "120", "--target-version", "py311"] @@ -51,4 +51,4 @@ repos: types_or: [c, c++] language: python args: ["-i"] - additional_dependencies: ["clang-format==19.1.0"] + additional_dependencies: ["clang-format==19.1.1"] diff --git a/CMakeLists.txt b/CMakeLists.txt index 756e444e7..f036c2205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT cmake_minimum_required(VERSION 3.25) -cmake_policy(VERSION 3.25...3.28) +cmake_policy(VERSION 3.25...3.30) set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) @@ -39,8 +39,8 @@ include(FetchContent) FetchContent_Declare( _hictk_project_options URL - "${CMAKE_CURRENT_SOURCE_DIR}/external/project_options-v0.33.0.tar.xz" - URL_HASH SHA256=b55dddd6c8af37c35b0bdd90d78088ef05beb423d6a56a55850e33fa3d464675 + "${CMAKE_CURRENT_SOURCE_DIR}/external/project_options-v0.36.6.tar.xz" + URL_HASH SHA256=b4df2a4107847248d4711ee48477cdf93c1a1c7d51a931937759eb9ffba67af8 SYSTEM ) FetchContent_MakeAvailable(_hictk_project_options) @@ -85,18 +85,21 @@ set(ENABLE_CACHE_DEFAULT ON) set(ENABLE_COMPILE_COMMANDS_SYMLINK_DEFAULT OFF) set(ENABLE_CONAN_DEFAULT OFF) set(ENABLE_CPPCHECK_DEFAULT OFF) -set(ENABLE_DOXYGEN_USER OFF) -set(ENABLE_DOXYGEN_DEVELOPER ON) +set(ENABLE_DOXYGEN_DEFAULT OFF) set(ENABLE_INTERPROCEDURAL_OPTIMIZATION_DEFAULT ON) set(ENABLE_NATIVE_OPTIMIZATION_DEFAULT OFF) set(ENABLE_PCH_DEFAULT OFF) -set(ENABLE_SANITIZER_ADDRESS_USER OFF) -set(ENABLE_SANITIZER_ADDRESS_DEVELOPER ON) -set(ENABLE_SANITIZER_LEAK_USER OFF) -set(ENABLE_SANITIZER_LEAK_DEVELOPER ON) -set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_USER OFF) -set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_DEVELOPER ON) +set(ENABLE_SANITIZER_ADDRESS_USER_DEFAULT OFF) +set(ENABLE_SANITIZER_ADDRESS_DEVELOPER_DEFAULT ON) +set(ENABLE_SANITIZER_LEAK_USER_DEFAULT OFF) +set(ENABLE_SANITIZER_LEAK_DEVELOPER_DEFAULT ON) +set(ENABLE_SANITIZER_POINTER_COMPARE_USER_DEFAULT OFF) +set(ENABLE_SANITIZER_POINTER_COMPARE_DEVELOPER_DEFAULT OFF) +set(ENABLE_SANITIZER_POINTER_SUBTRACT_USER_DEFAULT OFF) +set(ENABLE_SANITIZER_POINTER_SUBTRACT_DEVELOPER_DEFAULT ON) +set(ENABLE_SANITIZER_UNDEFINED_USER_DEFAULT OFF) +set(ENABLE_SANITIZER_UNDEFINED_DEVELOPER_DEFAULT ON) dynamic_project_options( PREFIX diff --git a/conanfile.Dockerfile.py b/conanfile.Dockerfile.py index 47c053d7a..680a7d963 100644 --- a/conanfile.Dockerfile.py +++ b/conanfile.Dockerfile.py @@ -39,16 +39,16 @@ def requirements(self): self.requires("bzip2/1.0.8#d00dac990f08d991998d624be81a9526") self.requires("cli11/2.4.2#1b431bda2fb2cd3efed633899abcd8cc") self.requires("concurrentqueue/1.0.4#1e48e1c712bcfd892087c9c622a51502") - self.requires("fast_float/6.1.1#e29acaa3d0543dee343abe3f6815346e") - self.requires("fmt/10.2.1#9199a7a0611866dea5c8849a77467b25") - self.requires("hdf5/1.14.3#31ccd8d4de83844f5db48471df1944a1") - self.requires("highfive/2.9.0#c57477beed8b0110fadeb6da8f48bcc5") - self.requires("libarchive/3.7.4#db39e5a5cddfd3a1884daaab4b7942fb") - self.requires("libdeflate/1.20#3bd86e0160becf992346aa68b4938c40") + self.requires("fast_float/6.1.5#e067b96a6271d1b4c255858ca9805bdd") + self.requires("fmt/11.0.2#5c7438ef4d5d69ab106a41e460ce11f3", force=True) + self.requires("hdf5/1.14.4.3#df1467d7374938c231edbe10e83f2bb4", force=True) + self.requires("highfive/2.10.0#3d1bd25944a57fa1bc30a0a22923d528") + self.requires("libarchive/3.7.6#f45e4a7fca516510284cecb8cf5fab81") + self.requires("libdeflate/1.22#f95aebe763153ccbc4cc76c023e42e5a") self.requires("lz4/1.10.0#68a01ece147a441b463d8cefea68d555", force=True) self.requires("lzo/2.10#5725914235423c771cb1c6b607109b45") self.requires("nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d") - self.requires("parallel-hashmap/1.3.12#dc7755096d8a1fac7792fdd85760b6ca") + self.requires("parallel-hashmap/1.4.0#36ac84df77219748440cdb0f23624d56") self.requires("readerwriterqueue/1.0.6#aaa5ff6fac60c2aee591e9e51b063b83") self.requires("span-lite/0.11.0#519fd49fff711674cfed8cd17d4ed422") self.requires("spdlog/1.14.1#972bbf70be1da4bc57ea589af0efde03") diff --git a/conanfile.py b/conanfile.py index 4bb7a4a19..8c4cff7fd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -35,25 +35,25 @@ def _min_cppstd(self): return 17 def requirements(self): - self.requires("arrow/16.1.0#f484da4c4c27c1eb3ead5d61b70635cd") - self.requires("boost/1.85.0#d9ae7996a5b917e0cfd4b738aa976dee", force=True) + self.requires("arrow/17.0.0#81be2aa6c49800df8cc163adf4b99e9f") + self.requires("boost/1.86.0#cd839a2082585255010f9e82eea94c7f", force=True) self.requires("bshoshany-thread-pool/4.1.0#be1802a8768416a6c9b1393cf0ce5e9c") self.requires("bzip2/1.0.8#d00dac990f08d991998d624be81a9526") - self.requires("catch2/3.6.0#819bc5a82c2cb626916fc18ee1dbc45f") + self.requires("catch2/3.7.1#431d772165ed0bc5adaabaa44a9f53ca") self.requires("cli11/2.4.2#1b431bda2fb2cd3efed633899abcd8cc") self.requires("concurrentqueue/1.0.4#1e48e1c712bcfd892087c9c622a51502") self.requires("eigen/3.4.0#2e192482a8acff96fe34766adca2b24c") - self.requires("fast_float/6.1.1#e29acaa3d0543dee343abe3f6815346e") - self.requires("fmt/10.2.1#9199a7a0611866dea5c8849a77467b25") - self.requires("hdf5/1.14.3#31ccd8d4de83844f5db48471df1944a1") - self.requires("highfive/2.9.0#c57477beed8b0110fadeb6da8f48bcc5") - self.requires("libarchive/3.7.4#db39e5a5cddfd3a1884daaab4b7942fb") - self.requires("libdeflate/1.20#3bd86e0160becf992346aa68b4938c40") + self.requires("fast_float/6.1.5#e067b96a6271d1b4c255858ca9805bdd") + self.requires("fmt/11.0.2#5c7438ef4d5d69ab106a41e460ce11f3", force=True) + self.requires("hdf5/1.14.4.3#df1467d7374938c231edbe10e83f2bb4", force=True) + self.requires("highfive/2.10.0#3d1bd25944a57fa1bc30a0a22923d528") + self.requires("libarchive/3.7.6#f45e4a7fca516510284cecb8cf5fab81") + self.requires("libdeflate/1.22#f95aebe763153ccbc4cc76c023e42e5a") self.requires("lz4/1.10.0#68a01ece147a441b463d8cefea68d555", force=True) self.requires("lzo/2.10#5725914235423c771cb1c6b607109b45") self.requires("nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d") - self.requires("parallel-hashmap/1.3.12#dc7755096d8a1fac7792fdd85760b6ca") - self.requires("pybind11/2.13.4#632601fe4e53c3046d616961ccee2c7b") + self.requires("parallel-hashmap/1.4.0#36ac84df77219748440cdb0f23624d56") + self.requires("pybind11/2.13.6#7d301b76bc1a308a51b506dd2de145b0") self.requires("readerwriterqueue/1.0.6#aaa5ff6fac60c2aee591e9e51b063b83") self.requires("span-lite/0.11.0#519fd49fff711674cfed8cd17d4ed422") self.requires("spdlog/1.14.1#972bbf70be1da4bc57ea589af0efde03") @@ -104,6 +104,7 @@ def configure(self): self.options["boost"].without_math = True self.options["boost"].without_mpi = True self.options["boost"].without_nowide = True + self.options["boost"].without_process = False self.options["boost"].without_program_options = True self.options["boost"].without_python = True self.options["boost"].without_random = True diff --git a/docs/quickstart_api.rst b/docs/quickstart_api.rst index c1d4db2e3..d17912c35 100644 --- a/docs/quickstart_api.rst +++ b/docs/quickstart_api.rst @@ -54,7 +54,7 @@ To install and configure hictk using `FetchContent # SPDX-License-Identifier: MIT -furo==2024.5.6 -sphinx==7.3.7 +furo==2024.8.6 +sphinx==8.0.2 sphinx-copybutton==0.5.2 sphinxcontrib-moderncmakedomain==3.29.0 sphinxcontrib-svg2pdfconverter==1.2.2 diff --git a/external/project_options-v0.33.0.tar.xz b/external/project_options-v0.33.0.tar.xz deleted file mode 100644 index 2c14fded7..000000000 Binary files a/external/project_options-v0.33.0.tar.xz and /dev/null differ diff --git a/external/project_options-v0.36.6.tar.xz b/external/project_options-v0.36.6.tar.xz new file mode 100644 index 000000000..a54142c3f Binary files /dev/null and b/external/project_options-v0.36.6.tar.xz differ diff --git a/src/libhictk/transformers/include/hictk/transformers/impl/to_dataframe_impl.hpp b/src/libhictk/transformers/include/hictk/transformers/impl/to_dataframe_impl.hpp index 0559deaf8..fd343102d 100644 --- a/src/libhictk/transformers/include/hictk/transformers/impl/to_dataframe_impl.hpp +++ b/src/libhictk/transformers/include/hictk/transformers/impl/to_dataframe_impl.hpp @@ -145,7 +145,7 @@ inline std::shared_ptr ToDataFrame::bg2_schema(bool with fields.emplace_back(arrow::field("bin2_id", arrow::uint64(), false)); } - auto chrom_dict = dictionary(arrow::uint32(), arrow::utf8(), true); + auto chrom_dict = dictionary(arrow::int32(), arrow::utf8()); fields.emplace_back(arrow::field("chrom1", chrom_dict, false)); fields.emplace_back(arrow::field("start1", arrow::uint32(), false)); @@ -368,6 +368,7 @@ inline std::shared_ptr ToDataFrame::make_coo_table() { auto table = arrow::Table::Make(coo_schema(), {std::make_shared(_bin1_id), std::make_shared(_bin2_id), std::make_shared(_count)}); + assert(table->ValidateFull().ok()); _bin1_id.clear(); _bin2_id.clear(); @@ -426,6 +427,7 @@ inline std::shared_ptr ToDataFrame::make_bg2_table() { std::make_shared(_count)}); // clang-format on } + assert(table->ValidateFull().ok()); _bin1_id.clear(); _bin2_id.clear(); @@ -454,6 +456,7 @@ inline std::shared_ptr ToDataFrame::make_bg2_table() { throw std::runtime_error(result.status().ToString()); } table = result.MoveValueUnsafe(); + assert(table->ValidateFull().ok()); } } @@ -556,8 +559,10 @@ std::shared_ptr ToDataFrame::sort_table( if constexpr (ndebug_not_defined()) { return arrow::compute::Take(vtable, *arg_sorter)->table(); } else { - return arrow::compute::Take(vtable, *arg_sorter, arrow::compute::TakeOptions::NoBoundsCheck()) - ->table(); + table = arrow::compute::Take(vtable, *arg_sorter, arrow::compute::TakeOptions::NoBoundsCheck()) + ->table(); + assert(table->ValidateFull().ok()); + return table; } } diff --git a/test/packaging/test_add_subdirectory/CMakeLists.txt b/test/packaging/test_add_subdirectory/CMakeLists.txt index 9b75cc53b..e720aa908 100644 --- a/test/packaging/test_add_subdirectory/CMakeLists.txt +++ b/test/packaging/test_add_subdirectory/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT cmake_minimum_required(VERSION 3.25) -cmake_policy(VERSION 3.25...3.27) +cmake_policy(VERSION 3.25...3.30) set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) diff --git a/test/packaging/test_find_package/CMakeLists.txt b/test/packaging/test_find_package/CMakeLists.txt index c951fa5b2..f5ced920a 100644 --- a/test/packaging/test_find_package/CMakeLists.txt +++ b/test/packaging/test_find_package/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT cmake_minimum_required(VERSION 3.25) -cmake_policy(VERSION 3.25...3.27) +cmake_policy(VERSION 3.25...3.30) set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) diff --git a/utils/devel/update_conan_deps.py b/utils/devel/update_conan_deps.py new file mode 100755 index 000000000..79226c592 --- /dev/null +++ b/utils/devel/update_conan_deps.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2024 Roberto Rossini +# +# SPDX-License-Identifier: MIT + +import argparse +import functools +import importlib +import inspect +import json +import pathlib +import re +import shutil +import subprocess as sp +import sys +from typing import Any, List, Tuple + +from packaging.version import Version + + +def make_cli() -> argparse.ArgumentParser: + cli = argparse.ArgumentParser() + + def existing_file(arg): + if (path := pathlib.Path(arg)).exists(): + return path + + raise FileNotFoundError(f'File "{arg}" does not exists') + + cli.add_argument( + "conanfile", + type=existing_file, + help="Path to the conanfile.py to use as input.", + ) + + return cli + + +@functools.cache +def get_conan() -> pathlib.Path: + conan = shutil.which("conan") + if not conan: + raise RuntimeError("Unable to find Conan in your path") + + return pathlib.Path(conan) + + +def import_from_path(file_path: pathlib.Path, module_name="conanfile"): + spec = importlib.util.spec_from_file_location(module_name, file_path) + module = importlib.util.module_from_spec(spec) + sys.modules[module_name] = module + spec.loader.exec_module(module) + return module + + +def extract_requirements(conanfile: pathlib.Path) -> List[Tuple[str, Any, Any, str]]: + conanfile = import_from_path(conanfile, conanfile.stem) + source = inspect.getsource(conanfile.HictkConan.requirements) + + pattern = re.compile(r"^\"([\w\-_]+)/([\w.\-_]+)#(\w+)\"(.*)$") + + requirements = [] + for line in source.split("\n"): + line = line.strip() + if not line.startswith("self.requires("): + continue + + line = line.removeprefix("self.requires(") + + matches = pattern.search(line).groups() + if len(matches) == 0: + raise RuntimeError(f'Failed to parse requirements from line "{line}"') + + name = matches[0] + version = None + revision = None + suffix = None + if len(matches) > 1: + version = matches[1] + + if len(matches) > 2: + revision = matches[2] + + if len(matches) > 3: + suffix = matches[3] + + requirements.append((name, version, revision, suffix)) + + return requirements + + +def get_last_version(package: str, remotes: str) -> Tuple[str, str]: + query = f"{package}/*" + + res = sp.run([get_conan(), "list", "--remote", remotes, query, "--format", "json"], stdout=sp.PIPE, stderr=sp.PIPE) + if res.returncode != 0: + raise RuntimeError(res.stderr.decode("utf-8")) + + version = None + for _, versions in json.loads(res.stdout.decode("utf-8")).items(): + for pkg in versions.keys(): + found_ver = Version(pkg.partition("/")[-1]) + if version is None: + version = found_ver + continue + version = max(found_ver, version) + + if version is None: + raise RuntimeError(f'Unable to find any version for "{package}" using "{remotes}" as remote(s)') + + return package, str(version) + + +def get_last_revision(package: str, version: str, remotes: str) -> Tuple[str, str, str]: + query = f"{package}/{version}#*" + + res = sp.run([get_conan(), "list", "--remote", remotes, query, "--format", "json"], stdout=sp.PIPE, stderr=sp.PIPE) + if res.returncode != 0: + raise RuntimeError(res.stderr.decode("utf-8")) + + revision = None + timestamp = None + for _, versions in json.loads(res.stdout.decode("utf-8")).items(): + assert len(versions) == 1 + _, versions = versions.popitem() + for rev, metadata in versions["revisions"].items(): + if revision is None: + revision = rev + timestamp = metadata["timestamp"] + continue + if metadata["timestamp"] > timestamp: + revision = rev + timestamp = metadata["timestamp"] + + if revision is None: + raise RuntimeError(f'Unable to find any revision for "{package}/{version}" using "{remotes}" as remote(s)') + + return package, version, revision + + +def get_last_recipe(package: str, remotes: str) -> Tuple[str, str, str]: + _, ver = get_last_version(package, remotes) + _, _, rev = get_last_revision(package, ver, remotes) + + return package, ver, rev + + +def main(): + args = vars(make_cli().parse_args()) + + for package, _, _, suffix in extract_requirements(args["conanfile"]): + package, version, revision = get_last_recipe(package, "*") + print(f'self.requires("{package}/{version}#{revision}"{suffix}') + + +if __name__ == "__main__": + main()