In [ ]:
Copied!
from biokb_taxtree import DbManager, TurtleCreator, Neo4jImporter
from sqlalchemy import create_engine
import os
from biokb_taxtree import DbManager, TurtleCreator, Neo4jImporter
from sqlalchemy import create_engine
import os
In [ ]:
Copied!
# to make sure no environment variable is set
os.environ.pop("CONNECTION_STR", None)
os.environ.pop("NEO4J_USER", None)
os.environ.pop("NEO4J_PASSWORD", None)
os.environ.pop("NEO4J_URI", None)
pass
# to make sure no environment variable is set
os.environ.pop("CONNECTION_STR", None)
os.environ.pop("NEO4J_USER", None)
os.environ.pop("NEO4J_PASSWORD", None)
os.environ.pop("NEO4J_URI", None)
pass
Workflow with podman-compose¶
In production you should copy .env_template to .env and change passwords! For testing we are using .env_template.
podman-compose -f docker-compose.yml --env-file .env_template up -d
Tip: Before running the following command, please close all other applications that might use significant system resources, as running containers can be resource-intensive.
In [ ]:
Copied!
engine = create_engine("mysql+pymysql://biokb_user:biokb_password@localhost:3306/biokb")
DbManager(engine).import_data()
# you can start from a specific list of tax_id like this: 3193(Embryophyta) and 40674 (Mammalia)
TurtleCreator(engine).create_ttls(start_from_tax_ids=[3193, 40674])
engine = create_engine("mysql+pymysql://biokb_user:biokb_password@localhost:3306/biokb")
DbManager(engine).import_data()
# you can start from a specific list of tax_id like this: 3193(Embryophyta) and 40674 (Mammalia)
TurtleCreator(engine).create_ttls(start_from_tax_ids=[3193, 40674])
Open Neo4j browser, login with neo4j/neo4j_password
In [ ]:
Copied!
Neo4jImporter().import_ttls()
Neo4jImporter().import_ttls()