1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-23 18:12:20 +00:00

Version 1.0.2

Update RDFlib to 6.1.1 (removed rdflib-jsonld, as it is deprecated)
Bumped minimum python version: 3.7 (as a result of RDFLIB 6)
Added ProxyFix to run behind nginx (Added --no-proxy to run without the fix)
Replaced http media links to protocol-agnostic links in playground
Enable CORS (via --enable-cors)
Update old urls (replaced *.cluster.gsi.dit.upm.es with *.gsi.upm.es)
This commit is contained in:
J. Fernando Sánchez
2022-05-20 12:51:01 +02:00
parent c5a2cf23cb
commit a0abbede49
24 changed files with 116 additions and 93 deletions

View File

@@ -292,7 +292,7 @@ class BlueprintsTest(TestCase):
assert "@context" in js
assert check_dict(
js["@context"],
{"marl": "http://www.gsi.dit.upm.es/ontologies/marl/ns#"})
{"marl": "http://www.gsi.upm.es/ontologies/marl/ns#"})
def test_schema(self):
resp = self.client.get("/api/schemas/definitions.json")

View File

@@ -69,8 +69,9 @@ class ExtensionsTest(TestCase):
def test_adding_folder(self):
""" It should be possible for senpy to look for plugins in more folders. """
app = Flask('test_adding_folder')
senpy = Senpy(plugin_folder=None,
app=self.app,
app=app,
default_plugins=False)
assert not senpy.analysis_plugins()
senpy.add_folder(self.examples_dir)
@@ -141,8 +142,9 @@ class ExtensionsTest(TestCase):
def test_analyse_empty(self):
""" Trying to analyse when no plugins are installed should raise an error."""
app = Flask('test_adding_folder')
senpy = Senpy(plugin_folder=None,
app=self.app,
app=app,
default_plugins=False)
self.assertRaises(Error, senpy.analyse, Results(), [])

View File

@@ -75,9 +75,9 @@ class SemanticsTest(TestCase):
assert g
qres = g.query("""
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#>
PREFIX marl: <http://www.gsi.upm.es/ontologies/marl/ns#>
PREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#>
PREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#>
PREFIX onyx: <http://www.gsi.upm.es/ontologies/onyx/ns#>
PREFIX senpy: <http://www.gsi.upm.es/onto/senpy/ns#>
SELECT DISTINCT ?entry ?text ?sentiment
@@ -109,9 +109,9 @@ class SemanticsTest(TestCase):
g = parse_resp(resp, 'ttl')
qres = g.query("""
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#>
PREFIX marl: <http://www.gsi.upm.es/ontologies/marl/ns#>
PREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#>
PREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#>
PREFIX onyx: <http://www.gsi.upm.es/ontologies/onyx/ns#>
PREFIX senpy: <http://www.gsi.upm.es/onto/senpy/ns#>
SELECT DISTINCT ?entry ?text ?sentiment