ibragim-bad commited on
Commit
772829a
1 Parent(s): a809e26

Update constants.py

Browse files
Files changed (1) hide show
  1. constants.py +58 -0
constants.py CHANGED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from collections import defaultdict
2
+ from swebench.harness.constants import (
3
+ MAP_REPO_TO_REQS_PATHS,
4
+ MAP_REPO_TO_TEST_FRAMEWORK,
5
+ MAP_VERSION_TO_INSTALL,
6
+ )
7
+ from swebench.harness.log_parsers import parse_log_pytest, MAP_REPO_TO_PARSER
8
+
9
+ MAP_VERSION_TO_INSTALL_PLACEHOLDER = {
10
+ "0.0": {
11
+ "python": "3.9",
12
+ "packages": "requirements.txt",
13
+ "pip_packages": [
14
+ "pytest",
15
+ "cython",
16
+ "distro",
17
+ "pytest-cov",
18
+ "pytest-xdist",
19
+ "pytest-mock",
20
+ "pytest-asyncio",
21
+ "pytest-bdd",
22
+ "pytest-benchmark",
23
+ "pytest-randomly",
24
+ "responses",
25
+ "mock",
26
+ "hypothesis",
27
+ "freezegun",
28
+ "trustme",
29
+ "requests-mock",
30
+ "requests",
31
+ "tomlkit",
32
+ ],
33
+ "install": "pip install --force-reinstall -e .; pip install -e .[test]; pip install -e .[testing]; pip install -e .[tests]; pip install -e .[dev]",
34
+ "pre_install": ["apt install -y make gcc g++ pkg-config"],
35
+ }
36
+ }
37
+ MAP_REPO_TO_REQS_PATHS_PLACEHOLDER = [
38
+ "requirements.txt",
39
+ "requirements-dev.txt",
40
+ "requirements-test.txt",
41
+ "requirements_test.txt",
42
+ "requirements_dev.txt",
43
+ ]
44
+ TEST_PYTEST_WO_DEPRECATION = (
45
+ "pytest --no-header -rA --tb=no -p no:cacheprovider -W ignore::DeprecationWarning"
46
+ )
47
+
48
+
49
+ MAP_REPO_TO_REQS_PATHS = defaultdict(
50
+ lambda: MAP_REPO_TO_REQS_PATHS_PLACEHOLDER, MAP_REPO_TO_REQS_PATHS
51
+ )
52
+ MAP_REPO_TO_TEST_FRAMEWORK = defaultdict(
53
+ lambda: TEST_PYTEST_WO_DEPRECATION, MAP_REPO_TO_TEST_FRAMEWORK
54
+ )
55
+ MAP_VERSION_TO_INSTALL = defaultdict(
56
+ lambda: MAP_VERSION_TO_INSTALL_PLACEHOLDER, MAP_VERSION_TO_INSTALL
57
+ )
58
+ MAP_REPO_TO_PARSER = defaultdict(lambda: parse_log_pytest, MAP_REPO_TO_PARSER)