Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upBug fixes (especially issue with locale identification) and minor improvements #1748
Conversation
pjalet
and others
added some commits
Sep 21, 2018
This comment has been minimized.
This comment has been minimized.
Thanks! The URL fix is definitely fine. For the other issues -- did you run the tests? I would assume they'd cause some updated test data? Also, please remove the change notes in the code -- they make no sense without the previous code. |
adam3smith
added
the
waiting
label
Sep 28, 2018
This comment has been minimized.
This comment has been minimized.
Good point regarding the tests. The changes indeed have an impact on the expected patent number; this is changed in the latest commit. However the tests consistently return an error ("TranslatorTester: ESpacenet Test 1: failed (Detection failed)") in Scaffold but on this code and the original one in zotero:master. |
This comment has been minimized.
This comment has been minimized.
I guess this is because the detection uses |
zuphilip
removed
the
waiting
label
Oct 7, 2018
zuphilip
reviewed
Oct 7, 2018
@@ -187,6 +181,9 @@ function scrape(doc) { | |||
case "Page bookmark": | |||
applyValue(newItem, label, value.firstElementChild.href) | |||
break; | |||
case "Application number:": | |||
applyValue(newItem, label, ZU.xpathText(value,'./node()[following-sibling::a]')); |
This comment has been minimized.
This comment has been minimized.
zuphilip
reviewed
Oct 7, 2018
@@ -187,6 +181,9 @@ function scrape(doc) { | |||
case "Page bookmark": | |||
applyValue(newItem, label, value.firstElementChild.href) | |||
break; | |||
case "Application number:": | |||
applyValue(newItem, label, ZU.xpathText(value,'./node()[following-sibling::a]')); |
This comment has been minimized.
This comment has been minimized.
zuphilip
Oct 7, 2018
Collaborator
There is not always such a "Global Dossier" button, see e.g. https://worldwide.espacenet.com/data/publicationDetails/biblio?locale=en_EP&II=9&FT=D&CC=AU&DB=EPODOC&NR=2814389A&date=19890601&ND=3&KC=A&adjacent=true
This comment has been minimized.
This comment has been minimized.
Okay, I did some small updates and found test cases which seem to work within Scaffold. Looks fine for me now. @adam3smith Can you do the final review? |
zuphilip
assigned
adam3smith and unassigned
adam3smith
Oct 9, 2018
zuphilip
requested a review
from adam3smith
Oct 9, 2018
adam3smith
merged commit 452df57
into
zotero:master
Nov 12, 2018
1 check passed
This comment has been minimized.
This comment has been minimized.
Thanks and sorry for the delay; I missed the review request. |
pjalet commentedSep 21, 2018
Locale identification failed because the URL may end with an # -> fixed with new regex on line 93.
Using secondaryInventors and secondaryApplicants led to duplicates -> fixed by using inventors and applicants instead (l. 156, 165)
Names from inventors and applicants include country code in brackets -> fixed with modified regex on line 129.
Case correction did not work when some names where upper case and some not -> fixde by eliminating test on line 131 and going first to lower case on line 132.
Catching the application number through default case led to inclusion of parasitic text ("global dossier") -> fixed with specific case and XPath on line 190
Current patent number is directly accessible through navigation block on left of the page, so that text cleanup is not necessary -> new assignement on line 204.