Skip to content

Commit 81dea65

Browse files
committed
Format files by pre-commit run -a
Signed-off-by: Yu Ishikawa <[email protected]>
1 parent a3d572f commit 81dea65

File tree

122 files changed

+422
-390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+422
-390
lines changed

.github/workflows/build-and-test.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,3 @@ jobs:
3737
name: Test dev docker
3838
run: |
3939
docker run --rm codiumai/pr-agent:test pytest -v tests/unittest
40-
41-

.github/workflows/code_coverage.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- id: code_cov
3838
name: Test dev docker
3939
run: |
40-
docker run --name test_container codiumai/pr-agent:test pytest tests/unittest --cov=pr_agent --cov-report term --cov-report xml:coverage.xml
40+
docker run --name test_container codiumai/pr-agent:test pytest tests/unittest --cov=pr_agent --cov-report term --cov-report xml:coverage.xml
4141
docker cp test_container:/app/coverage.xml coverage.xml
4242
docker rm test_container
4343
@@ -51,4 +51,4 @@ jobs:
5151
- name: Upload coverage to Codecov
5252
uses: codecov/[email protected]
5353
with:
54-
token: ${{ secrets.CODECOV_TOKEN }}
54+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/docs-ci.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: docs-ci
1+
name: docs-ci
22
on:
33
push:
44
branches:
@@ -20,14 +20,14 @@ jobs:
2020
- uses: actions/setup-python@v5
2121
with:
2222
python-version: 3.x
23-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
23+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
2424
- uses: actions/cache@v4
2525
with:
2626
key: mkdocs-material-${{ env.cache_id }}
2727
path: .cache
2828
restore-keys: |
2929
mkdocs-material-
30-
- run: pip install mkdocs-material
30+
- run: pip install mkdocs-material
3131
- run: pip install "mkdocs-material[imaging]"
3232
- run: pip install mkdocs-glightbox
3333
- run: mkdocs gh-deploy -f docs/mkdocs.yml --force

.github/workflows/e2e_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
- id: test3
4444
name: E2E bitbucket app
4545
run: |
46-
docker run -e BITBUCKET.USERNAME=${{ secrets.BITBUCKET_USERNAME }} -e BITBUCKET.PASSWORD=${{ secrets.BITBUCKET_PASSWORD }} --rm codiumai/pr-agent:test pytest -v tests/e2e_tests/test_bitbucket_app.py
46+
docker run -e BITBUCKET.USERNAME=${{ secrets.BITBUCKET_USERNAME }} -e BITBUCKET.PASSWORD=${{ secrets.BITBUCKET_PASSWORD }} --rm codiumai/pr-agent:test pytest -v tests/e2e_tests/test_bitbucket_app.py

.github/workflows/pr-agent-review.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow enables developers to call PR-Agents `/[actions]` in PR's comments and upon PR creation.
1+
# This workflow enables developers to call PR-Agents `/[actions]` in PR's comments and upon PR creation.
22
# Learn more at https://www.codium.ai/pr-agent/
33
# This is v0.2 of this workflow file
44

