Skip to content

Commit d1607ce

Browse files
committed
chore: Set up project packaging and CLI infrastructure
- Add setup.py for package configuration and dependency management - Create CLI with Streamlit run command
1 parent f758a0f commit d1607ce

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.env
22
__pycache__/
3+
build/
4+
autosql.egg-info/

cli/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import click
2+
import subprocess
3+
4+
5+
@click.group()
6+
@click.version_option(version="2.4.2")
7+
@click.pass_context
8+
def cli(ctx):
9+
pass
10+
11+
12+
@click.command()
13+
@click.option("--run-streamlit", is_flag=True, help="Run the Streamlit app.")
14+
@click.option("-p", "--port", type=int, default=8501, help="Streamlit port")
15+
def run_streamlit(run_streamlit, port):
16+
"""Run the Streamlit app."""
17+
subprocess.run(
18+
["streamlit", "run", "interface/streamlit_app.py", "--server.port", str(port)]
19+
)
20+
21+
22+
cli.add_command(run_streamlit)

data_utils/__init__.py

Whitespace-only changes.
File renamed without changes.

llm_utils/__init__.py

Whitespace-only changes.

setup.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# setup.py
2+
from setuptools import setup, find_packages
3+
4+
setup(
5+
name="autosql", # 패키지 이름
6+
version="0.1.0", # 버전
7+
description="AutoSQL - Query Generator for Data Warehouse",
8+
author="ehddnr301",
9+
packages=find_packages(), # my_package를 자동으로 찾음
10+
install_requires=[
11+
"langgraph==0.2.62",
12+
"datahub==0.999.1",
13+
"langchain==0.3.14",
14+
"langchain-community==0.3.14",
15+
"openai==1.59.8",
16+
"langchain-openai==0.3.0",
17+
],
18+
entry_points={
19+
"console_scripts": [
20+
# "my-project" 명령어로 my_package.main 모듈의 run 함수를 실행
21+
"autosql = cli.__init__:cli"
22+
]
23+
},
24+
)

0 commit comments

Comments
 (0)