lvaudor / glitter

an R package which writes SPARQL queries
https://lvaudor.github.io/glitter
44 stars 5 forks source link

error when no endpoint provided #101

Closed maelle closed 1 year ago

maelle commented 1 year ago
lvaudor commented 1 year ago

I'm not sure I understand your question. How could the use of a default endpoint be a bad thing? Maybe users forget they have to specify their endpoint because we have so many of our examples using Wikidata?

Besides, the use of "service" in the code is related to Wikidata only (it's what is used to provide labels for instance). Not sure it's completely related (and it probably does not answer your question really) but what I've been wondering is how to print the SPARQL query with no mention of service in the code (in case this query was not intended for Wikidata). Maybe there is already a way to do that, I'm just one step behind on the last choices you had made for spq_assemble(), spq_perform()

maelle commented 1 year ago

Maybe users forget they have to specify their endpoint because we have so many of our examples using Wikidata?

Yes, I've seen exactly this happen.

maelle commented 1 year ago

Regarding service/wikidata, maybe this could move to another package. :thinking:

lvaudor commented 1 year ago

Hmm. Indeed we might develop something more Wikidata-centered (say, "wdf") to help explore wikidata labels/classes/ontologies. Are you suggesting we could have a wdf::spq_perform() sending to Wikidata by default rather than glitter:spq_perform() with that same default? If so, I could see the appeal in terms of programming (with all the considerations about Wikidata service going into the right package) but I guess it would be more complexity for the users (being aware that glitter for Wikidata is a special package called wdf...). I guess for now I'd rather have a more balanced set of examples (with more examples on dbpedia for instance), so that the need to specify endpoint is more obvious. OR we could just state explicitly in the existing examples that the endpoint is Wikidata's.

maelle commented 1 year ago

Things are fine as they are now I think.