Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

Gale Databases.js - New logic to access citation metadata #2076

Closed
wants to merge 1 commit into from

Conversation

@ghost
Copy link

ghost commented Dec 2, 2019

No description provided.

@ghost

This comment has been minimized.

Copy link
Author

ghost commented Dec 2, 2019

Please publish update after 12/20/2019 in order to coordinate with Gale releases.

@adam3smith adam3smith self-assigned this Dec 2, 2019
@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 2, 2019

Thanks @jimmiazek . Looks good at first glance, I'll review for details next weekend the latest.

Just to confirm the data is December 20th? I believe I had December 16th from Megan.

@dstillman

This comment has been minimized.

Copy link
Member

dstillman commented Dec 2, 2019

@jimmiazek: Can you revert the .gitignore change? (You can put this in a global ignore file on your system.)

@ghost

This comment has been minimized.

Copy link
Author

ghost commented Dec 2, 2019

@adam3smith - Original release date (12/16) has been moved to (12/20).

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 8, 2019

Thanks! Looks great overall. I have no concerns about the code itself. Except two quick ones that I think are just due to the testing stage of this:

  • The tests will need to get updated once the site is live. do you know already what the hostname will be?

  • Currently you have commented out the metadata JSON block. Please re-enable that

Some remaining issues on import quality:

Let me know if you have any questions about this.

@ghost

This comment has been minimized.

Copy link
Author

ghost commented Dec 11, 2019

@adam3smith - made the code changes that you asked to uncomment the JSON object -- I believe this is what is causing Travis to fail. Production server is gale.com. Applied your suggestion for M2 and SP tags.

For your analysis, regarding the differences for detectWeb and doWeb. This is something that will have to be addressed in the future. The doWeb is using a REST client to retrieve RIS. The detectWeb makes a different call to get different data to render the display.

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 11, 2019

Thanks -- I'll take a look at why linting fails. I'd guess Windows EoL for the JSON header, but either way, I should be able to fix that quickly on my end.

'inRepository': true,
'translatorType': 4,
'browserSupport': 'gcsibv',
'lastUpdated': '2019-10-11 12:00:00'

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

You need to revert these quote changes, which will break the translator. (For historical reasons, this is JSON, not JavaScript.)


var GaleZotero = (function () {

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

There's no need for this encapsulation. Just put the relevant code in detectWeb() and doWeb() and define other top-level helper functions as necessary.


var GaleZotero = (function () {
var DATA_TRANSLATOR = '32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7';

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

This can just go directly in the translator.setTranslator() call below (as in all other translators), with a comment noting that it's RIS.

items[href] = title;
}

function processMulipleEntries(entries) {

This comment has been minimized.

Copy link
@dstillman
var map = {};
for (var item in entries) {
/* istanbul ignore next */
if (entries.hasOwnProperty(item)) {

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

This check isn't necessary — Object.prototype will never be overridden in the contexts where this will run.

function getURLs(selectedItems) {
var urls = [];
for (var url in selectedItems) {
if (selectedItems.hasOwnProperty(url)) {

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

Not necessary

}
]
}
]
]; // eslint-disable-line

This comment has been minimized.

Copy link
@dstillman
note: "<p>Northern Illinois University</p>"
}
],
seeAlso: []

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

Please revert all the quote changes in these test cases. These tests should be generated by Scaffold and shouldn't be reformatted.

/** BEGIN TEST CASES **/
// eslint-disable-next-line no-unused-vars

This comment has been minimized.

Copy link
@dstillman

dstillman Dec 12, 2019

Member

Remove all these eslint-disable lines. You should be using this repo's lint rules, which should handle all of this properly.

@dstillman

This comment has been minimized.

Copy link
Member

dstillman commented Dec 12, 2019

(Re: all of these comments, I'm guessing you were developing this code outside of the Translator Editor, with a different environment and different lint rules. We strongly recommend developing within the editor, and you should check the code with eslint within the repo, which should use the bundled lint rules. Among other things, the rules will ensure it's a valid translator, which this isn't.)

@ghost ghost closed this Dec 23, 2019
@ghost ghost deleted the gale-zotero branch Dec 23, 2019
@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 23, 2019

@jimmiazek a bit confused why you closed this and deleted the branch? What´s the status of the updated site and code?

@dstillman

This comment has been minimized.

Copy link
Member

dstillman commented Dec 25, 2019

It looks like the account was deleted.

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 25, 2019

how very odd & unfortunate...

@zuphilip

This comment has been minimized.

Copy link
Collaborator

zuphilip commented Dec 25, 2019

We can still take the old version of this PR and build on top of that our changes. Give me some minutes to come up with something...

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 25, 2019

Thanks -- we should check that they did, in fact, update their site on the 20th. Otherwise these changes won't work.

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Dec 25, 2019

Update: yes, it looks like all of Gale is update, so this would be nice to get in.

@zuphilip

This comment has been minimized.

Copy link
Collaborator

zuphilip commented Dec 25, 2019

Continued in #2096.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.