chrisjsewell / aiida-vcode-ext

A VSCode Extension for visualising AiiDA repositories
https://marketplace.visualstudio.com/items?itemName=chrisjsewell.aiida-explore-vscode
MIT License
3 stars 0 forks source link

c.name does not exist #13

Open giovannipizzi opened 3 years ago

giovannipizzi commented 3 years ago

I setup the AiiDA explorer (cool!) and got this error when trying to see the codes, after setting up both aiida.database and aiida.database (I think correctly - I see groups and processes). I get the message every time I 'Refresh all':

Screenshot 2021-07-08 at 21 54 53

My guess: the extension (at least the version that was installed automatically in my VSCode?) has been implemented before recent changes in the AiiDA DB, where name was renamed to label (for computer, if I have to guess)?

This actually points to the fact that maybe it would be better to go via the python or REST API, rather than directly to the DB? (I know it's maybe slower, maybe there is some compromise here)

chrisjsewell commented 3 years ago

Cheers for the feedback! Yep that's definitely the case

This actually points to the fact that maybe it would be better to go via the python or REST API, rather than directly to the DB?

Oh absolutely, that was the thinking. Although yes, the compromise would be speed, plus also the fact you always would have the additional step of starting the REST API running to use it.

chrisjsewell commented 3 years ago

should probably allow for a configuration of what version of aiida-core is being used, to allow for either multiple code paths, or at least a warning about the version maybe not being supported

giovannipizzi commented 3 years ago

you always would have the additional step of starting the REST API running to use it.

Maybe VSCode could take care of doing it? I'm sure that when it runs Jupyter notebooks, it does the same.

chrisjsewell commented 3 years ago

Maybe VSCode could take care of doing it? I'm sure that when it runs Jupyter notebooks, it does the same.

yeh so generally it is easier to be running everything in TypeScript (since thats what VS Code itself is written in), but indeed the python extension does have these nice ways of interfacing with Python (setting the environment etc), so it would be nice to "piggyback" on that.

When I was messing around with https://github.com/chrisjsewell/rst-language-server (which runs a python package as an LSP, very similar to a REST API) I recall having a brief look at this, but did not see an obvious way, but hopefully this has changed