Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/api_stability/3.3.0/0001-FIX-take_until_view_test.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 375b94a7b135d7d7dc1937fdf5affd1beb48213a Mon Sep 17 00:00:00 2001
From b83e281578b8ead4fccdaeee6b924cc34bdfd222 Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Thu, 28 Sep 2023 21:28:37 +0200
Subject: [PATCH 1/5] [FIX] take_until_view_test
Subject: [PATCH 1/7] [FIX] take_until_view_test

mutable refers to the capture
---
Expand Down
4 changes: 2 additions & 2 deletions test/api_stability/3.3.0/0002-FIX-Change-constexpr-test.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 39bbad4ae37dbeb02543e1556cd626eb1a451e34 Mon Sep 17 00:00:00 2001
From c734afc727852e3318ebc940fce7244689b81ae3 Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Thu, 28 Sep 2023 19:35:57 +0200
Subject: [PATCH 2/5] [FIX] Change constexpr test
Subject: [PATCH 2/7] [FIX] Change constexpr test

gcc11 complains suddenly
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 584f349d8b9de4db71b23595c85aa5a7c9cc6f60 Mon Sep 17 00:00:00 2001
From abeb5d0c40c71c16a8b04f98f0bbc8810929ca30 Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Sun, 28 Jul 2024 15:17:28 +0200
Subject: [PATCH 3/5] [API] hamming scoring scheme
Subject: [PATCH 3/7] [API] hamming scoring scheme

---
.../08_pairwise_alignment/pa_assignment_3_solution.cpp | 6 ++++--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1685e5e348ed7ed7a4233a6c6db84e8c716d42f9 Mon Sep 17 00:00:00 2001
From 02fe12c864222def7762b28197b6bd72c013640a Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Mon, 19 Aug 2024 14:13:08 +0200
Subject: [PATCH 4/5] [API] seqan3::sam_file_program_info_t::user_tags
Subject: [PATCH 4/7] [API] seqan3::sam_file_program_info_t::user_tags

---
test/unit/io/sam_file/format_sam_test.cpp | 13 ++-----------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e8a2c7e13ea00bd2fc96422ca8183becbb4254cf Mon Sep 17 00:00:00 2001
From 2fffc406b2126b41b3933f43cba50710806dd53b Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Wed, 22 Jan 2025 14:55:53 +0100
Subject: [PATCH 5/5] [NOAPI][DETAIL] Update copyright
Subject: [PATCH 5/7] [NOAPI][DETAIL] Update copyright

---
test/unit/argument_parser/detail/format_help_test.cpp | 10 +++++-----
Expand Down
245 changes: 245 additions & 0 deletions test/api_stability/3.3.0/0006-NOAPI-DETAIL-Use-std-ranges-all.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
From ca5604875b712292c3f1a64b745830ebec3e29ab Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Wed, 22 Jan 2025 17:11:10 +0100
Subject: [PATCH 6/7] [NOAPI][DETAIL] Use std::ranges::all

---
test/performance/search/search_benchmark.cpp | 5 ++---
.../alignment/pairwise/alignment_result_test.cpp | 9 ++++-----
.../detail/algorithm_executor_blocking_test.cpp | 5 ++---
.../sequence_file_integration_test.cpp | 5 ++---
test/unit/search/search_collection_test.cpp | 5 ++---
test/unit/search/search_test.cpp | 5 ++---
test/unit/utility/views/single_pass_input_test.cpp | 13 ++++++-------
7 files changed, 20 insertions(+), 27 deletions(-)

diff --git a/test/performance/search/search_benchmark.cpp b/test/performance/search/search_benchmark.cpp
index 481fec09b..595c336c0 100644
--- a/test/performance/search/search_benchmark.cpp
+++ b/test/performance/search/search_benchmark.cpp
@@ -8,7 +8,6 @@
#include <benchmark/benchmark.h>

#include <seqan3/alphabet/nucleotide/dna4.hpp>
-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/search/fm_index/bi_fm_index.hpp>
#include <seqan3/search/fm_index/fm_index.hpp>
#include <seqan3/search/search.hpp>
@@ -143,8 +142,8 @@ std::vector<alphabet_t> generate_repeating_sequence(size_t const template_length
uint8_t simulated_errors = 5;
len = (len + simulated_errors > template_length) ? template_length - simulated_errors : len;

- return generate_reads(seq_template, repeats, len, simulated_errors, 0.15, 0.15) | seqan3::detail::all
- | std::views::join | seqan3::ranges::to<std::vector>();
+ return generate_reads(seq_template, repeats, len, simulated_errors, 0.15, 0.15) | std::views::all | std::views::join
+ | seqan3::ranges::to<std::vector>();
}

//============================================================================
diff --git a/test/unit/alignment/pairwise/alignment_result_test.cpp b/test/unit/alignment/pairwise/alignment_result_test.cpp
index 6c57b950c..78a453dfb 100644
--- a/test/unit/alignment/pairwise/alignment_result_test.cpp
+++ b/test/unit/alignment/pairwise/alignment_result_test.cpp
@@ -19,7 +19,6 @@
#include <seqan3/alphabet/nucleotide/dna4.hpp>
#include <seqan3/alphabet/nucleotide/rna5.hpp>
#include <seqan3/alphabet/views/to_char.hpp>
-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/core/detail/template_inspection.hpp>
#include <seqan3/test/expect_range_eq.hpp>
#include <seqan3/test/expect_same_type.hpp>
@@ -209,14 +208,14 @@ TYPED_TEST(alignment_result_test, alignment)
if constexpr (seqan3::tuple_like<alignment_t>)
{
seqan3::alignment_result<TypeParam> tmp{TypeParam{1u, 2u, 0, {10ul, 10ul}, {0ul, 0ul}, {seq, seq}}};
- EXPECT_RANGE_EQ(std::get<0>(tmp.alignment()) | seqan3::detail::all | seqan3::views::to_char, "AT-C--A"sv);
- EXPECT_RANGE_EQ(std::get<1>(tmp.alignment()) | seqan3::detail::all | seqan3::views::to_char, "AT-C--A"sv);
+ EXPECT_RANGE_EQ(std::get<0>(tmp.alignment()) | std::views::all | seqan3::views::to_char, "AT-C--A"sv);
+ EXPECT_RANGE_EQ(std::get<1>(tmp.alignment()) | std::views::all | seqan3::views::to_char, "AT-C--A"sv);
}
else
{
seqan3::alignment_result<TypeParam> tmp{TypeParam{1u, 2u, 0, {10ul, 10ul}, {0ul, 0ul}, {seq, seq}}};
- EXPECT_RANGE_EQ(tmp.alignment()[0] | seqan3::detail::all | seqan3::views::to_char, "AT-C--A"sv);
- EXPECT_RANGE_EQ(tmp.alignment()[1] | seqan3::detail::all | seqan3::views::to_char, "AT-C--A"sv);
+ EXPECT_RANGE_EQ(tmp.alignment()[0] | std::views::all | seqan3::views::to_char, "AT-C--A"sv);
+ EXPECT_RANGE_EQ(tmp.alignment()[1] | std::views::all | seqan3::views::to_char, "AT-C--A"sv);
}
}

diff --git a/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp b/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp
index fc7b57255..3cc46ec42 100644
--- a/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp
+++ b/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp
@@ -12,7 +12,6 @@
#include <string>

#include <seqan3/core/algorithm/detail/algorithm_executor_blocking.hpp>
-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/test/pretty_printing.hpp>
#include <seqan3/utility/views/zip.hpp>

@@ -175,11 +174,11 @@ TYPED_TEST(algorithm_executor_blocking_test, lvalue_sequence_pairs)

TYPED_TEST(algorithm_executor_blocking_test, rvalue_sequence_pairs_view)
{
- using persist_pairs_t = decltype(this->sequence_pairs | seqan3::detail::all);
+ using persist_pairs_t = decltype(this->sequence_pairs | std::views::all);
using algorithm_t = typename algorithm_type_for_input<persist_pairs_t>::type;
using executor_t = seqan3::detail::algorithm_executor_blocking<persist_pairs_t, algorithm_t, size_t, TypeParam>;

- executor_t exec{this->sequence_pairs | seqan3::detail::all,
+ executor_t exec{this->sequence_pairs | std::views::all,
algorithm_t{dummy_algorithm{}},
0u,
this->execution_handler()};
diff --git a/test/unit/io/sequence_file/sequence_file_integration_test.cpp b/test/unit/io/sequence_file/sequence_file_integration_test.cpp
index 83a344bd3..bbaa01b55 100644
--- a/test/unit/io/sequence_file/sequence_file_integration_test.cpp
+++ b/test/unit/io/sequence_file/sequence_file_integration_test.cpp
@@ -10,7 +10,6 @@
#include <iterator>
#include <sstream>

-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/io/sequence_file/input.hpp>
#include <seqan3/io/sequence_file/output.hpp>

@@ -103,11 +102,11 @@ TEST(integration, view)
"AGGCTGNAGGCTGAGGCTGNAGGCTGNAGGCTGNAGGCTGNAGGCTGNAGGCTGNAGGCTGN\n"};

// valid without assignment?
- seqan3::sequence_file_input{std::istringstream{input}, seqan3::format_fasta{}} | seqan3::detail::all
+ seqan3::sequence_file_input{std::istringstream{input}, seqan3::format_fasta{}} | std::views::all
| std::views::take(2) | seqan3::sequence_file_output{std::ostringstream{}, seqan3::format_fasta{}};

// valid with assignment and check contents
- auto fout = seqan3::sequence_file_input{std::istringstream{input}, seqan3::format_fasta{}} | seqan3::detail::all
+ auto fout = seqan3::sequence_file_input{std::istringstream{input}, seqan3::format_fasta{}} | std::views::all
| std::views::take(2) | seqan3::sequence_file_output{std::ostringstream{}, seqan3::format_fasta{}};

fout.get_stream().flush();
diff --git a/test/unit/search/search_collection_test.cpp b/test/unit/search/search_collection_test.cpp
index 0a7aeb701..9b3e04a7b 100644
--- a/test/unit/search/search_collection_test.cpp
+++ b/test/unit/search/search_collection_test.cpp
@@ -14,7 +14,6 @@
#include <seqan3/alphabet/quality/phred42.hpp>
#include <seqan3/alphabet/quality/qualified.hpp>
#include <seqan3/core/debug_stream/tuple.hpp>
-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/search/fm_index/bi_fm_index.hpp>
#include <seqan3/search/fm_index/fm_index.hpp>
#include <seqan3/search/search.hpp>
@@ -27,13 +26,13 @@ using seqan3::operator""_phred42;

using namespace std::string_literals;

-auto ref_id_and_position = seqan3::detail::all
+auto ref_id_and_position = std::views::all
| std::views::transform(
[](auto && res)
{
return std::make_pair(res.reference_id(), res.reference_begin_position());
});
-auto query_id = seqan3::detail::all
+auto query_id = std::views::all
| std::views::transform(
[](auto && res)
{
diff --git a/test/unit/search/search_test.cpp b/test/unit/search/search_test.cpp
index c22417120..fb473ede3 100644
--- a/test/unit/search/search_test.cpp
+++ b/test/unit/search/search_test.cpp
@@ -13,7 +13,6 @@
#include <seqan3/alphabet/nucleotide/dna4.hpp>
#include <seqan3/alphabet/quality/phred42.hpp>
#include <seqan3/alphabet/quality/qualified.hpp>
-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/search/configuration/hit.hpp>
#include <seqan3/search/configuration/max_error.hpp>
#include <seqan3/search/configuration/on_result.hpp>
@@ -29,13 +28,13 @@ using seqan3::operator""_phred42;

using namespace std::string_literals;

-auto position = seqan3::detail::all
+auto position = std::views::all
| std::views::transform(
[](auto && res)
{
return res.reference_begin_position();
});
-auto query_id = seqan3::detail::all
+auto query_id = std::views::all
| std::views::transform(
[](auto && res)
{
diff --git a/test/unit/utility/views/single_pass_input_test.cpp b/test/unit/utility/views/single_pass_input_test.cpp
index 1567d93ed..a800b317c 100644
--- a/test/unit/utility/views/single_pass_input_test.cpp
+++ b/test/unit/utility/views/single_pass_input_test.cpp
@@ -11,7 +11,6 @@
#include <type_traits>
#include <vector>

-#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/test/expect_same_type.hpp>
#include <seqan3/utility/views/single_pass_input.hpp>

@@ -61,7 +60,7 @@ TYPED_TEST_SUITE(single_pass_input, underlying_range_types, );

TYPED_TEST(single_pass_input, view_concept)
{
- using view_t = seqan3::detail::single_pass_input_view<seqan3::detail::all_t<TypeParam &>>;
+ using view_t = seqan3::detail::single_pass_input_view<std::views::all_t<TypeParam &>>;
EXPECT_TRUE((std::derived_from<view_t, std::ranges::view_interface<view_t>>));
EXPECT_TRUE((std::sentinel_for<std::ranges::sentinel_t<view_t>, std::ranges::iterator_t<view_t>>));
EXPECT_TRUE(std::ranges::range<view_t>);
@@ -115,7 +114,7 @@ TYPED_TEST(single_pass_input, deduction_guide_view)

TYPED_TEST(single_pass_input, view_construction)
{
- using view_t = seqan3::detail::single_pass_input_view<seqan3::detail::all_t<TypeParam>>;
+ using view_t = seqan3::detail::single_pass_input_view<std::views::all_t<TypeParam>>;
EXPECT_TRUE(std::is_default_constructible_v<view_t>);
EXPECT_TRUE(std::is_copy_constructible_v<view_t>);
EXPECT_TRUE(std::is_move_constructible_v<view_t>);
@@ -129,7 +128,7 @@ TYPED_TEST(single_pass_input, view_construction)
}

{ // from view
- [[maybe_unused]] seqan3::detail::single_pass_input_view v{TypeParam{this->data} | seqan3::detail::all};
+ [[maybe_unused]] seqan3::detail::single_pass_input_view v{TypeParam{this->data} | std::views::all};
}
}

@@ -180,14 +179,14 @@ TYPED_TEST(single_pass_input, view_iterate)

TYPED_TEST(single_pass_input, iterator_concepts)
{
- using view_type = seqan3::detail::single_pass_input_view<seqan3::detail::all_t<TypeParam>>;
+ using view_type = seqan3::detail::single_pass_input_view<std::views::all_t<TypeParam>>;
EXPECT_TRUE((std::input_iterator<std::ranges::iterator_t<view_type>>));
EXPECT_FALSE((std::forward_iterator<std::ranges::iterator_t<view_type>>));
}

TYPED_TEST(single_pass_input, iterator_construction)
{
- using view_type = seqan3::detail::single_pass_input_view<seqan3::detail::all_t<TypeParam>>;
+ using view_type = seqan3::detail::single_pass_input_view<std::views::all_t<TypeParam>>;
using iterator_type = std::ranges::iterator_t<view_type>;
EXPECT_TRUE(std::is_default_constructible_v<iterator_type>);
EXPECT_TRUE(std::is_copy_constructible_v<iterator_type>);
@@ -292,7 +291,7 @@ TYPED_TEST(single_pass_input, iterator_neq_comparison)

TYPED_TEST(single_pass_input, sentinel_concepts)
{
- using view_type = seqan3::detail::single_pass_input_view<seqan3::detail::all_t<TypeParam>>;
+ using view_type = seqan3::detail::single_pass_input_view<std::views::all_t<TypeParam>>;
using iterator_type = std::ranges::iterator_t<view_type>;
using sentinel_type = std::ranges::sentinel_t<view_type>;

--
2.45.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
SPDX-License-Identifier: BSD-3-Clause
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From 636d021ac6750454ddcad34e5dee160d2d0c0751 Mon Sep 17 00:00:00 2001
From: Enrico Seiler <[email protected]>
Date: Wed, 22 Jan 2025 17:16:19 +0100
Subject: [PATCH 7/7] [NOAPI][DETAIL] Remove copyable_wrapper

---
test/snippet/core/detail/copyable_wrapper.cpp | 16 ----------------
test/snippet/core/detail/copyable_wrapper.err | 2 --
2 files changed, 18 deletions(-)
delete mode 100644 test/snippet/core/detail/copyable_wrapper.cpp
delete mode 100644 test/snippet/core/detail/copyable_wrapper.err

diff --git a/test/snippet/core/detail/copyable_wrapper.cpp b/test/snippet/core/detail/copyable_wrapper.cpp
deleted file mode 100644
index 0f73321f5..000000000
--- a/test/snippet/core/detail/copyable_wrapper.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <seqan3/core/debug_stream.hpp>
-#include <seqan3/core/detail/copyable_wrapper.hpp>
-
-int main()
-{
- int outer{};
- // Might be used for non-copyable lambdas. In this example, the lambda would be copyable even without the wrapper.
- seqan3::detail::copyable_wrapper wrapper{[&outer](int const x)
- {
- outer += x;
- return outer;
- }};
- auto wrapper_2 = wrapper; // Would not work with non-copyable lambda.
- seqan3::debug_stream << wrapper(2) << '\n'; // 2
- seqan3::debug_stream << wrapper_2(4) << '\n'; // 6
-}
diff --git a/test/snippet/core/detail/copyable_wrapper.err b/test/snippet/core/detail/copyable_wrapper.err
deleted file mode 100644
index 2b24e3127..000000000
--- a/test/snippet/core/detail/copyable_wrapper.err
+++ /dev/null
@@ -1,2 +0,0 @@
-2
-6
--
2.45.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
SPDX-License-Identifier: BSD-3-Clause
1 change: 1 addition & 0 deletions test/api_stability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ git checkout test/api
cp /tmp/seqan3-api-stability-patches/*.patch test/api_stability/3.3.0/

rm -fdr /tmp/seqan3-api-stability-patches
git branch -D api-stability-patches

# add new patches
git add test/api_stability/3.3.0/
Expand Down
Loading