[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 130013: Make PlainTextExtractor match "text/plain" mimetype
From: Matthieu Gallien <matthieu_gallien () yahoo ! fr>
Date: 2017-03-17 7:20:55
Message-ID: 20170317072055.22544.41748 () mimi ! kde ! org
[Download RAW message or body]
--===============7176634281280959620==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
> On mars 15, 2017, 9:55 matin, Matthieu Gallien wrote:
> > Ship It!
>
> Matthieu Gallien wrote:
> KFileMetaData being in use by itself, IMHO Baloo problematics should not block this \
> correction.
> Matthieu Gallien wrote:
> I almost forgot to ask an automatic test for your fix. Please do not ship without \
> it.
> Matthieu Gallien wrote:
> You can see that current tests do not cover the line you are modifying: \
> https://build.kde.org/view/Frameworks%20kf5-qt5/job/kfilemetadata%20master%20kf5-qt5 \
> /PLATFORM=Linux,compiler=gcc/lastCompletedBuild/cobertura/src_extractors/plaintextextractor_cpp/ \
> .
> Igor Poboiko wrote:
> Unfortunately, I've got not that much experience in writing autotests...
>
> I think the proper test that would have revealed that problem would be actually a \
> test for ExtractorCollection::fetchExtractors (just check some more or less obvious \
> mimetypes and see that correct plugins are returned). If you think this is fine, I \
> can see how other tests are done and then add one.
> Matthieu Gallien wrote:
> Thanks for taking care of that bug.
>
> Do not feel scared, there are already tests that may get you started. I am also \
> very happy to help if I can. In the current automatic tests, you will see that \
> there are example files in the samplefiles directory. There is even one called \
> plain_text_file.txt. You can have a look at any of the tests called \
> <something>extractortest.{h|cpp}. They may provide you inspiration.
> Let me know if I can help you.
Thanks for having taken care of automatic test.
I had a more general look at the exitsing tests with plain_text_file.txt. They are \
completely like the other automatic tests like taglib, the extractor is hardcoded. No \
way they would detect the bug you are fixing. If nobody beats me to it, I will try to \
fix that problem soon. As far as I am concerned, please push your fix.
- Matthieu
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130013/#review102851
-----------------------------------------------------------
On mars 16, 2017, 9:33 après-midi, Igor Poboiko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130013/
> -----------------------------------------------------------
>
> (Updated mars 16, 2017, 9:33 après-midi)
>
>
> Review request for KDE Frameworks and Anthony Fieroni.
>
>
> Repository: kfilemetadata
>
>
> Description
> -------
>
> After commit 7c7e985a4678fef5f5d0dd8faa9b9cb42e3844b4 (see \
> https://git.reviewboard.kde.org/r/129720/), PlainTextExtractor no longer matches \
> ANY of the text/ mimetypes. This broke completely Baloo indexing e.g. simple plain \
> text files. Introduced check however allows to provide "text/plain" as supported \
> mimetype for the extractor and hope that everything containing plain text will be \
> inherited from it.
>
> Diffs
> -----
>
> autotests/CMakeLists.txt 5ab742b
> autotests/extractorcollectiontest.cpp PRE-CREATION
> src/externalextractor.cpp 05f0645
> src/extractors/plaintextextractor.cpp 26e1247
>
> Diff: https://git.reviewboard.kde.org/r/130013/diff/
>
>
> Testing
> -------
>
> KFileMetaData compiles.
> Baloo indexes plain text files.
> Everybody is happy.
>
>
> Thanks,
>
> Igor Poboiko
>
>
--===============7176634281280959620==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/130013/">https://git.reviewboard.kde.org/r/130013/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On mars 15th, 2017, 9:55 matin CET, <b>Matthieu \
Gallien</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Ship It!</pre> </blockquote>
<p>On mars 15th, 2017, 9:56 matin CET, <b>Matthieu Gallien</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">KFileMetaData being in use by itself, IMHO Baloo problematics should not \
block this correction.</p></pre> </blockquote>
<p>On mars 15th, 2017, 9:58 matin CET, <b>Matthieu Gallien</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
almost forgot to ask an automatic test for your fix. Please do not ship without \
it.</p></pre> </blockquote>
<p>On mars 15th, 2017, 2:29 après-midi CET, <b>Matthieu Gallien</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You \
can see that current tests do not cover the line you are modifying: \
https://build.kde.org/view/Frameworks%20kf5-qt5/job/kfilemetadata%20master%20kf5-qt5/P \
LATFORM=Linux,compiler=gcc/lastCompletedBuild/cobertura/src_extractors/plaintextextractor_cpp/ \
.</p></pre> </blockquote>
<p>On mars 16th, 2017, 7:53 matin CET, <b>Igor Poboiko</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Unfortunately, I've got not that much experience in writing \
autotests...</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I think the proper test that would have revealed that \
problem would be actually a test for ExtractorCollection::fetchExtractors (just check \
some more or less obvious mimetypes and see that correct plugins are returned). If \
you think this is fine, I can see how other tests are done and then add \
one.</p></pre> </blockquote>
<p>On mars 16th, 2017, 8:42 matin CET, <b>Matthieu Gallien</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Thanks for taking care of that bug.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Do \
not feel scared, there are already tests that may get you started. I am also very \
happy to help if I can. In the current automatic tests, you will see that there are \
example files in the samplefiles directory. There is even one called \
plain_text_file.txt. You can have a look at any of the tests called \
<something>extractortest.{h|cpp}. They may provide you inspiration.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Let me know if I can help you.</p></pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Thanks for having taken care of automatic test. I had a more general look \
at the exitsing tests with plain_text_file.txt. They are completely like the other \
automatic tests like taglib, the extractor is hardcoded. No way they would detect the \
bug you are fixing. If nobody beats me to it, I will try to fix that problem soon.
As far as I am concerned, please push your fix.</p></pre>
<br />
<p>- Matthieu</p>
<br />
<p>On mars 16th, 2017, 9:33 après-midi CET, Igor Poboiko wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for KDE Frameworks and Anthony Fieroni.</div>
<div>By Igor Poboiko.</div>
<p style="color: grey;"><i>Updated mars 16, 2017, 9:33 après-midi</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kfilemetadata
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">After commit 7c7e985a4678fef5f5d0dd8faa9b9cb42e3844b4 \
(see https://git.reviewboard.kde.org/r/129720/), PlainTextExtractor no longer matches \
ANY of the text/ mimetypes. This broke completely Baloo indexing e.g. simple plain \
text files. Introduced check however allows to provide "text/plain" as supported \
mimetype for the extractor and hope that everything containing plain text will be \
inherited from it.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">KFileMetaData compiles. Baloo indexes plain text \
files. Everybody is happy.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/CMakeLists.txt <span style="color: grey">(5ab742b)</span></li>
<li>autotests/extractorcollectiontest.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/externalextractor.cpp <span style="color: grey">(05f0645)</span></li>
<li>src/extractors/plaintextextractor.cpp <span style="color: \
grey">(26e1247)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/130013/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============7176634281280959620==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic