Skip to content

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

@Daniel-Mietchen

Description

@Daniel-Mietchen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SPARQLthe way Scholia queries Wikidatadocumentationhopefully helpful explanations of how things workenhancementsome suggestions to improve Scholia

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions