Skip to content

Commit 6064b0b

Browse files
committed
added console_script for vectore store creation
1 parent 3bc02c2 commit 6064b0b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

edubotics_core/vectorstore/store_manager.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import os
88
import time
99
import asyncio
10+
import yaml
11+
import argparse
1012

1113

1214
class VectorStoreManager:
@@ -162,10 +164,7 @@ def __len__(self):
162164
return len(self.vector_db)
163165

164166

165-
if __name__ == "__main__":
166-
import yaml
167-
import argparse
168-
167+
def main():
169168
# Add argument parsing for config files
170169
parser = argparse.ArgumentParser(description="Load configuration files.")
171170
parser.add_argument(
@@ -216,3 +215,7 @@ def __len__(self):
216215
print("Loaded database")
217216

218217
print(f"View the logs at {config['log_dir']}/vector_db.log")
218+
219+
220+
if __name__ == "__main__":
221+
main()

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@
2020
license="MIT",
2121
long_description=readme,
2222
long_description_content_type="text/markdown",
23+
entry_points={
24+
"console_scripts": [
25+
"vectorstore_creator=edubotics_core.vectorstore.store_manager:main",
26+
],
27+
},
2328
)

0 commit comments

Comments
 (0)