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

refactor: remove the dependency on bot_id in the task scheduling process #441

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

xingwanying
Copy link
Contributor

Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 5:57am

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
petercat_utils/rag_helper/task.py 50.00% 1 Missing ⚠️
server/rag/router.py 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
petercat_utils/data_class.py 100.00% <100.00%> (ø)
petercat_utils/rag_helper/git_doc_task.py 24.59% <ø> (ø)
petercat_utils/rag_helper/git_task.py 53.06% <ø> (+1.06%) ⬆️
petercat_utils/rag_helper/retrieval.py 30.30% <ø> (-0.14%) ⬇️
petercat_utils/rag_helper/task.py 48.71% <50.00%> (ø)
server/rag/router.py 37.50% <66.66%> (ø)

... and 1 file with indirect coverage changes

@xingwanying xingwanying merged commit 0f08935 into main Oct 16, 2024
5 checks passed
@xingwanying xingwanying deleted the refactor_task branch October 16, 2024 06:02
Copy link

Walkthrough

This pull request refactors the task scheduling process by removing the dependency on bot_id. The changes involve updating various classes and functions to eliminate the bot_id parameter, making it optional or removing it entirely. This refactor aims to streamline the task handling process and improve flexibility.

Changes

Files Summary
petercat_utils/data_class.py Removed bot_id dependency from RAGGitDocConfig class, making it optional.
petercat_utils/rag_helper/git_doc_task.py, petercat_utils/rag_helper/git_task.py, petercat_utils/rag_helper/retrieval.py, petercat_utils/rag_helper/task.py Removed bot_id parameter from function calls and class initializations.
pyproject.toml Updated version to 0.1.39.
server/rag/router.py Refactored trigger_task function to remove bot_id parameter.

@@ -48,7 +48,6 @@ def add_rag_git_doc_task(config: RAGGitDocConfig, extra=None):
sha=sha,
repo_name=config.repo_name,
node_type=extra["node_type"],
bot_id=config.bot_id,
path=config.file_path,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that removing bot_id does not affect any logic that relies on it. Double-check that all references to bot_id are correctly handled or removed.

@@ -57,7 +57,6 @@
def get_task(
task_type: TaskType,
task_id: str,
bot_id: Optional[str],
) -> GitTask:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify that the removal of bot_id from get_task function does not impact any dependent logic or functionality.

@@ -82,9 +86,9 @@


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that the removal of bot_id from trigger_task function call does not affect any downstream processes that might require it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant