intermine / im-tables

Dynamic Result Table Library
Other
9 stars 27 forks source link

Rename imtables package to im-tables in JavaScript generator #210

Closed heralden closed 4 years ago

heralden commented 4 years ago

When using Generated JavaScript Code for Query from im-tables running in InterMine, it produces a snippet that mentions the imtables npm package. We don't have access to this package, and are using im-tables instead (see https://www.npmjs.com/package/im-tables).

Please change /* Install from npm: npm install imtables to /* Install from npm: npm install im-tables and var imtables = require('imtables'); to var imtables = require('im-tables');. Note that only the usage of imtables in comments or strings is changed; we still wish to use it without a dash as a variable name since JS doesn't allow dashes there.

danielabutano commented 4 years ago

It's not generated in InterMine server. move ticket to im-table

Dhruvi16 commented 4 years ago

Hey! Can I take up this issue? Thank you.

heralden commented 4 years ago

@Dhruvi16 Yes, please go ahead! I'll assign the issue to you.

Dhruvi16 commented 4 years ago

Hey! After a bit of research I am not able to figure out how to reproduce the issue. Could you please help me with that? Thank you Dhruvi.

heralden commented 4 years ago

@Dhruvi16 Sure. The description may be confusing since I wrote it for a different repository, and it seems like the code is in this one instead.

I pushed a commit to show the top menu bar. After pulling the dev branch, run npm run dev and open http://localhost:9000 once it's done building. Towards the top right, click the Generate Python code button, then in the Python dropdown to the left in the modal, select JavaScript. Make sure you check Show comments to see the full example. This is the code you need to change, according to the issue description.

You should be able to find the template that creates that code in this repo, just do a grep in all the folders.

Note that the tests might fail when you update the code, (as they require a local testmine to be running) but just ignore this and re-run npm run dev. (This is being fixed in a different PR).

Dhruvi16 commented 4 years ago

Hey! I did pull the latest code and run npm run dev. I think there is an error while doing it. image

Should I open an issue and try to solve it?

heralden commented 4 years ago

Sorry about that. The im-tables example queries https://www.flymine.org which went down today. Please give it a try in a few moments.

Update: It's up now, but CORS isn't configured yet. I'll update again when it is.

heralden commented 4 years ago

Do a pull now and the table should load :+1:

Dhruvi16 commented 4 years ago

I think the issue should be closed.

heralden commented 4 years ago

You're right. Thanks for the reminder!