Skip to content

Commit

Permalink
remove object store
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Dec 5, 2023
1 parent cc9dab0 commit 9b8bf9f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions pyscal_rdf/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,7 @@ def __init__(self, graph_file=None,
raise ValueError("store file is needed if store is not memory")
self.graph = Graph(store="SQLAlchemy", identifier=identifier)
uri = Literal(f"sqlite:///{store_file}")
self.graph.open(uri, create=True)

elif inspect.isclass(type(store)):
try:
prpath = store.path
dbfile = os.path.join(prpath, 'project.db')

#now start sqlalchemy instance
self.graph = Graph(store="SQLAlchemy", identifier=identifier)
uri = Literal(f"sqlite:///{dbfile}")
self.graph.open(uri, create=True)

#here modify structure store if needed
if self.structure_store is None:
self.structure_store = os.path.join(prpath, 'pyscal_rdf_structure_store')
store = 'pyiron_project'
except:
raise ValueError("store should be pyiron_project, SQLAlchemy, or Memory")

self.graph.open(uri, create=True)
else:
raise ValueError("store should be pyiron_project, SQLAlchemy, or Memory")

Expand Down

0 comments on commit 9b8bf9f

Please sign in to comment.