Skip to content

Commit

Permalink
feat(main): add cli and entry point to package (#16)
Browse files Browse the repository at this point in the history
Using __main__ file for cli
  • Loading branch information
RodrigoGonzalez authored Aug 21, 2023
1 parent d88e2f2 commit 9eca289
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
29 changes: 25 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ classifiers = [
"Typing :: Typed",
]

packages = [
{ include = "shap_app", from = "src" }
]


[tool.poetry.scripts]
shap-app = 'shap_app.__main__:main'


[tool.poetry.dependencies]
python = ">=3.10,<3.12"
streamlit = "^1.25.0"
Expand Down Expand Up @@ -58,6 +67,7 @@ seaborn = "^0.12.2"
strictyaml = "^1.7.3"
cmake = "^3.27.2"
matplotlib = "^3.7.2"
typer = "^0.9.0"


[tool.poetry.group.dev.dependencies]
Expand Down
12 changes: 12 additions & 0 deletions src/shap_app/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os

import typer


def main():
typer.echo("Starting Streamlit SHAP App...")
os.system("streamlit run src/shap_app/app.py")


if __name__ == "__main__":
typer.run(main)

0 comments on commit 9eca289

Please sign in to comment.