-
Notifications
You must be signed in to change notification settings - Fork 23
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
Do not drop .pdf urls #704
Conversation
Includes &uid= on end
We should include a test case here with an unambiguously necessary URL, so that this does not get removed in future. (I'm still keen to see an example that cannot simply be reached through the DOI link.) |
Codecov Report
@@ Coverage Diff @@
## master #704 +/- ##
============================================
- Coverage 69.79% 68.37% -1.43%
- Complexity 1624 1672 +48
============================================
Files 12 12
Lines 3364 3377 +13
============================================
- Hits 2348 2309 -39
- Misses 1016 1068 +52
Continue to review full report at Codecov.
|
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.
Do we need to use preg_match here? Would we be better using a stripos and a constant in a suitable file?
I probably should use real urls |
I made up the urls since I have yet to find a journal PDF url that ends in .pdf. Thus, the second test does not occur. The real url must: have the doi, end in .pdf, and be from a publisher. |
Todo: better URLs |
Could it be that a .pdf ending is enough to signify that a link is not from a publisher, after all? |
I have improved the user output. I agree that the publisher list is overkill, but we do know that publishers do have pdf files |
@ms609 I think this is ready to go. |
I still think that without real URLs to use as tests, there's no proven value behind this additional code complexity. |
complexity removed @ms609 |
Against this assertion, here's a real life publisher link ending in .pdf (but not containing a doi...) http://jcs.biologists.org/content/joces/s3-100/49/89.full.pdf |
I guess we just accept this pull as it is, and wait for an example of a URL that:
|
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.
Do we need to use process_citation
in the tests, or will prepare_citation
do the trick?
Does the free-floating URL duplicate an existing test? Can we in fact do without the first of the three tests, whcih duplicates the second?
prepare_citation() did the trick |
Includes &uid= on end
Fixes deleting open acces copies