Skip to content

Commit

Permalink
Updated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitvinnakota-codecov committed Sep 19, 2024
1 parent 50ea0ac commit 36868a2
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/seer/automation/codegen/unit_test_coding_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,15 @@ def invoke(self, request: CodeUnitTestRequest, codecov_client_params: dict | Non
owner_username=codecov_client_params["owner_username"]
)

# test_result_data = CodecovClient.fetch_test_results_for_commit(
# repo_name=codecov_client_params["repo_name"],
# pullid=codecov_client_params["pullid"],
# owner_username=codecov_client_params["owner_username"]
# )

print(code_coverage_data)


# if request.codecov_client_params:
# code_coverage_data = CodecovClient.fetch_coverage(
# repo_name=request.codecov_client_params.repo_name,
# pullid=request.codecov_client_params.pullid,
# owner_username=request.codecov_client_params.owner_username
# )
test_result_data = CodecovClient.fetch_test_results_for_commit(
repo_name=codecov_client_params["repo_name"],
pullid=codecov_client_params["pullid"],
owner_username=codecov_client_params["owner_username"],
latest_commit_sha="SHA GOES HERE"
)

# Add codecov data to prompt
print(code_coverage_data, test_result_data)
# Pass this into format_plan_step_msg if they exist. Then combine the prompts

existing_test_design_response = self._get_test_design_summary(
agent=agent,
Expand All @@ -83,7 +75,9 @@ def invoke(self, request: CodeUnitTestRequest, codecov_client_params: dict | Non
)

self._get_plan(
agent=agent, prompt=CodingUnitTestPrompts.format_plan_step_msg(diff_str=request.diff)
agent=agent, prompt=CodingUnitTestPrompts.format_plan_step_msg(
diff_str=request.diff
)
)

final_response = self._generate_tests(
Expand Down

0 comments on commit 36868a2

Please sign in to comment.