Skip to content

Commit

Permalink
fix: packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
adico1 committed Jun 1, 2024
1 parent c268645 commit d25e1d5
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.md
include LICENSE
include LICENSE
recursive-include src/openai_batch_sdk *.py
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .advanced_batch_processor import init_monitoring
from .event_handler import EventHandler
from .openai_batch_sdk.event_handler import EventHandler
from .notifier import send_notification
from .result_handler import retrieve_batch_results

Expand Down
4 changes: 2 additions & 2 deletions src/advanced_batch_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
retrieve_batch_result,
retrieve_batches_results,
submit_batch_job)
from event_handler import EventHandler
from src.openai_batch_sdk.event_handler import EventHandler
from gpt_conversation_handler import Role, create_message
from jsonl_handler import create_json_line, write_jsonl_file
from utils.env import load_environment
from utils.logging import logger, setup_logging
from utils.project import get_project_root

from .core_batch_processor import (check_batches_results, gen_submit_batch_job,
from .openai_batch_sdk.core import (check_batches_results, gen_submit_batch_job,
init_monitoring,
retrieve_batches_results_handler)

Expand Down
4 changes: 2 additions & 2 deletions src/main_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
import time
from datetime import datetime

from event_handler import EventHandler
from src.openai_batch_sdk.event_handler import EventHandler
from utils.env import load_environment
from utils.logging import logger, setup_logging
from utils.project import get_project_root

from jsonl_handler import create_json_line, write_jsonl_file
from gpt_conversation_handler import Role, create_message

from core_batch_processor import (init_monitoring, retrieve_batches_results_handler, retrieve_batches_results, graceful_shutdown)
from src.openai_batch_sdk.core import (init_monitoring, retrieve_batches_results_handler, retrieve_batches_results, graceful_shutdown)

async def shutdown(signal, loop, executor):
print(f"\nReceived exit signal {signal.name}...")
Expand Down
2 changes: 1 addition & 1 deletion src/main_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from deps.oai.batch_api.batch_api import (check_batch_status,
retrieve_batch_result,
submit_batch_job)
from event_handler import EventHandler
from src.openai_batch_sdk.event_handler import EventHandler
from utils.env import load_environment
from utils.logging import logger, setup_logging
from utils.project import get_project_root
Expand Down
4 changes: 4 additions & 0 deletions src/openai_batch_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .core import init_monitoring, graceful_shutdown, retrieve_batches_results_handler, retrieve_batches_results
from event_handler import EventHandler

__all__ = ["init_monitoring", "EventHandler", "graceful_shutdown", "retrieve_batches_results_handler", "retrieve_batches_results"]
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_batch_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../src')))

from src.advanced_batch_processor import init_monitoring
from src.event_handler import EventHandler
from src.openai_batch_sdk.event_handler import EventHandler


class TestBatchProcessor(unittest.TestCase):
Expand Down

0 comments on commit d25e1d5

Please sign in to comment.