Skip to content
Snippets Groups Projects
Commit 0cec64ab authored by Frank Lange's avatar Frank Lange
Browse files

remove dfgfo from loaded ontologies

parent b638dabc
No related branches found
No related tags found
No related merge requests found
Pipeline #1311576 passed
......@@ -51,13 +51,6 @@ RUN \
set -ex && \
echo "33beedfa0b8a51417e22a15dfd237169d98868bde8fb59f29ee447c0ed1d4972 MoDalia.ttl" | sha256sum --status -c
RUN \
set -ex && \
# DFG Fachsystematik Ontology / DFG Classification of Subject Areas Ontology
# see https://github.com/tibonto/DFG-Fachsystematik-Ontology
wget --no-verbose https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/b6e9983bc1eb33aeab034dd27f5f08cff227ff0f/dfgfo.ttl && \
echo "0b168a90bc3fcb10457b2bd98b5969b2fd972725481bcc8aad149dd4f446be74 dfgfo.ttl" | sha256sum --status -c
#
# Copy config templates
#
......
.env
.pytest_cache
__pycache__
.idea
\ No newline at end of file
.idea
......@@ -8,60 +8,6 @@ DATASET_NAME = "ontologies"
class TestOntologiesDataset:
def test_text_search(self, fuseki_url):
endpoint = f"{fuseki_url}/{DATASET_NAME}"
store = SPARQLStore(query_endpoint=endpoint)
result = store.query("""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX text: <http://jena.apache.org/text#>
SELECT ?uri ?score ?label
WHERE {
(?uri ?score) text:query (rdfs:label 'ancient history') .
?uri rdfs:label ?label .
}
ORDER BY DESC(?score)
""")
assert len(result) == 14
assert list(map(lambda item: str(item.label), list(result))) == [
'Ancient History',
'Ancient Cultures',
'History',
'Art History',
'Medieval History',
'Egyptology and Ancient Near Eastern Studies',
'Early Modern History',
'History of Philosophy',
'History of Science',
'Economic and Social History',
'Modern and Current History',
'General Education and History of Education',
'Art History, Music, Theatre and Media Studies',
'Architecture, Building and Construction History, Construction Research, Sustainable Building Technology'
]
result = store.query("""
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX text: <http://jena.apache.org/text#>
SELECT ?uri ?score ?label
WHERE {
(?uri ?score) text:query (skos:altLabel 'Alte Geschichte') .
?uri skos:altLabel ?label .
}
ORDER BY DESC(?score)
""")
assert len(result) == 6
assert list(map(lambda item: str(item.label), list(result))) == [
'Alte Geschichte',
'Alte Kulturen',
'Frühneuzeitliche Geschichte',
'Mittelalterliche Geschichte',
'Geschichte der Philosophie',
'Neuere und Neueste Geschichte (einschl. Europäische Geschichte der Neuzeit und Außereuropäische Geschichte)'
]
@pytest.mark.parametrize("endpoint_name", ["", "query", "sparql", "get"])
def test_dataset_is_not_writeable_with_gsp(self, fuseki_url, endpoint_name):
assert cannot_use_gsp_write(fuseki_url, DATASET_NAME, endpoint_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment