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] Serialise index cursor #2048

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

eseiler
Copy link
Member

@eseiler eseiler commented Aug 18, 2020

Resolves #2044

@eseiler eseiler requested review from a team and marehr and removed request for a team August 18, 2020 11:09
@marehr marehr requested review from a team and smehringer and removed request for a team August 18, 2020 12:19
@marehr
Copy link
Member

marehr commented Aug 18, 2020

Header test failed:

In file included from /home/travis/build/seqan/seqan3-build/seqan3_header_test_files/seqan3/search/fm_index/detail/fm_index_cursor-1.cpp:2:0:

/home/travis/build/seqan/seqan3/include/seqan3/search/fm_index/detail/fm_index_cursor.hpp:72:15: error: ‘cereal_archive’ has not been declared
     template <cereal_archive archive_t>
               ^~~~~~~~~~~~~~
/home/travis/build/seqan/seqan3/include/seqan3/search/fm_index/detail/fm_index_cursor.hpp:73:41: error: ‘archive_t’ has not been declared
     void CEREAL_SERIALIZE_FUNCTION_NAME(archive_t & archive)
                                         ^~~~~~~~~
make[2]: *** [CMakeFiles/seqan3_header_test--seqan3-searc

(An include is missing for seqan3::cereal_archive)

@eseiler eseiler force-pushed the feature/serialise_cursor branch from 96e7e33 to c762759 Compare August 18, 2020 20:07
@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #2048 into master will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2048      +/-   ##
==========================================
- Coverage   97.93%   97.89%   -0.04%     
==========================================
  Files         267      263       -4     
  Lines        9985     9899      -86     
==========================================
- Hits         9779     9691      -88     
- Misses        206      208       +2     
Impacted Files Coverage Δ
...lude/seqan3/search/fm_index/bi_fm_index_cursor.hpp 100.00% <100.00%> (ø)
.../seqan3/search/fm_index/detail/fm_index_cursor.hpp 100.00% <100.00%> (ø)
include/seqan3/search/fm_index/fm_index_cursor.hpp 100.00% <100.00%> (ø)
.../seqan3/alignment/pairwise/alignment_algorithm.hpp 98.50% <0.00%> (-1.50%) ⬇️
include/seqan3/alignment/scoring/gap_scheme.hpp 96.29% <0.00%> (-0.48%) ⬇️
...qan3/alignment/pairwise/edit_distance_unbanded.hpp 99.24% <0.00%> (-0.01%) ⬇️
include/seqan3/core/detail/to_string.hpp 100.00% <0.00%> (ø)
include/seqan3/search/configuration/hit.hpp 100.00% <0.00%> (ø)
test/include/seqan3/test/pretty_printing.hpp 100.00% <0.00%> (ø)
include/seqan3/io/alignment_file/format_bam.hpp 95.49% <0.00%> (ø)
... and 23 more

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 e56b34b...7f46653. Read the comment docs.

Copy link
Member

@smehringer smehringer left a comment

Choose a reason for hiding this comment

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

Minor stuff


/*!\cond DEV
* \brief Serialisation support function.
* \tparam archive_t Type of `archive`; must satisfy seqan3::cereal_archive.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* \tparam archive_t Type of `archive`; must satisfy seqan3::cereal_archive.
* \tparam archive_t Type of `archive`; must model seqan3::cereal_archive.

💅

Copy link
Member Author

Choose a reason for hiding this comment

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

We use satifsy in every serialisation method (~12 times). Can I do this as separated PR?

Copy link
Member

Choose a reason for hiding this comment

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

sure


/*!\cond DEV
* \brief Serialisation support function.
* \tparam archive_t Type of `archive`; must satisfy seqan3::cereal_archive.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* \tparam archive_t Type of `archive`; must satisfy seqan3::cereal_archive.
* \tparam archive_t Type of `archive`; must model seqan3::cereal_archive.


/*!\cond DEV
* \brief Serialisation support function.
* \tparam archive_t Type of `archive`; must satisfy seqan3::cereal_archive.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* \tparam archive_t Type of `archive`; must satisfy seqan3::cereal_archive.
* \tparam archive_t Type of `archive`; must model seqan3::cereal_archive.

*/
template <cereal_archive archive_t>
void CEREAL_SERIALIZE_FUNCTION_NAME(archive_t & archive)
{
Copy link
Member

Choose a reason for hiding this comment

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

Since this function is not visible to the user, we should mention this in the class documentation. I think we might just used \imlements cerealisable or something similar.. Can you check other classes?

Also Can you add a changelog entry, since this seems to be of interest to users :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but then I would also rebase this against the release branch?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this function is not visible to the user, we should mention this in the class documentation. I think we might just used \imlements cerealisable or something similar.. Can you check other classes?

Yes, it would be great to see directly in the documentation which classes can be serialized with cereal, I had to study the code to see that neither cerealisation is possible, nor I can access the members on my own. I guess adding something like \implements cerealisable would be perfectly suitable for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently the documentation is only reflected in the inheritance diagram as far as I can see, https://docs.seqan.de/seqan/3-master-user/interfaceseqan3_1_1cerealisable.html

We should rework this

@eseiler eseiler force-pushed the feature/serialise_cursor branch from c762759 to 8032f8c Compare August 19, 2020 07:46
@eseiler eseiler changed the base branch from master to release-3.0.2 August 19, 2020 07:46
@eseiler eseiler requested a review from smehringer August 19, 2020 07:47
@eseiler
Copy link
Member Author

eseiler commented Aug 19, 2020

I'll squash and push in the hope that travis notices something

@eseiler eseiler force-pushed the feature/serialise_cursor branch from 8032f8c to e5bb2bb Compare August 19, 2020 09:07
@eseiler eseiler changed the base branch from release-3.0.2 to master August 25, 2020 15:07
@eseiler eseiler force-pushed the feature/serialise_cursor branch from e5bb2bb to 7f46653 Compare August 25, 2020 15:07
@eseiler eseiler requested a review from smehringer August 31, 2020 11:32
@smehringer
Copy link
Member

I forgot about it again 🙈 Sorry

@smehringer smehringer merged commit 9babc11 into seqan:master Aug 31, 2020
@eseiler eseiler deleted the feature/serialise_cursor branch November 17, 2020 12:39
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.

FM index cursor (de-)serialization
4 participants