[arch-commits] Commit in python-rdflib/trunk (PKGBUILD update-sparql-tests.patch)

Evangelos Foutras foutrelis at gemini.archlinux.org
Thu Dec 2 15:08:49 UTC 2021


    Date: Thursday, December 2, 2021 @ 15:08:48
  Author: foutrelis
Revision: 430290

Fix two tests

Added:
  python-rdflib/trunk/update-sparql-tests.patch
Modified:
  python-rdflib/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   11 +++++-
 update-sparql-tests.patch |   76 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-02 14:25:55 UTC (rev 430289)
+++ PKGBUILD	2021-12-02 15:08:48 UTC (rev 430290)
@@ -15,9 +15,16 @@
 makedepends=('python-setuptools')
 checkdepends=('python-nose' 'python-six' 'python-html5lib' 'python-requests' 'python-networkx'
               'python-doctest-ignore-unicode')
-source=(rdflib-$pkgver.tar.gz::https://github.com/RDFLib/rdflib/tarball/$pkgver)
-sha512sums=('d879c9312a5e6a69ef2edf7931f5e20f6d5c59ce6feb2397e5aeb09843f3568c284f9175b24ac4d513b720dcea82076776d33bfc4492f5d82a17c644586e7b48')
+source=(rdflib-$pkgver.tar.gz::https://github.com/RDFLib/rdflib/tarball/$pkgver
+        update-sparql-tests.patch)
+sha512sums=('d879c9312a5e6a69ef2edf7931f5e20f6d5c59ce6feb2397e5aeb09843f3568c284f9175b24ac4d513b720dcea82076776d33bfc4492f5d82a17c644586e7b48'
+            'e60e9947b700ce34093a71cb400689f033d58f08a31aecedcca2a0223a6bd04cea645350da196a4b9ddd9727dbc92c840a924313ff2218042d53dd44633c53bc')
 
+prepare() {
+  cd RDFLib-rdflib-*
+  patch -Np1 -i ../update-sparql-tests.patch
+}
+
 build() {
   cd RDFLib-rdflib-*
   python setup.py build

Added: update-sparql-tests.patch
===================================================================
--- update-sparql-tests.patch	                        (rev 0)
+++ update-sparql-tests.patch	2021-12-02 15:08:48 UTC (rev 430290)
@@ -0,0 +1,76 @@
+From 4cc4801e096e7054a0e14fb2cc3465c06385bb6f Mon Sep 17 00:00:00 2001
+From: Natanael Arndt <arndtn at gmail.com>
+Date: Thu, 28 Jan 2021 18:56:27 +0100
+Subject: [PATCH] Update SPARQL tests since the DBpedia was updated
+
+---
+ test/test_sparql_service.py | 28 +++++++++++++++-------------
+ 1 file changed, 15 insertions(+), 13 deletions(-)
+
+diff --git a/test/test_sparql_service.py b/test/test_sparql_service.py
+index ea1af4134..7bfe8e4c0 100644
+--- a/test/test_sparql_service.py
++++ b/test/test_sparql_service.py
+@@ -7,14 +7,14 @@
+ 
+ def test_service():
+     g = Graph()
+-    q = '''select ?dbpHypernym ?dbpComment
++    q = '''select ?sameAs ?dbpComment
+     where
+     { service <http://DBpedia.org/sparql>
+     { select ?dbpHypernym ?dbpComment
+     where
+     {
+     <http://dbpedia.org/resource/John_Lilburne>
+-        <http://purl.org/linguistics/gold/hypernym> ?dbpHypernym ;
++        <http://www.w3.org/2002/07/owl#sameAs> ?sameAs ;
+         <http://www.w3.org/2000/01/rdf-schema#comment> ?dbpComment .
+ 
+     } }  } limit 2'''
+@@ -27,17 +29,17 @@ def test_service():
+ 
+ def test_service_with_bind():
+     g = Graph()
+-    q = '''select ?dbpHypernym ?dbpComment ?dbpDeathPlace
++    q = '''select ?sameAs ?dbpComment ?subject
+     where
+-    { bind (<http://dbpedia.org/resource/Eltham> as ?dbpDeathPlace)
++    { bind (<http://dbpedia.org/resource/Category:1614_births> as ?subject)
+       service <http://DBpedia.org/sparql>
+-    { select ?dbpHypernym ?dbpComment ?dbpDeathPlace
++    { select ?sameAs ?dbpComment ?subject
+     where
+     {
+     <http://dbpedia.org/resource/John_Lilburne>
+-        <http://purl.org/linguistics/gold/hypernym> ?dbpHypernym ;
++        <http://www.w3.org/2002/07/owl#sameAs> ?sameAs ;
+         <http://www.w3.org/2000/01/rdf-schema#comment> ?dbpComment ;
+-        <http://dbpedia.org/ontology/deathPlace> ?dbpDeathPlace .
++        <http://purl.org/dc/terms/subject> ?subject .
+ 
+     } }  } limit 2'''
+     results = helper.query_with_retry(g, q)
+@@ -49,17 +51,17 @@ def test_service_with_bind():
+ 
+ def test_service_with_values():
+     g = Graph()
+-    q = '''select ?dbpHypernym ?dbpComment ?dbpDeathPlace
++    q = '''select ?sameAs ?dbpComment ?subject
+     where
+-    { values (?dbpHypernym ?dbpDeathPlace) {(<http://dbpedia.org/resource/Leveller> <http://dbpedia.org/resource/London>) (<http://dbpedia.org/resource/Leveller> <http://dbpedia.org/resource/Eltham>)}
++    { values (?sameAs ?subject) {(<http://de.dbpedia.org/resource/John_Lilburne> <http://dbpedia.org/resource/Category:1614_births>) (<https://global.dbpedia.org/id/4t6Fk> <http://dbpedia.org/resource/Category:Levellers>)}
+       service <http://DBpedia.org/sparql>
+-    { select ?dbpHypernym ?dbpComment ?dbpDeathPlace
++    { select ?sameAs ?dbpComment ?subject
+     where
+     {
+     <http://dbpedia.org/resource/John_Lilburne>
+-        <http://purl.org/linguistics/gold/hypernym> ?dbpHypernym ;
++        <http://www.w3.org/2002/07/owl#sameAs> ?sameAs ;
+         <http://www.w3.org/2000/01/rdf-schema#comment> ?dbpComment ;
+-        <http://dbpedia.org/ontology/deathPlace> ?dbpDeathPlace .
++        <http://purl.org/dc/terms/subject> ?subject .
+ 
+     } }  } limit 2'''
+     results = helper.query_with_retry(g, q)



More information about the arch-commits mailing list