Skip to content

Commit

Permalink
[MISC] automatic linting
Browse files Browse the repository at this point in the history
  • Loading branch information
seqan-actions committed Aug 16, 2024
1 parent 2caa8cb commit b671474
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
3 changes: 1 addition & 2 deletions include/raptor/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
#pragma once

#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>

#include <sharg/exceptions.hpp>

#include <hibf/hierarchical_interleaved_bloom_filter.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>

#include <raptor/argument_parsing/build_arguments.hpp>
#include <raptor/strong_types.hpp>
Expand Down
13 changes: 8 additions & 5 deletions src/argument_parsing/build_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,14 @@ void init_build_parser(sharg::parser & parser, build_arguments & arguments)
.description = "The number of hash functions to use.",
.default_message = std::to_string(arguments.hash) + ", or read from layout file",
.validator = sharg::arithmetic_range_validator{1, 5}});
parser.add_option(arguments.parts,
sharg::config{.short_id = '\0',
.long_id = "parts",
.description = "Splits the index in this many parts. Not available for the HIBF. Needs to be set at layouting step.",
.validator = power_of_two_validator{}});
parser.add_option(
arguments.parts,
sharg::config{
.short_id = '\0',
.long_id = "parts",
.description =
"Splits the index in this many parts. Not available for the HIBF. Needs to be set at layouting step.",
.validator = power_of_two_validator{}});

// GCOVR_EXCL_START
// Adding additional cwl information that currently aren't supported by sharg and tdl.
Expand Down
27 changes: 11 additions & 16 deletions test/unit/cli/search/search_partitioned_hibf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

#include <raptor/test/cli_test.hpp>

struct search_partitioned_hibf : public raptor_base, public testing::WithParamInterface<std::tuple<size_t, size_t, size_t, size_t>>
struct search_partitioned_hibf :
public raptor_base,
public testing::WithParamInterface<std::tuple<size_t, size_t, size_t, size_t>>
{};

TEST_P(search_partitioned_hibf, with_threshold)
Expand Down Expand Up @@ -53,13 +55,8 @@ TEST_P(search_partitioned_hibf, with_threshold)
ASSERT_TRUE(std::filesystem::exists(layout_filename));

{ // build index
cli_test_result const result = execute_app("raptor",
"build",
"--output",
index_filename,
"--quiet",
"--input",
layout_filename);
cli_test_result const result =
execute_app("raptor", "build", "--output", index_filename, "--quiet", "--input", layout_filename);

EXPECT_EQ(result.out, std::string{});
EXPECT_EQ(result.err, std::string{});
Expand Down Expand Up @@ -130,13 +127,8 @@ TEST_P(search_partitioned_hibf, no_hits)
ASSERT_TRUE(std::filesystem::exists(layout_filename));

{ // build index
cli_test_result const result = execute_app("raptor",
"build",
"--output",
index_filename,
"--quiet",
"--input",
layout_filename);
cli_test_result const result =
execute_app("raptor", "build", "--output", index_filename, "--quiet", "--input", layout_filename);

EXPECT_EQ(result.out, std::string{});
EXPECT_EQ(result.err, std::string{});
Expand Down Expand Up @@ -165,7 +157,10 @@ TEST_P(search_partitioned_hibf, no_hits)

INSTANTIATE_TEST_SUITE_P(search_partitioned_hibf_suite,
search_partitioned_hibf,
testing::Combine(testing::Values(16, 32), testing::Values(2, 4, 8), testing::Values(0, 1), testing::Values(0, 1, 2, 3, 4)),
testing::Combine(testing::Values(16, 32),
testing::Values(2, 4, 8),
testing::Values(0, 1),
testing::Values(0, 1, 2, 3, 4)),
[](testing::TestParamInfo<search_partitioned_hibf::ParamType> const & info)
{
std::string name = std::to_string(std::max<int>(1, std::get<0>(info.param) * 4)) + "_bins_"
Expand Down

0 comments on commit b671474

Please sign in to comment.