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

[FEATURE] Search dynamic mode config #1446

Closed
wants to merge 4 commits into from

Conversation

rrahn
Copy link
Contributor

@rrahn rrahn commented Dec 20, 2019

Resolves #1436

@rrahn rrahn requested a review from eseiler December 20, 2019 18:31
@rrahn rrahn force-pushed the feature/search_dynamic_mode_config branch from c467ff9 to e3e776f Compare December 20, 2019 20:23
@codecov
Copy link

codecov bot commented Dec 20, 2019

Codecov Report

Merging #1446 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1446      +/-   ##
==========================================
+ Coverage   97.66%   97.66%   +<.01%     
==========================================
  Files         236      238       +2     
  Lines        8988     9011      +23     
==========================================
+ Hits         8778     8801      +23     
  Misses        210      210
Impacted Files Coverage Δ
include/seqan3/search/algorithm/search.hpp 87.5% <ø> (ø) ⬆️
include/seqan3/search/configuration/mode.hpp 100% <100%> (ø)
...an3/search/configuration/default_configuration.hpp 100% <100%> (ø)
include/seqan3/search/algorithm/detail/search.hpp 100% <100%> (ø) ⬆️

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 198797f...9f83164. Read the comment docs.

@rrahn rrahn requested review from joergi-w and removed request for eseiler January 6, 2020 15:30
include/seqan3/core/algorithm/dynamic_state.hpp Outdated Show resolved Hide resolved
@@ -300,6 +300,13 @@ TYPED_TEST(search_test, search_strategy_all)
configuration const cfg = max_error{total{1}} | mode{all};
EXPECT_EQ(uniquify(search("ACGT"_dna4, this->index, cfg)), (hits_result_t{0, 1, 4, 5, 8, 9}));
}

{ // Test with dynamic mode.
mode dynamic_mode{};
Copy link
Member

Choose a reason for hiding this comment

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

If I remember correctly, in tests we now have to specify seqan3:: namespace before all types and functions of seqan3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, but I won't have this refactoring done for this PR, since it is about a feature. The other thing must be done separately.

include/seqan3/search/configuration/mode.hpp Outdated Show resolved Hide resolved
@rrahn rrahn force-pushed the feature/search_dynamic_mode_config branch from e3e776f to 5dd977b Compare January 8, 2020 08:55
@rrahn
Copy link
Contributor Author

rrahn commented Jan 8, 2020

@joergi-w I had to make a force push after I rebased onto master. So I also incorporated the changes already into the respective commits. I am sorry if this causes some inconvenience.

@rrahn rrahn requested a review from joergi-w January 8, 2020 08:56
Copy link
Member

@joergi-w joergi-w left a comment

Choose a reason for hiding this comment

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

Thanks for applying the suggestions... One more issue appeared to me:

Copy link
Member

@joergi-w joergi-w left a comment

Choose a reason for hiding this comment

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

Looks like you need to rebase again...

@rrahn rrahn requested a review from smehringer January 9, 2020 09:55
@rrahn rrahn force-pushed the feature/search_dynamic_mode_config branch from 5dd977b to 7072a96 Compare January 9, 2020 09:57
@rrahn
Copy link
Contributor Author

rrahn commented Jan 14, 2020

@smehringer polite ping

@smehringer
Copy link
Member

I did not manage to review this last week and since this is not an urgent issue and we need to redesign the config, doesn't it make more since to refactor first and then apply this change? Otherwise we need to refactor this code again?

@smehringer smehringer removed their request for review January 16, 2020 09:14
@rrahn
Copy link
Contributor Author

rrahn commented Jan 16, 2020

I did not manage to review this last week and since this is not an urgent issue and we need to redesign the config, doesn't it make more since to refactor first and then apply this change? Otherwise we need to refactor this code again?

Since it is not clear when we are going to refactor it, this should be already added. The other point is that the mechanics will be the same, just different class names are used. So I don't see that this can't be incrementally adapted later?

@smehringer
Copy link
Member

I thought we decided to postpone this altogether?

@rrahn
Copy link
Contributor Author

rrahn commented Jan 16, 2020

I thought we decided to postpone this altogether?

I think this is a very independent PR. The search result range should wait until after the release because it involves more stuff. But anyway, we could also put that in after the release. I don't care. In general, I was trying to make a point why we should not postpone it until we start refactoring the things. I would like to do it first, when we arrive at an actual use case. But that is independent of the mechanics of this PR.

@eseiler eseiler changed the title Feature/search dynamic mode config [FEATURE] Search dynamic mode config Feb 7, 2020
This type can be used to select the runtime configuration for some configuration elements.
Imports the function call operator for the given invocable types.
This can be used for example in combination with the  visitor pattern over a std::variant.
Adds a dynamic state to the mode configuration of the search algorithm.
This mode can be modified at runtime through assignment of an associated mode option.
Enables the dynamic mode configuration within the search algorithm by transforming it
into a static configuration.
@rrahn rrahn force-pushed the feature/search_dynamic_mode_config branch from 7072a96 to 9f83164 Compare March 17, 2020 15:14
@rrahn
Copy link
Contributor Author

rrahn commented Apr 30, 2020

Will be tackled as part of the next iteration with the refined configuration naming.

@rrahn rrahn closed this Apr 30, 2020
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.

Make mode() a runtime decision
3 participants