Closed heralden closed 4 years ago
It's not generated in InterMine server. move ticket to im-table
Hey! Can I take up this issue? Thank you.
@Dhruvi16 Yes, please go ahead! I'll assign the issue to you.
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.
@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).
Hey! I did pull the latest code and run npm run dev
. I think there is an error while doing it.
Should I open an issue and try to solve it?
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.
Do a pull now and the table should load :+1:
I think the issue should be closed.
You're right. Thanks for the reminder!
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 usingim-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
andvar imtables = require('imtables');
tovar 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.