Skip to content

Commit

Permalink
add checks for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Apr 9, 2024
1 parent 2d65662 commit a8babbb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pyscal_rdf/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,15 @@ def __init__(self, graph_file=None,
try:
import rdflib_sqlalchemy as rsa
except ImportError:
raise RuntimeError('Please install the rdllib-sqlalchemy package')

raise RuntimeError('Please install the rdllib-sqlalchemy package. The development version is needed, please do pip install git+https://github.com/RDFLib/rdflib-sqlalchemy.git@develop')

if store_file is None:
raise ValueError("store file is needed if store is not memory")
try:
self.graph = Graph(store="SQLAlchemy", identifier=identifier)
except plugin.PluginException:
raise

uri = Literal(f"sqlite:///{store_file}")
self.graph.open(uri, create=True)
else:
raise ValueError("store should be pyiron_project, SQLAlchemy, or Memory")
raise ValueError("Memory or SQLAlchemy")

#start the storage
self.structure_store = _setup_structure_store(self.structure_store)
Expand Down

0 comments on commit a8babbb

Please sign in to comment.