@@ -30,6 +30,3 @@ jobs:
3030
GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: true
3131
GITHUB_ACTION_CONFIG.AUTO_REVIEW: true
3232
GITHUB_ACTION_CONFIG.AUTO_IMPROVE: true
33-
34-
35-

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ dist/
88
*.egg-info/
99
build/
1010
.DS_Store
11-
docs/.cache/
11+
docs/.cache/

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ repos:
1313
- id: check-yaml
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
16-
- repo: https://github.com/rhysd/actionlint
17-
rev: v1.7.3
18-
hooks:
19-
- id: actionlint
16+
# - repo: https://github.com/rhysd/actionlint
17+
# rev: v1.7.3
18+
# hooks:
19+
# - id: actionlint
2020
- repo: https://github.com/pycqa/isort
2121
# rev must match what's in dev-requirements.txt
2222
rev: 5.13.2

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199
distributed under the License is distributed on an "AS IS" BASIS,
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202-
limitations under the License.
202+
limitations under the License.

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
recursive-include pr_agent *.toml
2-
recursive-exclude pr_agent *.secrets.toml
2+
recursive-exclude pr_agent *.secrets.toml

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Qode Merge PR-Agent aims to help efficiently review and handle pull requests, by
4040
- [PR-Agent Pro 💎](https://pr-agent-docs.codium.ai/overview/pr_agent_pro/)
4141
- [How it works](#how-it-works)
4242
- [Why use PR-Agent?](#why-use-pr-agent)
43-
43+
4444
## News and Updates
4545

4646
### October 27, 2024
@@ -55,7 +55,7 @@ Read more about this novel feature [here](https://qodo-merge-docs.qodo.ai/tools/
5555

5656

5757
### October 21, 2024
58-
**Disable publishing labels by default:**
58+
**Disable publishing labels by default:**
5959

6060
The default setting for `pr_description.publish_labels` has been updated to `false`. This means that labels generated by the `/describe` tool will no longer be published, unless this configuration is explicitly set to `true`.
6161

@@ -258,7 +258,7 @@ Note that when you set your own PR-Agent or use CodiumAI hosted PR-Agent, there
258258
1. **Fully managed** - We take care of everything for you - hosting, models, regular updates, and more. Installation is as simple as signing up and adding the PR-Agent app to your GitHub\GitLab\BitBucket repo.
259259
2. **Improved privacy** - No data will be stored or used to train models. PR-Agent Pro will employ zero data retention, and will use an OpenAI account with zero data retention.
260260
3. **Improved support** - PR-Agent Pro users will receive priority support, and will be able to request new features and capabilities.
261-
4. **Extra features** -In addition to the benefits listed above, PR-Agent Pro will emphasize more customization, and the usage of static code analysis, in addition to LLM logic, to improve results.
261+
4. **Extra features** -In addition to the benefits listed above, PR-Agent Pro will emphasize more customization, and the usage of static code analysis, in addition to LLM logic, to improve results.
262262
See [here](https://qodo-merge-docs.qodo.ai/overview/pr_agent_pro/) for a list of features available in PR-Agent Pro.
263263

264264

RELEASE_NOTES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Significant documentation updates (see [Installation Guide](https://github.com/C
8888
- codiumai/pr-agent:0.7-gitlab_webhook
8989
- codiumai/pr-agent:0.7-github_polling
9090
- codiumai/pr-agent:0.7-github_action
91-
91+
9292
### Added::Algo
9393
- New tool /similar_issue - Currently on GitHub app and CLI: indexes the issues in the repo, find the most similar issues to the target issue.
9494
- Describe markers: Empower the /describe tool with a templating capability (see more details in https://github.com/Codium-ai/pr-agent/pull/273).

docs/docs/assets/logo.svg

+1-1
Loading

docs/docs/chrome-extension/data_privacy.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ We take your code's security and privacy seriously:
22

33
- The Chrome extension will not send your code to any external servers.
44
- For private repositories, we will first validate the user's identity and permissions. After authentication, we generate responses using the existing Qodo Merge Pro integration.
5-

docs/docs/chrome-extension/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
With a single-click installation you will gain access to a context-aware chat on your pull requests code, a toolbar extension with multiple AI feedbacks, Qodo Merge filters, and additional abilities.
44

5-
The extension is powered by top code models like Claude 3.5 Sonnet and GPT4. All the extension's features are free to use on public repositories.
5+
The extension is powered by top code models like Claude 3.5 Sonnet and GPT4. All the extension's features are free to use on public repositories.
66

77
For private repositories, you will need to install [Qodo Merge Pro](https://github.com/apps/codiumai-pr-agent-pro) in addition to the extension (Quick GitHub app setup with a 14-day free trial. No credit card needed).
88
For a demonstration of how to install Qodo Merge Pro and use it with the Chrome extension, please refer to the tutorial video at the provided [link](https://codium.ai/images/pr_agent/private_repos.mp4).
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Overview
2-
TBD
2+
TBD

docs/docs/core-abilities/compression_strategy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ We prioritize the languages of the repo based on the following criteria:
1212

1313
1. Exclude binary files and non code files (e.g. images, pdfs, etc)
1414
2. Given the main languages used in the repo
15-
3. We sort the PR files by the most common languages in the repo (in descending order):
15+
3. We sort the PR files by the most common languages in the repo (in descending order):
1616
* ```[[file.py, file2.py],[file3.js, file4.jsx],[readme.md]]```
17-
17+
1818

1919
### Small PR
2020
In this case, we can fit the entire PR in a single prompt:

docs/docs/core-abilities/dynamic_context.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## TL;DR
22

3-
Qodo Merge uses an **asymmetric and dynamic context strategy** to improve AI analysis of code changes in pull requests.
4-
It provides more context before changes than after, and dynamically adjusts the context based on code structure (e.g., enclosing functions or classes).
3+
Qodo Merge uses an **asymmetric and dynamic context strategy** to improve AI analysis of code changes in pull requests.
4+
It provides more context before changes than after, and dynamically adjusts the context based on code structure (e.g., enclosing functions or classes).
55
This approach balances providing sufficient context for accurate analysis, while avoiding needle-in-the-haystack information overload that could degrade AI performance or exceed token limits.
66

77
## Introduction
@@ -17,12 +17,12 @@ Pull request code changes are retrieved in a unified diff format, showing three
1717
code line that already existed in the file...
1818
code line that already existed in the file...
1919
code line that already existed in the file...
20-
20+
2121
@@ -26,2 +26,4 @@ def func2():
2222
...
2323
```
2424

25-
This unified diff format can be challenging for AI models to interpret accurately, as it provides limited context for understanding the full scope of code changes.
25+
This unified diff format can be challenging for AI models to interpret accurately, as it provides limited context for understanding the full scope of code changes.
2626
The presentation of code using '+', '-', and ' ' symbols to indicate additions, deletions, and unchanged lines respectively also differs from the standard code formatting typically used to train AI models.
2727

2828

@@ -37,7 +37,7 @@ Pros:
3737
Cons:
3838

3939
- Excessive context may overwhelm the model with extraneous information, creating a "needle in a haystack" scenario where focusing on the relevant details (the code that actually changed) becomes challenging.
40-
LLM quality is known to degrade when the context gets larger.
40+
LLM quality is known to degrade when the context gets larger.
4141
Pull requests often encompass multiple changes across many files, potentially spanning hundreds of lines of modified code. This complexity presents a genuine risk of overwhelming the model with excessive context.
4242

4343
- Increased context expands the token count, increasing processing time and cost, and may prevent the model from processing the entire pull request in a single pass.
@@ -47,18 +47,18 @@ To address these challenges, Qodo Merge employs an **asymmetric** and **dynamic*
4747

4848
**Asymmetric:**
4949

50-
We start by recognizing that the context preceding a code change is typically more crucial for understanding the modification than the context following it.
50+
We start by recognizing that the context preceding a code change is typically more crucial for understanding the modification than the context following it.
5151
Consequently, Qodo Merge implements an asymmetric context policy, decoupling the context window into two distinct segments: one for the code before the change and another for the code after.
5252

53-
By independently adjusting each context window, Qodo Merge can supply the model with a more tailored and pertinent context for individual code changes.
53+
By independently adjusting each context window, Qodo Merge can supply the model with a more tailored and pertinent context for individual code changes.
5454

5555
**Dynamic:**
5656

5757
We also employ a "dynamic" context strategy.
58-
We start by recognizing that the optimal context for a code change often corresponds to its enclosing code component (e.g., function, class), rather than a fixed number of lines.
58+
We start by recognizing that the optimal context for a code change often corresponds to its enclosing code component (e.g., function, class), rather than a fixed number of lines.
5959
Consequently, we dynamically adjust the context window based on the code's structure, ensuring the model receives the most pertinent information for each modification.
6060

61-
To prevent overwhelming the model with excessive context, we impose a limit on the number of lines searched when identifying the enclosing component.
61+
To prevent overwhelming the model with excessive context, we impose a limit on the number of lines searched when identifying the enclosing component.
6262
This balance allows for comprehensive understanding while maintaining efficiency and limiting context token usage.
6363

6464
## Appendix - relevant configuration options
@@ -69,4 +69,4 @@ allow_dynamic_context=true # Allow dynamic context extension
6969
max_extra_lines_before_dynamic_context = 8 # will try to include up to X extra lines before the hunk in the patch, until we reach an enclosing function or class
7070
patch_extra_lines_before = 3 # Number of extra lines (+3 default ones) to include before each hunk in the patch
7171
patch_extra_lines_after = 1 # Number of extra lines (+3 default ones) to include after each hunk in the patch
72-
```
72+
```

docs/docs/core-abilities/impact_evaluation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ Here are key metrics that the dashboard tracks:
4141
4242
#### Suggestion Score Distribution
4343
![Impacted_Suggestion_Score](https://codium.ai/images/pr_agent/impacted_score_dist.png){width=512}
44-
> Explanation: The distribution of the suggestion score for the implemented suggestions, ensuring that higher-scored suggestions truly represent more significant improvements.
44+
> Explanation: The distribution of the suggestion score for the implemented suggestions, ensuring that higher-scored suggestions truly represent more significant improvements.

docs/docs/core-abilities/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Qodo Merge utilizes a variety of core abilities to provide a comprehensive and e
1313

1414
## Blogs
1515

16-
Here are some additional technical blogs from Qodo, that delve deeper into the core capabilities and features of Large Language Models (LLMs) when applied to coding tasks.
16+
Here are some additional technical blogs from Qodo, that delve deeper into the core capabilities and features of Large Language Models (LLMs) when applied to coding tasks.
1717
These resources provide more comprehensive insights into leveraging LLMs for software development.
1818

1919
### Code Generation and LLMs
@@ -25,4 +25,4 @@ These resources provide more comprehensive insights into leveraging LLMs for sof
2525
- [Introduction to Code Coverage Testing](https://www.qodo.ai/blog/introduction-to-code-coverage-testing/)
2626

2727
### Cost Optimization
28-
- [Reduce Your Costs by 30% When Using GPT for Python Code](https://www.qodo.ai/blog/reduce-your-costs-by-30-when-using-gpt-3-for-python-code/)
28+
- [Reduce Your Costs by 30% When Using GPT for Python Code](https://www.qodo.ai/blog/reduce-your-costs-by-30-when-using-gpt-3-for-python-code/)
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Interactive invocation 💎
2-
TBD
2+
TBD

docs/docs/core-abilities/metadata.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ __old hunk__
5353

5454

5555
(4) All the metadata described above represents several level of cumulative analysis - ranging from hunk level, to file level, to PR level, to organization level.
56-
This comprehensive approach enables Qodo Merge AI models to generate more precise and contextually relevant suggestions and feedback.
56+
This comprehensive approach enables Qodo Merge AI models to generate more precise and contextually relevant suggestions and feedback.

docs/docs/core-abilities/self_reflection.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## TL;DR
22

3-
Qodo Merge implements a **self-reflection** process where the AI model reflects, scores, and re-ranks its own suggestions, eliminating irrelevant or incorrect ones.
4-
This approach improves the quality and relevance of suggestions, saving users time and enhancing their experience.
3+
Qodo Merge implements a **self-reflection** process where the AI model reflects, scores, and re-ranks its own suggestions, eliminating irrelevant or incorrect ones.
4+
This approach improves the quality and relevance of suggestions, saving users time and enhancing their experience.
55
Configuration options allow users to set a score threshold for further filtering out suggestions.
66

77
## Introduction - Efficient Review with Hierarchical Presentation
@@ -24,7 +24,7 @@ The AI model is initially tasked with generating suggestions, and outputting the
2424
However, in practice we observe that models often struggle to simultaneously generate high-quality code suggestions and rank them well in a single pass.
2525
Furthermore, the initial set of generated suggestions sometimes contains easily identifiable errors.
2626

27-
To address these issues, we implemented a "self-reflection" process that refines suggestion ranking and eliminates irrelevant or incorrect proposals.
27+
To address these issues, we implemented a "self-reflection" process that refines suggestion ranking and eliminates irrelevant or incorrect proposals.
2828
This process consists of the following steps:
2929

3030
1. Presenting the generated suggestions to the model in a follow-up call.
@@ -48,4 +48,4 @@ This results in a more refined and valuable set of suggestions for the user, sav
4848
[pr_code_suggestions]
4949
self_reflect_on_suggestions = true # Enable self-reflection on code suggestions
5050
suggestions_score_threshold = 0 # Filter out suggestions with a score below this threshold (0-10)
51-
```
51+
```

0 commit comments

Comments
 (0)