From ba4e071b9cf57aaf5793fefce55e21c8cd1c9749 Mon Sep 17 00:00:00 2001 From: Stefan Bogdan Date: Fri, 26 Mar 2021 16:19:40 +0100 Subject: [PATCH] remove all RDF related files --- .travis.yml | 4 ---- ci/sk8.ttl | 17 ----------------- ci/sk8_pred.ttl | 13 ------------- integration/rdf.py | 47 ---------------------------------------------- 4 files changed, 81 deletions(-) delete mode 100644 ci/sk8.ttl delete mode 100644 ci/sk8_pred.ttl delete mode 100644 integration/rdf.py diff --git a/.travis.yml b/.travis.yml index c5d41d9e5..6d1b4db72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,6 @@ jobs: - /bin/bash ci/start_weaviate.bash script: - python -m integration.client_functions - - python -m integration.rdf - name: "Integration tests on python 3.7" python: "3.7" @@ -58,7 +57,6 @@ jobs: - /bin/bash ci/start_weaviate.bash script: - python -m integration.client_functions - - python -m integration.rdf - name: "Integration tests on python 3.8" python: "3.8" @@ -68,7 +66,6 @@ jobs: - /bin/bash ci/start_weaviate.bash script: - python -m integration.client_functions - - python -m integration.rdf - name: "Integration tests on python 3.9" python: "3.9" @@ -78,4 +75,3 @@ jobs: - /bin/bash ci/start_weaviate.bash script: - python -m integration.client_functions - - python -m integration.rdf diff --git a/ci/sk8.ttl b/ci/sk8.ttl deleted file mode 100644 index a970d9065..000000000 --- a/ci/sk8.ttl +++ /dev/null @@ -1,17 +0,0 @@ -@prefix : . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . - - a owl:Ontology . - -:Board a owl:Class ; - rdfs:label "Wodden skateboard deck"@en . - -:Truck a owl:Class ; - rdfs:label "Metal truck of the board"@en . - -:Bearing a owl:Class ; - rdfs:label "Bearing used for the wheels to spin"@en . - diff --git a/ci/sk8_pred.ttl b/ci/sk8_pred.ttl deleted file mode 100644 index 9cbba484e..000000000 --- a/ci/sk8_pred.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix : . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . - - a owl:Ontology . - -:hasSize a owl:ObjectProperty . - -:hasPrice a owl:ObjectProperty . - -:hasMaterial a owl:ObjectProperty . diff --git a/integration/rdf.py b/integration/rdf.py deleted file mode 100644 index b1724737c..000000000 --- a/integration/rdf.py +++ /dev/null @@ -1,47 +0,0 @@ -import os -import time -import sys -import weaviate.rdf as wrdf -import weaviate -from rdflib import Graph -from integration.integration_util import TestFailedException - -client = weaviate.Client("http://localhost:8080") -t = wrdf.TripleLoader(client) -ci_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../ci") - - -def query(subject): - q = """ - { Get { Subject (where: { - path: ["valueKey"] - operator: Equal - valueString: "%s" - }){ value }}} - """ - qq = (q % subject) - result = client.query.raw(qq) - return result["data"]["Get"]["Subject"] - - -def add_ttl_file(file_name): - g = Graph() - ttl_file = os.path.join(ci_folder, file_name) - g.parse(ttl_file, format="ttl") - t.add_graph(g) - -def test_length(): - add_ttl_file("sk8.ttl") - time.sleep(2.0) - if len(query("https://semi.technology/schema/1.0.0/Skateboard#Board")) != 1: - raise TestFailedException("Wrong number of objects") - if len(query("https://semi.technology/schema/1.0.0/SkateboardPred#hasPrice")) != 0: - raise TestFailedException("Wrong number of objects") - add_ttl_file("sk8_pred.ttl") - time.sleep(2.0) - if len(query("https://semi.technology/schema/1.0.0/SkateboardPred#hasPrice")) != 1: - raise TestFailedException("Wrong number of objects") - return 0 - -if __name__ == "__main__": - test_length()