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

feat: added line numbers and hyperlink by function and file #107

Merged
merged 27 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
04be813
feat: added file_function_lineno_map preloading upon initialization o…
May 27, 2024
9574976
addressed Tiff comment: maintaining the same format as demonstrated l…
May 27, 2024
b90ac6b
Merge branch '82-export-report-refactor' into 104-add-line-number
May 27, 2024
2177285
feat: added Line Numbers in report
May 27, 2024
b9c61bf
feat: added hyperlink in the report
May 28, 2024
e266afd
saved demo
May 28, 2024
60a6dec
cleaned up demo
May 28, 2024
715aee0
resolved merge conflict
May 30, 2024
5e8a6e6
resolved bugs due to merge conflict
May 30, 2024
a364786
saved demo
May 30, 2024
08b7d13
fix misleading variable name
SoloSynth1 May 30, 2024
bf615cf
Merge branch 'main' into 104-add-line-number
SoloSynth1 Jun 4, 2024
5a26a62
Merge branch 'main' into 104-add-line-number
SoloSynth1 Jun 4, 2024
7f02ed5
break down `Repository` and separate git-related methods to `GitContext`
SoloSynth1 Jun 4, 2024
613f73e
move abstract `CodeAnalyzer`
SoloSynth1 Jun 4, 2024
93160a7
include basic tests for gitcontext; improve tests by parametrizing
SoloSynth1 Jun 4, 2024
01ba5b0
change prompt to improve response quality from LLM
SoloSynth1 Jun 4, 2024
52dfea2
add `GitPython` as dependency
SoloSynth1 Jun 4, 2024
c6b4a13
fix validation logic to return invalid responses
SoloSynth1 Jun 4, 2024
7157a8b
wip: change calling procedure for line number formatting
SoloSynth1 Jun 4, 2024
d8f2890
change schema of `evaluationreseponse` to include repository and chec…
SoloSynth1 Jun 5, 2024
d401443
reduce redundant computation on finding out which remote service to use
SoloSynth1 Jun 5, 2024
e74525b
change parser to attach link to github repo on function names
SoloSynth1 Jun 5, 2024
835334a
fix error raising lines being too long
SoloSynth1 Jun 5, 2024
9edb286
implement naive parser for function line number as fallback; remove u…
SoloSynth1 Jun 5, 2024
2bf68a7
add test for checking links when no remote is provided
SoloSynth1 Jun 5, 2024
836e056
fix incorrectly set default argument
SoloSynth1 Jun 5, 2024
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
6 changes: 6 additions & 0 deletions src/test_creation/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,14 @@ def evaluate(self, verbose: bool = False) -> List[dict]:
raise RuntimeError(f"Unable to obtain valid response from LLM within {self.retries} attempts")

report = response['results']
repo = self.file_extractor._repo
for item in report:
item['file'] = fp
item['lineno'] = [repo.ffl_map[fp][func] for func in item['Functions']]
item['lineno_href'] = [
f"[{lineno}]({repo._get_git_direct_link(repo._get_relative_path(fp), lineno)})"
for lineno in item['lineno']
]
result += [{
'file': fp,
'report': report,
Expand Down
Loading