sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.44k stars 426 forks source link

Sweep: Add a badge to the ticket that shows how recently the docker version was updated. Use docker utils #2301

Open 3mooth1e opened 1 year ago

3mooth1e commented 1 year ago

Details

No response

Checklist - [X] ``sweepai/utils/docker_utils.py`` ✅ Commit bede24b - [X] ``sweepai/utils/docker_utils_test.py`` ✅ Commit 3dd7e79 - [ ] `sweepai/handlers/on_ticket.py` - [ ] `sweepai/utils/ticket_utils.py`
sweep-nightly[bot] commented 1 year ago
Sweeping

50%
💎 Sweep Pro: I'm creating this ticket using GPT-4. You have unlimited GPT-4 tickets.

Actions (click)


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sweepai/sweep/blob/90f8c10c0cf95a20ffdd42c6e5e367c170d7bc79/sweepai/utils/docker_utils.py#L1-L7 https://github.com/sweepai/sweep/blob/90f8c10c0cf95a20ffdd42c6e5e367c170d7bc79/sweepai/utils/docker_utils_test.py#L1-L9

Step 2: ⌨️ Coding

git add . && pre-commit run --files `sweepai/utils/docker_utils.py` || exit 0 1/5 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "`sweepai/utils/docker_utils.py`" == *.py ]]; then poetry run pylint --errors-only `sweepai/utils/docker_utils.py`; else return 0; fi 2/5 ✓
(nothing was outputted)
if [[ "`sweepai/utils/docker_utils.py`" == *.py ]]; then PYTHONPATH=. poetry run python `sweepai/utils/docker_utils.py`; else return 0; fi 3/5 ✓
(nothing was outputted)
git add . && pre-commit run --files `sweepai/utils/docker_utils.py` || exit 0 4/5 ✓
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing sweepai/utils/docker_utils.py
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Failed
- hook id: black
- files were modified by this hook
reformatted sweepai/utils/docker_utils.py
All done! ✨ 🍰 ✨
1 file reformatted.
isort....................................................................Passed
autoflake................................................................Passed
if [[ "`sweepai/utils/docker_utils.py`" == *.py ]]; then poetry run pylint --errors-only `sweepai/utils/docker_utils.py`; else return 0; fi 5/5 ❌ (`2`)
************* Module sweepai.utils.docker_utils
sweepai/utils/docker_utils.py:8:19: E0602: Undefined variable 'datetime' (undefined-variable)
sweepai/utils/docker_utils.py:11:10: E0602: Undefined variable 'datetime' (undefined-variable)
sweepai/utils/docker_utils.py:14:14: E0602: Undefined variable 'timedelta' (undefined-variable)
sweepai/utils/docker_utils.py:16:16: E0602: Undefined variable 'timedelta' (undefined-variable)
sweepai/utils/docker_utils.py:18:16: E0602: Undefined variable 'timedelta' (undefined-variable)


Sandbox logs for bede24b
git add . && pre-commit run --files `sweepai/utils/docker_utils.py` || exit 0 1/3 ✓
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing sweepai/utils/docker_utils.py
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Failed
- hook id: black
- files were modified by this hook
reformatted sweepai/utils/docker_utils.py
All done! ✨ 🍰 ✨
1 file reformatted.
isort....................................................................Failed
- hook id: isort
- files were modified by this hook
Fixing /repo/sweepai/utils/docker_utils.py
autoflake................................................................Passed
if [[ "`sweepai/utils/docker_utils.py`" == *.py ]]; then poetry run pylint --errors-only `sweepai/utils/docker_utils.py`; else return 0; fi 2/3 ✓
(nothing was outputted)
if [[ "`sweepai/utils/docker_utils.py`" == *.py ]]; then PYTHONPATH=. poetry run python `sweepai/utils/docker_utils.py`; else return 0; fi 3/3 ✓
(nothing was outputted)

git add . && pre-commit run --files `sweepai/utils/docker_utils_test.py` || exit 0 1/6 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "`sweepai/utils/docker_utils_test.py`" == *.py ]]; then poetry run pylint --errors-only `sweepai/utils/docker_utils_test.py`; else return 0; fi 2/6 ✓
(nothing was outputted)
if [[ "`sweepai/utils/docker_utils_test.py`" == *.py ]]; then PYTHONPATH=. poetry run python `sweepai/utils/docker_utils_test.py`; else return 0; fi 3/6 ✓
(nothing was outputted)
git add . && pre-commit run --files `sweepai/utils/docker_utils_test.py` || exit 0 4/6 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "`sweepai/utils/docker_utils_test.py`" == *.py ]]; then poetry run pylint --errors-only `sweepai/utils/docker_utils_test.py`; else return 0; fi 5/6 ✓
(nothing was outputted)
if [[ "`sweepai/utils/docker_utils_test.py`" == *.py ]]; then PYTHONPATH=. poetry run python `sweepai/utils/docker_utils_test.py`; else return 0; fi 6/6 ✓
(nothing was outputted)


Step 3: 🔁 Code Review

Working on it...


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord