-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
DOI determining now uses "DOI.findInText" (and not "DOI.parse") #8227
Conversation
Waiting for @jiezheng5 to include their test cases from #8215 to here. |
@koppor, @Siedlerchr, I found a case where this method failed in Line 120 in DOITest.java. For the DOI, https : / / doi.org / 10 / gf4gqc , what I got with @koppor's proposed change is the following: In contrast, the proposed change in the PR #8228 did not have the issue |
I would like to add the Parameterized Test Cases here. However, since that this PR(#8127) is not merged nor sent by me, I don't know how I can modify it locally. thanks very much for your time. |
@jiezheng5 If jabRef/jabref is configured as upstream then: (git remote -v)
|
@@ -21,7 +21,7 @@ public CompositeIdFetcher(ImportFormatPreferences importFormatPreferences) { | |||
} | |||
|
|||
public Optional<BibEntry> performSearchById(String identifier) throws FetcherException { | |||
Optional<DOI> doi = DOI.parse(identifier); | |||
Optional<DOI> doi = DOI.findInText(identifier); |
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.
Semantically, you would want to parse the identifier here and not find it in some bigger text. Thus, if you think "findInText" is better, then please change the implementation of "parse". This makes it also more coherent with the other id fetchers below that use "parse" as well (and the idea was to extract this to a common interface at some point).
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.
I am working on the parser in the PR #8228
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.
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.
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.
I use single regexp to parse the DOI in and added several test cases in DOITest PR #8228. Also address the request by @koppor for informing the user that "no DOI data exists" rather than "invalid DOI" when the fetcher fails to download from a valid DOI (#8217).
i think you meant to reference #8127, not 8217. I just got confused when i followed the link in 8217 to this thread. This one here deals with an entirely different topic.
Thanks very much for the response. I encountered the following error following the instructions. sincerely, |
Fully agree with @tobiasdiez - following up at #8228. |
@jiezheng5 Regarding your git issue, it seems that your configuration of You should execute
However, check before
to check which repositories you have configured |
thanks very much, it worked now. |
This addresses #8127 by using the
findInText
functionality of theDOI
parsing functionaltiy. Thereby, my copy&paste issue is gone.CHANGELOG.md
described in a way that is understandable for the average user (if applicable)