Skip to content

Commit e083c01

Browse files
committed
PERF: update asv.conf.json to work with both conda and virtualenv
Add requirements rules for conda and virtualenv (requires asv git version). Enable asv wheel cache.
1 parent 92b5322 commit e083c01

File tree

1 file changed

+62
-7
lines changed

1 file changed

+62
-7
lines changed

asv_bench/asv.conf.json

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,62 @@
3030

3131
// The matrix of dependencies to test. Each key is the name of a
3232
// package (in PyPI) and the values are version numbers. An empty
33-
// list indicates to just test against the default (latest)
34-
// version.
33+
// list or empty string indicates to just test against the default
34+
// (latest) version. null indicates that the package is to not be
35+
// installed. If the package to be tested is only available from
36+
// PyPi, and the 'environment_type' is conda, then you can preface
37+
// the package name by 'pip+', and the package will be installed via
38+
// pip (with all the conda available packages installed first,
39+
// followed by the pip installed packages).
3540
"matrix": {
36-
// To run against multiple versions, replace with
37-
// "numpy": ["1.7", "1.9"],
3841
"numpy": [],
3942
"Cython": [],
4043
"matplotlib": [],
4144
"sqlalchemy": [],
4245
"scipy": [],
4346
"numexpr": [],
44-
"pytables": [],
47+
"pytables": [null, ""], // platform dependent, see excludes below
48+
"tables": [null, ""],
49+
"libpython": [null, ""],
4550
"openpyxl": [],
4651
"xlsxwriter": [],
4752
"xlrd": [],
4853
"xlwt": []
4954
},
5055

56+
// Combinations of libraries/python versions can be excluded/included
57+
// from the set to test. Each entry is a dictionary containing additional
58+
// key-value pairs to include/exclude.
59+
//
60+
// An exclude entry excludes entries where all values match. The
61+
// values are regexps that should match the whole string.
62+
//
63+
// An include entry adds an environment. Only the packages listed
64+
// are installed. The 'python' key is required. The exclude rules
65+
// do not apply to includes.
66+
//
67+
// In addition to package names, the following keys are available:
68+
//
69+
// - python
70+
// Python version, as in the *pythons* variable above.
71+
// - environment_type
72+
// Environment type, as above.
73+
// - sys_platform
74+
// Platform, as in sys.platform. Possible values for the common
75+
// cases: 'linux2', 'win32', 'cygwin', 'darwin'.
76+
"exclude": [
77+
// On conda install pytables, otherwise tables
78+
{"environment_type": "conda", "tables": ""},
79+
{"environment_type": "conda", "pytables": null},
80+
{"environment_type": "virtualenv", "tables": null},
81+
{"environment_type": "virtualenv", "pytables": ""},
82+
// On conda&win32, install libpython
83+
{"sys_platform": "(?!win32).*", "libpython": ""},
84+
{"sys_platform": "win32", "libpython": null},
85+
{"environment_type": "(?!conda).*", "libpython": ""}
86+
],
87+
"include": [],
88+
5189
// The directory (relative to the current directory) that benchmarks are
5290
// stored in. If not provided, defaults to "benchmarks"
5391
// "benchmark_dir": "benchmarks",
@@ -56,7 +94,6 @@
5694
// environments in. If not provided, defaults to "env"
5795
// "env_dir": "env",
5896

59-
6097
// The directory (relative to the current directory) that raw benchmark
6198
// results are stored in. If not provided, defaults to "results".
6299
// "results_dir": "results",
@@ -66,5 +103,23 @@
66103
// "html_dir": "html",
67104

68105
// The number of characters to retain in the commit hashes.
69-
// "hash_length": 8
106+
// "hash_length": 8,
107+
108+
// `asv` will cache wheels of the recent builds in each
109+
// environment, making them faster to install next time. This is
110+
// number of builds to keep, per environment.
111+
"wheel_cache_size": 8,
112+
113+
// The commits after which the regression search in `asv publish`
114+
// should start looking for regressions. Dictionary whose keys are
115+
// regexps matching to benchmark names, and values corresponding to
116+
// the commit (exclusive) after which to start looking for
117+
// regressions. The default is to start from the first commit
118+
// with results. If the commit is `null`, regression detection is
119+
// skipped for the matching benchmark.
120+
//
121+
// "regressions_first_commits": {
122+
// "some_benchmark": "352cdf", // Consider regressions only after this commit
123+
// "another_benchmark": null, // Skip regression detection altogether
124+
// }
70125
}

0 commit comments

Comments
 (0)