Skip to content

Commit

Permalink
Don't let tox install a virtualenv during evaluation
Browse files Browse the repository at this point in the history
By default, `tox` will try to create a virtualenv in which to reinstall all of
the dependencies. We don't need this level of isolation for SWE-bench, so use
the `tox-current-env` plugin to elide that.
  • Loading branch information
waterson committed Jul 3, 2024
1 parent 7f67c1f commit a3f5184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions swebench/harness/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class TestStatus(Enum):
MAP_VERSION_TO_INSTALL_SPHINX = {
k: {
"python": "3.9",
"pip_packages": ["tox"],
"pip_packages": ["tox", "tox-current-env"],
"install": "python -m pip install -e .[test]",
"pre_install": ["sed -i 's/pytest/pytest -rA/' tox.ini"],
}
Expand Down Expand Up @@ -842,7 +842,7 @@ class TestStatus(Enum):
k: TEST_PYTEST for k in MAP_VERSION_TO_INSTALL_SKLEARN.keys()
},
"sphinx-doc/sphinx": {
k: "tox -epy39 -v --" for k in MAP_VERSION_TO_INSTALL_SPHINX.keys()
k: "tox --current-env -epy39 -v --" for k in MAP_VERSION_TO_INSTALL_SPHINX.keys()
},
"sqlfluff/sqlfluff": {
k: TEST_PYTEST for k in MAP_VERSION_TO_INSTALL_SQLFLUFF.keys()
Expand Down Expand Up @@ -906,7 +906,7 @@ class TestStatus(Enum):
k: TEST_PYTEST_VERBOSE for k in MAP_VERSION_TO_INSTALL_SKLEARN.keys()
},
"sphinx-doc/sphinx": {
k: "tox -epy39 -v --" for k in MAP_VERSION_TO_INSTALL_SPHINX.keys()
k: "tox --current-env -epy39 -v --" for k in MAP_VERSION_TO_INSTALL_SPHINX.keys()
},
"sqlfluff/sqlfluff": {
k: TEST_PYTEST_VERBOSE for k in MAP_VERSION_TO_INSTALL_SQLFLUFF.keys()
Expand Down

0 comments on commit a3f5184

Please sign in to comment.