-
Notifications
You must be signed in to change notification settings - Fork 33
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
Changing keepDate to allow multiple dates, would close #108 #161
Conversation
Hmm, the code coverage is slightly lower, but so far as I can tell, that line was never covered before. Maybe just because it is longer now? |
Codecov Report
@@ Coverage Diff @@
## master #161 +/- ##
=======================================
Coverage 67.95% 67.95%
=======================================
Files 38 38
Lines 774 774
Branches 143 142 -1
=======================================
Hits 526 526
Misses 199 199
Partials 49 49
Continue to review full report at Codecov.
|
Yes. If you add content to an uncovered line, it will decrease overall coverage. |
@@ -45,12 +45,12 @@ class ArcTest extends FunSuite with BeforeAndAfter { | |||
|
|||
test("filter date") { | |||
val four = RecordLoader.loadArchives(arcPath, sc, keepValidPages = false) | |||
.keepDate("200804", DateComponent.YYYYMM) | |||
.keepDate(List("200804"), DateComponent.YYYYMM) |
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.
In your example you use two dates, you should use two dates here as well.
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.
Added in latest commit, thanks for the review!
GitHub issue(s):
If you are responding to an issue, please mention their numbers below.
What does this Pull Request do?
This Pull Request changes the use of
keepDate
. Right now, it is used like:If a user wanted data from 2008 and 2010, they would have to run two separate scripts - one for 2008 and one for 2010.
This new format allows the use of a list in
keepDate
, so a command like:How should this be tested?
I have tested this on a collection of WARCs with files from 2007 and from 2010. Running:
Resulted in all the records from 2007 and 2010. You can also still test only one year, but it still needs to be provided as a list.
Additional Notes:
If approved, this will require revision to all
keepDate
documentation.Interested parties
@ruebot @greebie @lintool