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 13, 2024
1 parent d533f56 commit 1983ec4
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 15 deletions.
9 changes: 7 additions & 2 deletions src/chopper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <chopper/layout/execute.hpp>
#include <chopper/set_up_parser.hpp>
#include <chopper/sketch/check_filenames.hpp>
#include <chopper/sketch/read_data_file.hpp>
#include <chopper/sketch/output.hpp>
#include <chopper/sketch/read_data_file.hpp>

#include <hibf/sketch/compute_sketches.hpp>

Expand Down Expand Up @@ -79,7 +79,12 @@ int main(int argc, char const * argv[])
seqan::hibf::sketch::compute_sketches(config.hibf_config, sketches);
compute_sketches_timer.stop();

exit_code |= chopper::layout::execute(config, filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
exit_code |= chopper::layout::execute(config,
filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);
}
catch (std::exception const & ext)
{
Expand Down
25 changes: 20 additions & 5 deletions test/api/layout/execute_layout_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include <string>
#include <vector>

#include <hibf/sketch/compute_sketches.hpp>

#include <chopper/layout/execute.hpp>

#include <hibf/sketch/compute_sketches.hpp>

#include "../api_test.hpp"
#include "print_debug_file.hpp"

Expand Down Expand Up @@ -52,7 +52,12 @@ TEST(execute_test, few_ubs)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

std::string const expected_file{"@CHOPPER_USER_BINS\n"
"@0 seq0a seq0b\n"
Expand Down Expand Up @@ -151,7 +156,12 @@ TEST(execute_test, set_default_tmax)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

EXPECT_EQ(config.hibf_config.tmax, 64u);
}
Expand Down Expand Up @@ -189,7 +199,12 @@ TEST(execute_test, many_ubs)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, many_filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
many_filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

std::string const expected_file{"@CHOPPER_USER_BINS\n"
"@0 seq0\n"
Expand Down
28 changes: 24 additions & 4 deletions test/api/layout/execute_with_estimation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ TEST(execute_estimation_test, few_ubs)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

ASSERT_TRUE(std::filesystem::exists(stats_file));

Expand Down Expand Up @@ -123,7 +128,12 @@ TEST(execute_estimation_test, many_ubs)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, many_filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
many_filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

ASSERT_TRUE(std::filesystem::exists(stats_file));

Expand Down Expand Up @@ -532,7 +542,12 @@ TEST(execute_estimation_test, many_ubs_force_all)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, many_filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
many_filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

ASSERT_TRUE(std::filesystem::exists(stats_file));

Expand Down Expand Up @@ -638,7 +653,12 @@ TEST(execute_estimation_test, with_rearrangement)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

ASSERT_TRUE(std::filesystem::exists(stats_file));

Expand Down
18 changes: 14 additions & 4 deletions test/api/layout/hibf_statistics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
#include <string>
#include <vector>

#include <hibf/sketch/compute_sketches.hpp>

#include <chopper/configuration.hpp>
#include <chopper/layout/execute.hpp>
#include <chopper/layout/hibf_statistics.hpp>

#include <hibf/sketch/compute_sketches.hpp>

#include "../api_test.hpp"

TEST(byte_size_to_formatted_str, storage_unit)
Expand Down Expand Up @@ -139,7 +139,12 @@ TEST(execute_test, chopper_layout_statistics)

testing::internal::CaptureStdout();
testing::internal::CaptureStderr();
chopper::layout::execute(config, many_filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
many_filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);
std::string layout_result_stdout = testing::internal::GetCapturedStdout();
std::string layout_result_stderr = testing::internal::GetCapturedStderr();

Expand Down Expand Up @@ -198,7 +203,12 @@ TEST(execute_test, chopper_layout_statistics_determine_best_bins)
seqan::hibf::concurrent_timer rearrangement_timer{};
seqan::hibf::concurrent_timer dp_algorithm_timer{};

chopper::layout::execute(config, filenames, sketches, union_estimation_timer, rearrangement_timer, dp_algorithm_timer);
chopper::layout::execute(config,
filenames,
sketches,
union_estimation_timer,
rearrangement_timer,
dp_algorithm_timer);

std::string expected_cout =
R"expected_cout(## ### Parameters ###
Expand Down

0 comments on commit 1983ec4

Please sign in to comment.