WDscholia / scholia

Wikidata-based scholarly profiles
https://scholia.toolforge.org
Other
220 stars 78 forks source link

For each SPARQL query, we should identify a sample q for testing purposes #1837

Open Daniel-Mietchen opened 2 years ago

Daniel-Mietchen commented 2 years ago

Is your feature request related to a problem? Please describe.

Some of the SPARQL queries yield no (or no useful) results for most potential values, so testing some features around that is difficult without suitable examples.

Describe the solution you'd like In or near each .sparql file, we could specify some q values for which that SPARQL query yields useful results. Perhaps this could be in the line with the SPARQL title, or a line above or below that. This line could then even be removed by JavaScript when the query is run from Scholia with some specific QID.

Describe alternatives you've considered An alternative would be to specify the example as a docstring in Python or JavaScript, or to have explicit unit tests.

Adafede commented 2 years ago

dropping this here as somehow related

https://github.com/CLARIAH/grlc/tree/dev#defaults