Closed sweep-nightly[bot] closed 10 months ago
src/main.py
β
Sandbox logs for https://github.com/sweepai/evals/commit/9da23e8c22f6df73b2d6806381d3a0ea55de6100
trunk fmt src/main.py || exit 0
1/4 ββ Formatted src/main.py Re-checking autofixed files... β Formatted src/main.py Re-checking autofixed files... Checked 1 file β No issues Run trunk upgrade to upgrade 1 linter
trunk check --fix --print-failures src/main.py
2/4 ββ Auto-fixed src/main.py Re-checking autofixed files... ISSUES src/main.py:5:17 5:17 high `numpy` imported but unused ruff/F401 65:5 high Loop control variable `epoch` not used within loop body ruff/B007 Checked 1 file 2 existing issues (2 auto-fixable)
if [[ $(echo "src/main.py" | grep 'test.*\.py$') ]]; then PYTHONPATH=. python src/main.py; else exit 0; fi
3/4 β(nothing was outputted)
if [[ "src/main.py" == *test*.py ]]; then PYTHONPATH=. pytest src/main.py; else exit 0; fi
4/4 β(nothing was outputted)
src/api.py
β
Sandbox logs for https://github.com/sweepai/evals/commit/8b25d78e146d7f31a12ed6ecd9aae486d55a7694
trunk fmt src/api.py || exit 0
1/4 ββ Formatted src/api.py Re-checking autofixed files... β Formatted src/api.py Re-checking autofixed files... Checked 1 file β No issues Run trunk upgrade to upgrade 1 linter
trunk check --fix --print-failures src/api.py
2/4 βISSUES src/api.py:30:38 30:38 high Do not perform function call `File` in argument defaults ruff/B008 Checked 1 file 1 existing issue
if [[ $(echo "src/api.py" | grep 'test.*\.py$') ]]; then PYTHONPATH=. python src/api.py; else exit 0; fi
3/4 β(nothing was outputted)
if [[ "src/api.py" == *test*.py ]]; then PYTHONPATH=. pytest src/api.py; else exit 0; fi
4/4 β(nothing was outputted)
The command:
Run pip install -r requirements.txt
yielded the following error:
##[error]Process completed with exit code 1.
Here are the logs:
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Using cached annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
Using cached anyio-3.7.1-py3-none-any.whl.metadata (4.7 kB)
Using cached astroid-3.0.1-py3-none-any.whl.metadata (4.5 kB)
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
ERROR: Could not find a version that satisfies the requirement distutils (from versions: none)
ERROR: No matching distribution found for distutils
[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: pip install --upgrade pip
Done.
Description
This PR adds comments and docstrings to the main.py and api.py files in the src directory. The comments and docstrings enhance the readability and maintainability of the code by providing clear explanations of the purpose and functionality of each section of the code.
Summary of Changes
In main.py:
In api.py:
Fixes #11.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: