Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Replace seqan3::views::join with seqan3::views::join_with #2526

Merged
merged 2 commits into from
May 4, 2021

Conversation

SGSSGene
Copy link
Contributor

@SGSSGene SGSSGene commented Apr 19, 2021

  • Deprecates seqan3::views::join use seqan3::views::join_with or std::views::join instead.
  • Adds seqan3::views::join_with
  • Move files from seqan3/ranges/views/join.hpp to seqan3/utility/views/join_with.hpp

resolves seqan/product_backlog#351

@vercel
Copy link

vercel bot commented Apr 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/seqan/seqan3/AkersZk3zyum66KFxu6EKy9wWbQ4
✅ Preview: https://seqan3-git-fork-sgssgene-deprecate-viewsjoin-seqan.vercel.app

@SGSSGene SGSSGene force-pushed the deprecate/views_join branch 2 times, most recently from 75cbfec to 6cc9cbb Compare April 19, 2021 17:42
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #2526 (e963591) into master (9c9e01b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2526   +/-   ##
=======================================
  Coverage   98.24%   98.24%           
=======================================
  Files         270      270           
  Lines       10570    10570           
=======================================
  Hits        10384    10384           
  Misses        186      186           
Impacted Files Coverage Δ
include/seqan3/alphabet/views/translate_join.hpp 100.00% <ø> (ø)
include/seqan3/io/sequence_file/format_fasta.hpp 98.68% <ø> (ø)
.../seqan3/range/container/concatenated_sequences.hpp 96.90% <ø> (ø)
include/seqan3/argument_parser/validators.hpp 91.39% <100.00%> (ø)
include/seqan3/search/fm_index/fm_index.hpp 100.00% <100.00%> (ø)
include/seqan3/utility/views/interleave.hpp 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c9e01b...e963591. Read the comment docs.

@SGSSGene SGSSGene requested review from a team and MitraDarja and removed request for a team April 19, 2021 18:16
Copy link
Contributor

@MitraDarja MitraDarja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one question. :)

@SGSSGene
Copy link
Contributor Author

Rename file to "join_with_view.hpp"

@MitraDarja MitraDarja requested review from a team and marehr and removed request for a team April 21, 2021 14:46
Copy link
Member

@marehr marehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

#include <seqan3/range/views/repeat_n.hpp>
#include <seqan3/range/views/slice.hpp>
#include <seqan3/utility/views/join_with.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this even used in this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was cold. Needed my computer to heat up ;-)
Yes, not needed at all, no clue why I added it.

#include <seqan3/utility/char_operations/predicate.hpp>
#include <seqan3/utility/detail/type_name_as_string.hpp>
#include <seqan3/utility/views/join_with.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this even used in this class?

using ::ranges::views::join;

} // namespace seqan3::views
SEQAN3_DEPRECATED_HEADER(
Copy link
Member

@marehr marehr Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: never mind, see second post
Suggested change
SEQAN3_DEPRECATED_HEADER(
namespace seqan3::views
{
/*!\brief A join view.
* \ingroup views
* \deprecated Please use std::views::join or seqan3::views::join_with (if a separator is needed)
*/
SEQAN3_DEPRECATED_310 inline constexpr auto join = ::ranges::views::join;
} // namespace seqan3::views
SEQAN3_DEPRECATED_HEADER(

Copy link
Member

@marehr marehr Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, your initial solution might be better in this case.

  • as we can deprecate seqan3/range/views/join.hpp and
  • don't use that internally any more
  • seqan3/range/views/all.hpp includes seqan3/utility/views/join_with.hpp and thus exposes the deprecated seqan3::views::join

that means everything compiles as before, using all.hpp will not throw any warnings. an explicit include will give a proper deprecation warning.

include/seqan3/utility/views/join_with.hpp Show resolved Hide resolved
@marehr
Copy link
Member

marehr commented May 4, 2021

@SGSSGene I'll rebase this for you :)

- Deprecates `seqan3::views::join` use `seqan3::views::join_with` or `std::views::join` instead.
- Adds `seqan3::views::join_with`
- Move files from seqan3/ranges/views/join.hpp to seqan3/utility/views/join_with.hpp
@marehr marehr merged commit 9544a58 into seqan:master May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecate seqan3::views::join and move seqan3::views::join_with to seqan3/utility/views/
3 participants