Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert main.py into installable CLI tool pragmatic #39

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pragmatic/main.py → bin/pragmatic
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# !/bin/python3
# addressing the issue where the project structure causes pragmatic to not be on the path
import sys
import os
sys.path.insert(0, os.path.abspath(os.getcwd()))

import argparse

from api import index_path_for_rag, execute_rag_query, evaluate_rag_pipeline
from settings import DEFAULT_SETTINGS
from pragmatic.api import index_path_for_rag, execute_rag_query, evaluate_rag_pipeline
from pragmatic.settings import DEFAULT_SETTINGS


def main():
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/redhat-et/PRAGmatic'
scripts=["bin/pragmatic"],
)