Last active
November 14, 2021 09:09
-
-
Save anatoly-scherbakov/e7baee765ca9f22f419a2eb5a89689e8 to your computer and use it in GitHub Desktop.
rdflib-sqlalchemy fails if attempted to find a triple with a Literal subject in the graph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from sys import version as python_version | |
from rdflib import ConjunctiveGraph, Literal, URIRef, OWL, RDFS | |
from rdflib import __version__ as rdflib_version | |
from rdflib import plugin | |
from rdflib.store import Store | |
from rdflib_sqlalchemy import __version__ as rdflib_sqlalchemy_version | |
logger = logging.getLogger(__name__) | |
def test_sqlalchemy_obj_language(): | |
logger.info(f'Python version: {python_version}') | |
logger.info(f'RDFLib version: {rdflib_version}') | |
logger.info(f'RDFLib-SQLAlchemy version: {rdflib_sqlalchemy_version}') | |
identifier = URIRef('local://test_sqlalchemy_obj_language/') | |
store = plugin.get( | |
'SQLAlchemy', | |
Store, | |
)( | |
identifier=identifier, | |
) | |
graph = ConjunctiveGraph( | |
store=store, | |
identifier=identifier, | |
) | |
graph.open('sqlite:///', create=True) | |
triple = ( | |
URIRef('https://foo'), | |
RDFS.comment, | |
Literal('', lang='en'), | |
) | |
is_in_graph = triple in graph |
Author
anatoly-scherbakov
commented
Nov 13, 2021
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment