-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Drop wrappers from Internal Server #536
Conversation
3183026
to
90e701a
Compare
@maneeshpm Thx for this important PR! |
bddd141
to
b24f46c
Compare
b24f46c
to
7c572ec
Compare
@maneeshpm @mgautierfr This PR ahould be rebased ans reviwed again, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is far better.
Still some code to change but nothing fundamental or complex to change.
7c572ec
to
9eb9517
Compare
Codecov Report
@@ Coverage Diff @@
## master #536 +/- ##
==========================================
- Coverage 65.26% 64.91% -0.36%
==========================================
Files 52 53 +1
Lines 3648 3737 +89
Branches 1840 1884 +44
==========================================
+ Hits 2381 2426 +45
- Misses 1265 1309 +44
Partials 2 2
Continue to review full report at Codecov.
|
@kelson42 Rebase done. @mgautierfr The last three commits are the new changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small change to correctly handle path=="/"
and we should be good.
982adde
to
c31c5ed
Compare
@mgautierfr Can you please review and have a look why the ci fails, this is since las week like this. |
@kelson42 I reran the jobs, now the ci is passing. There is only the coverage issue, which we can expect since we have removed the usage of readers and searchers from internal server. |
@maneeshpm Nice, then you probably just need to write one or two additional tests and we are good |
c31c5ed
to
435c6ad
Compare
I have rebased on master |
@kelson42 I have added the tests and ci is passing now 😄 . |
49d6def
to
c469a7f
Compare
These members will mirror the functionality offered by equivalent usage of Reader class.
This is essentially a code move of meta handlers from using Reader functions to directly using Archive.
Introduces a new member mp_search that houses the zim::Search object, adds a new constructor for this purpose. This commit also add an overload for getHtml that takes start and end integers as arguments since they are not part of the search object we include.
Since we now have SearcherRenderer that can work with native libzim structure, we will drop the wrapper and use them instead.
Removing the functions in InternalServer that are no longer needed.
Even though we will be removing the wrappers soon, the test coverage should be complete and we could simply remove these files later.
c469a7f
to
6f63914
Compare
@maneeshpm Do you want to adapt the test now the libzim pr is merged ? (once the nightly is passed) |
@mgautierfr I expect the following PR to be a small one(and that depended on the libzim pr). So we can go ahead with merging this one :D |
This is the first step, fixes #430
The aim of this step is to internally remove usage of wrapper structures in libkiwix as much as possible. A majority of work in this step will be focused around bringing this change in the internal server which will in turn add new methods/change existing code to use libzim structures such as
zim::Archive
,zim::Searcher
,zim::SearchResultSet
etc directly instead of adding additional layer ofkiwix::Reader
orkiwix::Searcher
.Changes included in this PR:
InternalServer
completelyLibrary
and other kiwix structuresSearchRenderer
to use libzim structures directlyarchiveTools