Skip to content

Commit

Permalink
Merge pull request #2 from joyofdata/feature/make-package-callable
Browse files Browse the repository at this point in the history
add cli interface
  • Loading branch information
joyofdata committed May 22, 2021
2 parents 8ecf4fe + ea6e7ef commit 474b960
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions expsys/expsys.py
Expand Up @@ -27,3 +27,10 @@ def interact(qa: Union[QA, str]) -> None:
interact(n)
else:
print(n)


@click.command()
@click.option("--file", help="Json file containing expert system logic.")
def main(file):
qa = load_from_file(file)
interact(qa)
3 changes: 3 additions & 0 deletions setup.py
Expand Up @@ -6,4 +6,7 @@
description="Expert System Shell",
packages=["expsys"],
install_requires=["click>=8.0.0", "pydantic>=1.8.0",],
entry_points={
"console_scripts": ["expsyscli=expsys.expsys:main"]
}
)

0 comments on commit 474b960

Please sign in to comment.