-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Quick import should work if DOI is included #9821
Comments
I would like to work on this, though I'm not certain what form the heuristic should take. Wouldn't it be easier to insert |
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at. Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. |
TL;DR: The code in CompositeIdFetcher does not use @sean-leichtle At first, this might look as the solution. When we introduced the code, we had much discussions. Please check the code also of the other identifiers: And so on. OK, there is lines 89 (EXACT_DOI_PATT) and lines 90 (FIND_DOI_PATT) are not that strict. Nevertheless, being strict is intentional. Thus, the DOI parser is very scrict. There is no relaxed version. You will introduce a first version - embedded "somehwere". However, there is public static Optional findInText(String text) {, which should be used. Thus, to change the functionality, instead of Side note: Exceptions from the rule:
|
Sure, though I may have some questions, especially about testing. |
General hints on UI testing are that a) the ViewModel can be tested, b) if UI tests are really needed (I don't think in these tests), then hints can be read in the changes at #9794. In the concrete case, a test addition to Side note: I also updated the other issue for code and test hints: #7575 (comment) |
@koppor |
@sean-leichtle Thank you for working to refine the issue description. I used today's version from the I see at minute 00:07 "No entry found". Do you use some different button? |
@koppor |
@koppor |
I am on Windows. Interesting cc @Siedlerchr. However, IntelliJ should also work on macOS. There, one can set breakpoints and step through the code and see where code changes are needed. I think, we already discussed, that the change should go into |
A bit more context: inserting a doi-number, such as |
How can you trigger Quick Import without pressing the button for Quick Import. That button is the arrow button - do you refer to some other button? Maybe it would be good if you share a video. Loom was recommended me by Microsoft. As said, working on a fix can happen in parallel. |
Sorry for the delay. Here is a video of the behavior I described: bildschirmaufnahme.mp4 |
Ok, if I enter |
Can you paste the exception here? |
org.jabref.logic.importer.ImportException: Could not find a suitable import format. |
You pasted into the main table? Nice. You can work on that this works for those kinds of strings too |
I'm sorry, I don't mean to be slow on the uptake, but could you clarify? |
@sean-leichtle @koppor This is the buggy behavior of javafx under mac that copy paste is triggered twice when you paste in the text field and the maintable also still gets focus |
@koppor I've lodged a pull request, though I declared the method public (and not, as you requested, package private) for testing purposes. Is there a way to declare the method as package private and still test? I also want to add that my testing experience is preliminary, so I'd appreciate feedback on this point. |
package private is just a method without any modifier. The test class has to be in the same package then you can use it |
https://www.scitepress.org/Link.aspx?doi=10.5220/0010404301780189
Expected result: Entry found
Actual result: No entry found
One can find the entry when searching for
10.5220/0010404301780189
There needs to be implemented a heuristic at the
CompositeIdFetcher
. Before passing the DOI to the DOI parser, a) existence of?doi=
needs to be checked, b) if yes, that part removed. Then passed toDOI.parse
/src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java#L23
Test-enabling: Heuristics as own method. This method needs to be tested. Method can be "package private".
With that being implemented, #7575 can also be fixed (howto at #7575 (comment)).
The text was updated successfully, but these errors were encountered: