-
Notifications
You must be signed in to change notification settings - Fork 332
Pytest latest #90
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
Merged
Merged
Pytest latest #90
Changes from 129 commits
Commits
Show all changes
132 commits
Select commit
Hold shift + click to select a range
49d06ad
add PyTest framework
WangGLJoseph 280c6e7
update pytest yml
WangGLJoseph c9e6b53
update CI
4a66b6a
activate workflow
5cf1881
fix branch name
150ae70
add missing checkout
6a752f1
Merge branch 'main' into pytest-ci
b594195
add correct docker command
63bea68
add sonar source files
5c6bdc7
output converage to both term and xml
757cf93
use acr-pytest for container name
830de0f
Update pytest.yml
Marti2203 78a89bf
Update sonar-project.properties
Marti2203 8a685f6
sonar fix and update sonar exclusions
b1ebfb1
add coverage file path
3292ab3
reduce code duplication
fab4c16
add temp dir in workflow for coverage report
26a154f
update sonar config
a9535b9
use tox and pytest outside container
f069337
add missing tox.ini file
19a8418
separate pytest and build workflow
e93d76d
fix conda env name in workflow
989ffc5
update shell to use login mode for pytest workflow
8e6ac78
update conda config
301dd26
set PYTHONPATH inside tox.ini
9b041ff
update tox.ini
56550c4
include Coverage.py in tox
598a5e6
add passenv to tox
86a1c22
change build yaml to only run on PR merge
6719301
remove redundant deps in tox.ini
a9a804c
abort Sonarqube Scan if coverage.xml is missing
2d1c671
specify source and test files for sonar
f531635
add test_search_utils
4d06ba8
change build to docker_build
53b7aa3
Merge branch 'main' into pytest-ci
c1d7a1a
update tox usage in workflow and documentation
26cf273
add test for search_utils.py
bc6fa09
fix get_code_region_around_line
62bd169
update testcase (need to clarify class signature)
2d9a5fb
fix sonar issues and update README
9adf8e9
add empty test files for search subdir
001a354
add testcase for internal methods of SearchBackend
da9d622
Merge branch 'pytest-unit' into pytest-ci
3212f7e
update tox.ini for more accurate coverage percentage
a95c2ff
fix test_search_utils
d440a14
add tests and add `converage` to whitelist for tox testenv
d7fccde
update test cases
54d5fab
update test_saerch_backend
119e5b7
add testcases for search subdir
91dbdd2
update TESTING.md with setup instructions for adding `conda-forge`
527c889
update tox.ini
d410126
add empty test files for api subdir
7905a2c
implement fix from PR #81
WangGLJoseph d3fee77
Fake error
Marti2203 3600af3
Fix failing test
Marti2203 7acfa05
Fix fake error and add new one
Marti2203 d06e4e7
Update app/data_structures.py
Marti2203 ff7eb3b
update readme
1eb0bfb
improve coverage of search_manage.py
deee4aa
improve coverage for search_utils
f2d9d08
show only analysis cov
a58abf4
add empty test_sbfl
3abd273
remove redundant import stmts
77dba68
add test cases for sbfl.py
6714466
Merge branch 'pytest-ci' into pytest-unit
654acc4
run actions on pytest-unit branch
7ecd806
add testing for api/validation.py
3f81a68
refactor common test utils and make it a package, add test cases
5e050ac
ensure coverage on new code
f84ed47
add test cases for api/eval_helper.py
d419e68
enable printing branch coverage on CI
00a78d2
cover some missing branches in search_backend
2e1a6a1
complete coverage for search/search_backend.py
f78c8c8
remove redundant collection
e1b0272
add test for gpt.py
0dc92b7
update test for catching BadRequestError
507cc10
disable pytest output capturing to show stdout
b1dbf66
improve coverage of test_gpt.py
1769a89
refactor common test code to pytest_utils
7ff780f
add unit test for model/claude.py
a6720be
remove redundant declaration (refactored into pytest_utils)
dfefb9a
add tests for models
a54d0ec
add tests for azure.py
cb93f7f
test bedrock
bbe3e00
add problematic definition for Sonar scan
6d960dc
try changing sonar.sources to include test/
52b3565
modify sonar scan config
f8434f7
revert to previous sonar config for showing coverage data
01ccf2a
finish testing models submodule
a2081bc
add empty test agent files
70c131d
update ci
WangGLJoseph 288cdbd
Merge branch 'pytest-latest' into pytest-agents
8ef4d69
improve coverage of test_agent_search
622a520
test_patch_utils
b970ddf
test_agent_reproducer
24d5278
test_agent_write_patch
6769ca6
test_agent_select
5389e8d
test_agent_reviewer
79d0bd2
test_agent_proxy and refactor DummyModel to pytest_utils
4bf1e02
test main app dir classes
a7320be
test_manage
38b2294
add unit test for GitHubTask and LocalTask
da95315
test_inference
c78c1da
move app test files
2ee78fe
add test files
e60b1a7
update build files for osx-arm64 envO
WangGLJoseph f65258e
add app level testing
29c5d93
add tests for running raw tasks
WangGLJoseph b509167
improve coverage
WangGLJoseph 875588f
setup multi-env for tox pytest
WangGLJoseph c2fe5bc
update ci yaml
WangGLJoseph 17c65d0
update ci yaml to refer to github secrets for LLM API keys
WangGLJoseph 43f32b6
add anthropic integration test (negative case with dummy api key)
WangGLJoseph b43c55d
update integration test ci
WangGLJoseph aa20a8f
integration test with anthropic
WangGLJoseph 24ccd38
remove logging
WangGLJoseph 65d9ec2
add simple openai integration test
WangGLJoseph f4073bf
remove print
WangGLJoseph 2013251
update integration
WangGLJoseph d680321
update ci branch names
WangGLJoseph 3b33840
add missing eof `fi`
WangGLJoseph 470ba7c
update logging
WangGLJoseph da009cd
update env setup files
WangGLJoseph 13f1a2e
setup python black
WangGLJoseph 59c878f
setup pyright
WangGLJoseph 8176f2b
remove logging
WangGLJoseph db1ef69
Merge branch 'pytest-integration' into pytest-latest
WangGLJoseph 95daf92
update ci
WangGLJoseph b807a00
update actions
WangGLJoseph 28593f2
Merge branch 'main' into pytest-latest
WangGLJoseph 2445bc9
update ci yml
WangGLJoseph fb34f85
update regex for test branches
WangGLJoseph File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Build Docker Image | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| docker_build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build docker image | ||
| run: docker build -f Dockerfile.minimal -t acr . | ||
|
|
||
| - name: Start docker image (background) | ||
| run: docker run --name acr-pytest -t -d acr | ||
|
|
||
| # Due to diffuculties with `conda activate` in docker, we do `conda run` while specifying the environment | ||
| # setting cov-report to term and xml -> outputs coverage report to terminal, and an xml file inside the container | ||
| - name: Run PyTest with Coverage (inside docker) | ||
| run: docker exec acr-pytest conda run --no-capture-output -n auto-code-rover pytest --cov=app test/ --cov-report=term --cov-report=xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| from app import main | ||
|
|
||
| if __name__ == "__main__": | ||
| main.main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: auto-code-rover | ||
| channels: | ||
| - conda-forge | ||
| - defaults | ||
| dependencies: | ||
| - bzip2=1.0.8 | ||
| - ca-certificates=2024.7.2 | ||
| - libffi=3.4.4 | ||
| - ncurses=6.5 | ||
| - openssl=3.3.1 | ||
| - pip=24.2 | ||
| - python=3.10.11 | ||
| - readline=8.2 | ||
| - setuptools=68.2.2 | ||
| - sqlite=3.46.0 | ||
| - tk=8.6.14 | ||
| - tzdata=2023d | ||
| - wheel=0.41.2 | ||
| - xz=5.4.6 | ||
| - rich=13.8.1 | ||
| - pip: | ||
| - -r requirements.osx-arm64.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "include": ["app"], | ||
| "exclude": ["venv"], | ||
| "pythonVersion": "3.10", | ||
| "typeCheckingMode": "basic" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [pytest] | ||
| norecursedirs = setup output | ||
| markers = | ||
| integration: mark a test as an integration test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| aiohttp==3.10.2 | ||
| aiosignal==1.3.1 | ||
| annotated-types==0.6.0 | ||
| antlr4-tools==0.2.1 | ||
| anyio==4.2.0 | ||
| astroid==3.2.3 | ||
| attrs==23.2.0 | ||
| beautifulsoup4==4.12.3 | ||
| black==25.1.0 | ||
| Brotli | ||
| certifi==2024.7.4 | ||
| cffi | ||
| cfgv==3.4.0 | ||
| charset-normalizer | ||
| click==8.1.7 | ||
| coverage==7.5.3 | ||
| Cython==3.0.8 | ||
| dill==0.3.8 | ||
| discord==2.3.2 | ||
| discord.py==2.3.2 | ||
| distlib==0.3.8 | ||
| distro==1.9.0 | ||
| docker==7.0.0 | ||
| docstring-parser==0.15 | ||
| emojis==0.7.0 | ||
| filelock==3.13.1 | ||
| frozenlist==1.4.1 | ||
| fsspec==2024.6.1 | ||
| h11==0.14.0 | ||
| h2 | ||
| hpack==4.0.0 | ||
| httpcore==1.0.5 | ||
| httpx==0.27.0 | ||
| huggingface-hub==0.23.5 | ||
| hyperframe | ||
| icecream==2.1.3 | ||
| identify==2.5.33 | ||
| idna==3.7 | ||
| importlib-metadata==7.0.1 | ||
| install-jdk==1.1.0 | ||
| isort==5.13.2 | ||
| javalang==0.13.0 | ||
| Jinja2==3.1.4 | ||
| jsonschema==4.22.0 | ||
| jsonschema-specifications==2023.12.1 | ||
| libclang==18.1.1 | ||
| linkify-it-py==2.0.2 | ||
| litellm==1.44.8 | ||
| loguru==0.7.2 | ||
| lxml==5.1.0 | ||
| markdown-it-py==3.0.0 | ||
| MarkupSafe==2.1.5 | ||
| mccabe==0.7.0 | ||
| mdit-py-plugins==0.4.0 | ||
| mdurl==0.1.2 | ||
| more-itertools==10.2.0 | ||
| mpmath==1.3.0 | ||
| multidict==6.0.4 | ||
| networkx==3.2.1 | ||
| nodeenv==1.8.0 | ||
| numpy==1.26.4 | ||
| natsort==8.4.0 | ||
| ollama==0.3.3 | ||
| openai==1.50.2 | ||
| opt-einsum==3.3.0 | ||
| packaging==23.2 | ||
| platformdirs==4.1.0 | ||
| polars==0.20.31 | ||
| pre-commit==3.6.0 | ||
| pycparser | ||
| pydantic==2.5.3 | ||
| pydantic_core==2.14.6 | ||
| Pygments==2.17.2 | ||
| pylint==3.2.3 | ||
| pyro-api==0.1.2 | ||
| pyro-ppl==1.9.0 | ||
| PySocks | ||
| pyright==1.1.397 | ||
| pytest==8.3.4 | ||
| pytest-cov==6.0.0 | ||
| python-dotenv==1.0.0 | ||
| PyYAML==6.0.1 | ||
| referencing==0.32.1 | ||
| regex==2024.5.15 | ||
| rich==13.7.1 | ||
| rpds-py==0.16.2 | ||
| semver==3.0.2 | ||
| slack_sdk==3.26.2 | ||
| sniffio==1.3.0 | ||
| soupsieve==2.5 | ||
| sympy==1.13.0 | ||
| tenacity==8.2.3 | ||
| termcolor==2.4.0 | ||
| textual==0.52.1 | ||
| tiktoken==0.7.0 | ||
| timeout-decorator==0.5.0 | ||
| tokenizers==0.19.1 | ||
| tomlkit==0.13.0 | ||
| torch==2.2.1 | ||
| tqdm==4.66.4 | ||
| tree-sitter==0.21.3 | ||
| tree-sitter-c==0.21.4 | ||
| tree-sitter-cpp==0.22.2 | ||
| tree-sitter-java==0.21.0 | ||
| tree-sitter-languages==1.10.2 | ||
| types-jsonschema==4.21.0.20240311 | ||
| typing_extensions==4.12.2 | ||
| uc-micro-py==1.0.2 | ||
| unidiff==0.7.5 | ||
| unittest-xml-reporting==3.2.0 | ||
| urllib3 | ||
| virtualenv==20.25.0 | ||
| yarl==1.9.4 | ||
| zipp==3.19.2 | ||
| zstandard==0.22.0 |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.