zazuko / vscode-sparql-notebook

Visual Studio Code SPARQL Notebook Extension
https://marketplace.visualstudio.com/items?itemName=Zazuko.sparql-notebook
Other
26 stars 8 forks source link

Include external .sparql files in Notebook #47

Closed saumier closed 1 year ago

saumier commented 1 year ago

I have many SPARQL files that are stored in my Github repo as separate .sparql files.

I would like to use Notebooks to document these SPARQLs without having to make a copy/paste into the Notebook.

If I could add a new cell to display a local .sparql file in my notebook, this would allow me to use the same .sparql file in my code as in the Notebook and stay DRY.

BenjaminHofstetter commented 1 year ago

That is indeed a great idea. Serializing and deserializing the notebook file should not pose any issues. However, I'm uncertain about how to incorporate that functionality directly into the Notebook UI. I will begin my investigations into this matter.

BenjaminHofstetter commented 1 year ago

@saumier it's here https://github.com/zazuko/vscode-sparql-notebook/blob/main/README.md#use-query-files version 0.0.19 has it.

Tell me if it's useful

saumier commented 1 year ago

@BenjaminHofstetter Excellent. I will pay around and give you my feedback. We use a ton of SPARQLs to maintain Artsdata.ca and I am hoping we can use these Notebooks to document and do some training. Thx.

saumier commented 1 year ago

@BenjaminHofstetter Great improvement. I can have my Notebooks and store my SPARQLs in their own files. Since I sometimes load SPARQLs into my ruby code directly from Github it is very helpful to have the SPARQL in a separate file from the Notebook. This helps me stay DRY :-)

My only concern is regarding updating the external SPARQL file and vice versa. If I update the SPARQL inside the Notebook, it also updates the external SPARQL file. This is good. When I commit the changes, both the .sparqlnotebook and the .sparql files are committed. But if I update the external SPARQL file, then open the Notebook, I see that the Notebook's SPARQL is not updated. I can work like this, but if I make changes to the local SPARQL file, I'd like to be able to somehow update the Notebook's linked SPARQL as well.

BenjaminHofstetter commented 1 year ago

@saumier I see your concern. let me see if I can 'monitor' the files for changes.