Skip to content

Commit 4e378c1

Browse files
committed
Added kgwizard script
1 parent e4a5ebd commit 4e378c1

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ dataraider = [
3030
"requests", "opencv-python", "numpy", "regex",
3131
"pubchempy", "openai", "huggingface_hub"
3232
]
33-
kgwizard = ["gremlin", "openai"]
33+
kgwizard = ["gremlinpython", "openai"]
3434
full = ["visualheist", "dataraider", "kgwizard"]
3535

3636
[project.scripts]
3737
dataraider = "scripts.run_dataraider:main"
3838
visualheist = "scripts.run_visualheist:main"
3939
mermaid = "scripts.run_mermaid:main"
40+
kgwizard = "src.kgwizard.__main__:main"
4041

4142
[tool.setuptools]
4243
# Tell setuptools to look in BOTH src/ and the current directory (where "scripts" is).

src/kgwizard/__main__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
from typing import Any, Callable, NewType, Sequence, TypeAlias, TypeVar
2424

2525
import numpy as np
26-
from graphdb import janus
26+
from .graphdb import janus
2727
from gremlin_python.structure.graph import GraphTraversalSource
28-
from prompt import build_prompt, build_prompt_from_react_file, get_response
28+
from .prompt import build_prompt, build_prompt_from_react_file, get_response
2929

3030
# This is the only way I've found to execute the transformation using multiprocessing
3131
global schema
@@ -867,12 +867,15 @@ def exec_transform(
867867
, start=args.dynamic_start
868868
)
869869

870-
871-
if __name__ == "__main__":
870+
def main() -> None:
872871
parser = build_main_argparser()
873872
args = parser.parse_args()
874873
match args.command:
875874
case Commands.PARSE:
876875
exec_parser(args)
877876
case Commands.TRANSFORM:
878877
exec_transform(args)
878+
879+
880+
if __name__ == "__main__":
881+
main()

0 commit comments

Comments
 (0)