diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index c1c35f188..2bf9a57d8 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -3,7 +3,7 @@ name: pre-commit
on:
pull_request:
push:
- branches: [master]
+ branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
diff --git a/asv.conf.json b/asv.conf.json
index 3c7b648ff..54a0fbba6 100644
--- a/asv.conf.json
+++ b/asv.conf.json
@@ -13,9 +13,9 @@
// project being benchmarked
"repo": ".",
- // List of branches to benchmark. If not provided, defaults to "master"
+ // List of branches to benchmark. If not provided, defaults to "main"
// (for git) or "default" (for mercurial).
- "branches": ["master"],
+ "branches": ["main"],
// The DVCS being used. If not set, it will be automatically
// determined from "repo" by looking at the protocol in the URL
diff --git a/asv/commands/profiling.py b/asv/commands/profiling.py
index 845639093..fc32dc8cf 100644
--- a/asv/commands/profiling.py
+++ b/asv/commands/profiling.py
@@ -169,7 +169,7 @@ def run(cls, conf, benchmark, revision=None, gui=None, output=None,
if env.python != "{0}.{1}".format(*sys.version_info[:2]):
raise util.UserError(
"Profiles must be run in the same version of Python as the "
- "asv master process")
+ "asv main process")
benchmarks = Benchmarks.discover(conf, repo, environments,
[commit_hash],
diff --git a/asv/commands/run.py b/asv/commands/run.py
index fbc193673..7e1cb4e64 100644
--- a/asv/commands/run.py
+++ b/asv/commands/run.py
@@ -59,9 +59,9 @@ def setup_arguments(cls, subparsers):
Run a benchmark suite.
examples:
- asv run master run for one branch
- asv run master^! run for one commit (git)
- asv run "--merges master" run for only merge commits (git)
+ asv run main run for one branch
+ asv run main^! run for one commit (git)
+ asv run "--merges main" run for only merge commits (git)
"""))
cls._setup_arguments(parser)
diff --git a/asv/repo.py b/asv/repo.py
index 1ee7e1d64..f65ace067 100644
--- a/asv/repo.py
+++ b/asv/repo.py
@@ -95,7 +95,7 @@ def get_new_range_spec(self, latest_result, branch=None):
"""
Returns a formatted string giving the results between the
latest result and the newest hash in a given branch.
- If no branch given, use the 'master' branch.
+ If no branch given, use the 'main' branch.
"""
raise NotImplementedError()
diff --git a/asv/template/asv.conf.json b/asv/template/asv.conf.json
index a1d305957..b6ae1b2e2 100644
--- a/asv/template/asv.conf.json
+++ b/asv/template/asv.conf.json
@@ -37,9 +37,9 @@
// "install_command": ["in-dir={env_dir} python -mpip install {wheel_file}"],
// "uninstall_command": ["return-code=any python -mpip uninstall -y {project}"],
- // List of branches to benchmark. If not provided, defaults to "master"
+ // List of branches to benchmark. If not provided, defaults to "main"
// (for git) or "default" (for mercurial).
- // "branches": ["master"], // for git
+ // "branches": ["main"], // for git
// "branches": ["default"], // for mercurial
// The DVCS being used. If not set, it will be automatically
diff --git a/asv/www/asv.js b/asv/www/asv.js
index c3c54ac5c..ac2356395 100644
--- a/asv/www/asv.js
+++ b/asv/www/asv.js
@@ -3,8 +3,8 @@
$(document).ready(function() {
/* GLOBAL STATE */
/* The index.json content as returned from the server */
- var master_timestamp = '';
- var master_json = {};
+ var main_timestamp = '';
+ var main_json = {};
/* Extra pages: {name: show_function} */
var loaded_pages = {};
/* Previous window scroll positions */
@@ -284,7 +284,7 @@ $(document).ready(function() {
}
else {
$.ajax({
- url: url + '?timestamp=' + $.asv.master_timestamp,
+ url: url + '?timestamp=' + $.asv.main_timestamp,
dataType: "json",
cache: true
}).done(function(data) {
@@ -417,17 +417,17 @@ $(document).ready(function() {
}
function get_commit_hash(revision) {
- var commit_hash = master_json.revision_to_hash[revision];
+ var commit_hash = main_json.revision_to_hash[revision];
if (commit_hash) {
// Return printable commit hash
- commit_hash = commit_hash.slice(0, master_json.hash_length);
+ commit_hash = commit_hash.slice(0, main_json.hash_length);
}
return commit_hash;
}
function get_revision(commit_hash) {
var rev = null;
- $.each(master_json.revision_to_hash, function(revision, full_commit_hash) {
+ $.each(main_json.revision_to_hash, function(revision, full_commit_hash) {
if (full_commit_hash.startsWith(commit_hash)) {
rev = revision;
// break the $.each loop
@@ -438,15 +438,15 @@ $(document).ready(function() {
}
function init_index() {
- /* Fetch the master index.json and then set up the page elements
+ /* Fetch the main index.json and then set up the page elements
based on it. */
$.ajax({
- url: "index.json" + '?timestamp=' + $.asv.master_timestamp,
+ url: "index.json" + '?timestamp=' + $.asv.main_timestamp,
dataType: "json",
cache: true
}).done(function (index) {
- master_json = index;
- $.asv.master_json = index;
+ main_json = index;
+ $.asv.main_json = index;
/* Page title */
var project_name = $("#project-name")[0];
@@ -475,8 +475,8 @@ $(document).ready(function() {
dataType: "json",
cache: false
}).done(function (info) {
- master_timestamp = info['timestamp'];
- $.asv.master_timestamp = master_timestamp;
+ main_timestamp = info['timestamp'];
+ $.asv.main_timestamp = main_timestamp;
init_index();
}).fail(function () {
$.asv.ui.network_error();
@@ -503,8 +503,8 @@ $(document).ready(function() {
this.get_commit_hash = get_commit_hash;
this.get_revision = get_revision;
- this.master_timestamp = master_timestamp; /* Updated after info.json loads */
- this.master_json = master_json; /* Updated after index.json loads */
+ this.main_timestamp = main_timestamp; /* Updated after info.json loads */
+ this.main_json = main_json; /* Updated after index.json loads */
this.format_date_yyyymmdd = format_date_yyyymmdd;
this.format_date_yyyymmdd_hhmm = format_date_yyyymmdd_hhmm;
diff --git a/asv/www/asv_ui.js b/asv/www/asv_ui.js
index 49833b70a..af757c706 100644
--- a/asv/www/asv_ui.js
+++ b/asv/www/asv_ui.js
@@ -106,7 +106,7 @@ $(document).ready(function() {
$.asv.load_graph_data(
graph_url
).done(function (data) {
- var params = $.asv.master_json.benchmarks[benchmark_basename].params;
+ var params = $.asv.main_json.benchmarks[benchmark_basename].params;
data = $.asv.filter_graph_data_idx(data, 0, parameter_idx, params);
var options = {
colors: ['#000'],
diff --git a/asv/www/graphdisplay.js b/asv/www/graphdisplay.js
index ecf236155..ba715322b 100644
--- a/asv/www/graphdisplay.js
+++ b/asv/www/graphdisplay.js
@@ -83,7 +83,7 @@ $(document).ready(function() {
function get_x_from_revision(rev) {
if (date_scale) {
- return $.asv.master_json.revision_to_date[rev];
+ return $.asv.main_json.revision_to_date[rev];
} else {
return rev;
}
@@ -150,12 +150,12 @@ $(document).ready(function() {
var stack = [tree];
/* Sort keys for tree construction */
- var benchmark_keys = Object.keys($.asv.master_json.benchmarks);
+ var benchmark_keys = Object.keys($.asv.main_json.benchmarks);
benchmark_keys.sort();
/* Build tree */
$.each(benchmark_keys, function(i, bm_name) {
- var bm = $.asv.master_json.benchmarks[bm_name];
+ var bm = $.asv.main_json.benchmarks[bm_name];
var parts = bm_name.split('.');
var i = 0;
var j;
@@ -299,7 +299,7 @@ $(document).ready(function() {
var y = item.datapoint[1];
var commit_hash = get_commit_hash(item.datapoint[0]);
if (commit_hash) {
- var unit = $.asv.master_json.benchmarks[current_benchmark].unit;
+ var unit = $.asv.main_json.benchmarks[current_benchmark].unit;
showTooltip(
item.pageX, item.pageY,
$.asv.pretty_unit(y, unit) + " @ " + commit_hash);
@@ -328,7 +328,7 @@ $(document).ready(function() {
if (previous_hash !== commit_hash) {
previous_hash = commit_hash;
window.open(
- $.asv.master_json.show_commit_url + previous_hash,
+ $.asv.main_json.show_commit_url + previous_hash,
'_blank');
}
}
@@ -348,7 +348,7 @@ $(document).ready(function() {
/*
Generic parameter selections
*/
- var index = $.asv.master_json;
+ var index = $.asv.main_json;
if (!state || state_selection !== null) {
/*
Setup the default configuration on first load,
@@ -428,7 +428,7 @@ $(document).ready(function() {
function update_state_url(params) {
var info = $.asv.parse_hash_string(window.location.hash);
- $.each($.asv.master_json.params, function(param, values) {
+ $.each($.asv.main_json.params, function(param, values) {
if (values.length > 1) {
if (state[param].length != values.length || param == 'branch') {
info.params[param] = state[param];
@@ -445,7 +445,7 @@ $(document).ready(function() {
}
function replace_params_ui() {
- var index = $.asv.master_json;
+ var index = $.asv.main_json;
var nav = $('#graphdisplay-state-params');
nav.empty();
@@ -521,8 +521,8 @@ $(document).ready(function() {
}
function replace_benchmark_params_ui() {
- var params = $.asv.master_json.benchmarks[current_benchmark].params;
- var param_names = $.asv.master_json.benchmarks[current_benchmark].param_names;
+ var params = $.asv.main_json.benchmarks[current_benchmark].params;
+ var param_names = $.asv.main_json.benchmarks[current_benchmark].param_names;
/* Parameter selection UI */
var nav = $('#graphdisplay-navigation-params');
@@ -574,7 +574,7 @@ $(document).ready(function() {
if (rev === null) {
button.text("last");
} else {
- var date_fmt = new Date($.asv.master_json.revision_to_date[rev]);
+ var date_fmt = new Date($.asv.main_json.revision_to_date[rev]);
button.text($.asv.get_commit_hash(rev)
+ " "
+ date_fmt.toUTCString());
@@ -659,7 +659,7 @@ $(document).ready(function() {
return;
}
- var params = $.asv.master_json.benchmarks[current_benchmark].params;
+ var params = $.asv.main_json.benchmarks[current_benchmark].params;
x_coordinate_is_category = false;
if (x_coordinate_axis != 0) {
for (var j = 0; j < params[x_coordinate_axis-1].length; ++j) {
@@ -754,7 +754,7 @@ $(document).ready(function() {
if (current_benchmark) {
/* For the current set of enabled parameters, generate a
list of all the permutations we need to load. */
- var state_permutations = $.grep($.asv.master_json.graph_param_list, function (params) {
+ var state_permutations = $.grep($.asv.main_json.graph_param_list, function (params) {
var ok = true;
$.each(state, function (key, values) {
if ($.inArray(params[key], values) == -1) {
@@ -767,14 +767,14 @@ $(document).ready(function() {
/* Find where the parameters are different. */
var different = find_different_properties(state_permutations);
/* For parameterized tests: names of benchmark parameters */
- var params = $.asv.master_json.benchmarks[current_benchmark].params;
- var param_names = $.asv.master_json.benchmarks[current_benchmark].param_names;
+ var params = $.asv.main_json.benchmarks[current_benchmark].params;
+ var param_names = $.asv.main_json.benchmarks[current_benchmark].param_names;
/* Selected permutations of benchmark parameters, omitting x-axis */
var selection = obj_copy(param_selection);
selection[x_coordinate_axis] = [null]; /* value not referenced, set to null */
var param_permutations = permutations(selection);
- /* Generate a master list of URLs and legend labels for
+ /* Generate a main list of URLs and legend labels for
the graphs. */
var all = [];
$.each(state_permutations, function (i, perm) {
@@ -852,7 +852,7 @@ $(document).ready(function() {
series = $.asv.filter_graph_data(data,
x_coordinate_axis,
graph_content[0],
- $.asv.master_json.benchmarks[current_benchmark].params);
+ $.asv.main_json.benchmarks[current_benchmark].params);
orig_graphs.push({
data: series,
label: graph_content[1],
@@ -980,11 +980,11 @@ $(document).ready(function() {
options.yaxis.max = Math.pow(10, max) * reference;
if (!reference_scale) {
- options.yaxis.axisLabel = $.asv.master_json.benchmarks[current_benchmark].unit;
+ options.yaxis.axisLabel = $.asv.main_json.benchmarks[current_benchmark].unit;
}
}
else {
- var unit = $.asv.master_json.benchmarks[current_benchmark].unit;
+ var unit = $.asv.main_json.benchmarks[current_benchmark].unit;
var unit_list = null;
if (unit == "seconds") {
@@ -1080,7 +1080,7 @@ $(document).ready(function() {
date_to_revision = {};
$.each(graphs, function(i, graph) {
$.each(graph.data, function(j, point) {
- var date = $.asv.master_json.revision_to_date[point[0]];
+ var date = $.asv.main_json.revision_to_date[point[0]];
date_to_revision[date] = point[0];
point[0] = date;
});
@@ -1110,7 +1110,7 @@ $(document).ready(function() {
else {
graphs = orig_graphs;
}
- var param_names = $.asv.master_json.benchmarks[current_benchmark].param_names;
+ var param_names = $.asv.main_json.benchmarks[current_benchmark].param_names;
options.xaxis.axisLabel = param_names[x_coordinate_axis-1];
}
}
@@ -1125,7 +1125,7 @@ $(document).ready(function() {
var markings = [];
if (x_coordinate_axis == 0) {
- $.each($.asv.master_json.tags, function(tag, revision) {
+ $.each($.asv.main_json.tags, function(tag, revision) {
var x = get_x_from_revision(revision);
markings.push(
{ color: "#ddd", lineWidth: 1, xaxis: { from: x, to: x } }
@@ -1157,7 +1157,7 @@ $(document).ready(function() {
if (reference_scale) {
unit = 'relative';
} else {
- unit = $.asv.master_json.benchmarks[current_benchmark].unit;
+ unit = $.asv.main_json.benchmarks[current_benchmark].unit;
}
var options = {
@@ -1342,7 +1342,7 @@ $(document).ready(function() {
var canvas = plot.getCanvas();
var xmin = plot.getAxes().xaxis.min;
var xmax = plot.getAxes().xaxis.max;
- $.each($.asv.master_json.tags, function(tag, revision) {
+ $.each($.asv.main_json.tags, function(tag, revision) {
var x = get_x_from_revision(revision);
if (x >= xmin && x <= xmax) {
var p = plot.pointOffset({x: x, y: 0});
diff --git a/asv/www/regressions.js b/asv/www/regressions.js
index 9ef132f76..7572c4b41 100644
--- a/asv/www/regressions.js
+++ b/asv/www/regressions.js
@@ -40,7 +40,7 @@ $(document).ready(function() {
skip_reload = false;
$('#regressions-body').append(message);
$.ajax({
- url: 'regressions.json' + '?timestamp=' + $.asv.master_timestamp,
+ url: 'regressions.json' + '?timestamp=' + $.asv.main_timestamp,
dataType: "json",
cache: true
}).done(function (data) {
@@ -75,10 +75,10 @@ $(document).ready(function() {
function display_data(data, params) {
var main_div = $('
');
- var branches = $.asv.master_json.params['branch'];
+ var branches = $.asv.main_json.params['branch'];
var all_ignored_keys = {};
- ignore_key_prefix = 'asv-r-' + $.asv.master_json.project;
+ ignore_key_prefix = 'asv-r-' + $.asv.main_json.project;
if (branches && branches.length > 1) {
/* Add a branch selector */
@@ -234,7 +234,7 @@ $(document).ready(function() {
}
var benchmark_basename = benchmark_name.replace(/\([\s\S]*/, '');
- var benchmark = $.asv.master_json.benchmarks[benchmark_basename];
+ var benchmark = $.asv.main_json.benchmarks[benchmark_basename];
var url_params = {};
$.each(param_dict, function (key, value) {
@@ -276,14 +276,14 @@ $(document).ready(function() {
var benchmark_link = $('').attr('href', benchmark_url).text(benchmark_name);
row.append($(' | ').append(benchmark_link));
- var date_fmt = new Date($.asv.master_json.revision_to_date[revs[1]]);
+ var date_fmt = new Date($.asv.main_json.revision_to_date[revs[1]]);
row.append($(' | ').text($.asv.format_date_yyyymmdd_hhmm(date_fmt)));
var commit_td = $(' | ');
if (commit_a) {
- if ($.asv.master_json.show_commit_url.match(/.*\/\/github.com\//)) {
- var commit_url = ($.asv.master_json.show_commit_url + '../compare/'
+ if ($.asv.main_json.show_commit_url.match(/.*\/\/github.com\//)) {
+ var commit_url = ($.asv.main_json.show_commit_url + '../compare/'
+ commit_a + '...' + commit_b);
commit_td.append(
$('').attr('href', commit_url).text(commit_a + '..' + commit_b));
@@ -293,7 +293,7 @@ $(document).ready(function() {
}
}
else {
- var commit_url = $.asv.master_json.show_commit_url + commit_b;
+ var commit_url = $.asv.main_json.show_commit_url + commit_b;
commit_td.append(
$('').attr('href', commit_url).text(commit_b));
}
@@ -389,7 +389,7 @@ $(document).ready(function() {
}
var benchmark_basename = benchmark_name.replace(/\(.*/, '');
- var benchmark = $.asv.master_json.benchmarks[benchmark_basename];
+ var benchmark = $.asv.main_json.benchmarks[benchmark_basename];
var url_params = {};
$.each(param_dict, function (key, value) {
@@ -422,8 +422,8 @@ $(document).ready(function() {
}
if (commit_a) {
- if ($.asv.master_json.show_commit_url.match(/.*\/\/github.com\//)) {
- var commit_url = ($.asv.master_json.show_commit_url + '../compare/'
+ if ($.asv.main_json.show_commit_url.match(/.*\/\/github.com\//)) {
+ var commit_url = ($.asv.main_json.show_commit_url + '../compare/'
+ commit_a + '...' + commit_b);
commit_td.append(
$('').attr('href', commit_url).text(commit_a + '..' + commit_b));
@@ -433,7 +433,7 @@ $(document).ready(function() {
}
}
else {
- var commit_url = $.asv.master_json.show_commit_url + commit_b;
+ var commit_url = $.asv.main_json.show_commit_url + commit_b;
commit_td.append(
$('').attr('href', commit_url).text(commit_b));
}
@@ -451,7 +451,7 @@ $(document).ready(function() {
row.append($(' | ').append(benchmark_link));
var date_td = $(' | ');
- var date_fmt = new Date($.asv.master_json.revision_to_date[jumps[jumps.length-1][1]]);
+ var date_fmt = new Date($.asv.main_json.revision_to_date[jumps[jumps.length-1][1]]);
date_td.text($.asv.format_date_yyyymmdd_hhmm(date_fmt));
row.append(date_td);
@@ -487,10 +487,10 @@ $(document).ready(function() {
}
else {
ignore_payload = (ignore_payload + ','
- + $.asv.master_json.revision_to_hash[revs[0]]);
+ + $.asv.main_json.revision_to_hash[revs[0]]);
}
ignore_payload = (ignore_payload + ','
- + $.asv.master_json.revision_to_hash[revs[1]]);
+ + $.asv.main_json.revision_to_hash[revs[1]]);
return ignore_key_prefix + md5(ignore_payload);
}
diff --git a/asv/www/summarygrid.js b/asv/www/summarygrid.js
index e3d3862a0..b32747f3e 100644
--- a/asv/www/summarygrid.js
+++ b/asv/www/summarygrid.js
@@ -19,9 +19,9 @@ $(document).ready(function() {
}
function get_benchmarks_by_groups() {
- var master_json = $.asv.master_json;
+ var main_json = $.asv.main_json;
var groups = {};
- $.each(master_json.benchmarks, function(bm_name, bm) {
+ $.each(main_json.benchmarks, function(bm_name, bm) {
var i = bm_name.indexOf('.');
var group = bm_name.slice(0, i);
var name = bm_name.slice(i + 1);
@@ -103,7 +103,7 @@ $(document).ready(function() {
function make_summary() {
var summary_display = $('#summarygrid-display');
- var master_json = $.asv.master_json;
+ var main_json = $.asv.main_json;
var summary_container = $('');
if (summary_loaded) {
@@ -116,7 +116,7 @@ $(document).ready(function() {
group_container.append($('' + group + '
'));
summary_display.append(group_container);
$.each(benchmarks, function(i, bm_name) {
- var bm = $.asv.master_json.benchmarks[bm_name];
+ var bm = $.asv.main_json.benchmarks[bm_name];
group_container.append(benchmark_container(bm));
});
});
diff --git a/asv/www/summarylist.js b/asv/www/summarylist.js
index 1cffaf959..e5f9e13c4 100644
--- a/asv/www/summarylist.js
+++ b/asv/www/summarylist.js
@@ -57,7 +57,7 @@ $(document).ready(function() {
var info = $.asv.parse_hash_string(window.location.hash);
var new_state = get_valid_state(state, key, value);
- $.each($.asv.master_json.params, function(param, values) {
+ $.each($.asv.main_json.params, function(param, values) {
if (values.length > 1) {
info.params[param] = [new_state[param]];
}
@@ -101,7 +101,7 @@ $(document).ready(function() {
tmp_state[wanted_key] = wanted_value;
}
- $.each($.asv.master_json.graph_param_list, function(idx, params) {
+ $.each($.asv.main_json.graph_param_list, function(idx, params) {
var diff = obj_diff(tmp_state, params);
var hit = (wanted_key === undefined || params[wanted_key] == wanted_value);
@@ -113,14 +113,14 @@ $(document).ready(function() {
});
if (best_params === null) {
- best_params = $.asv.master_json.graph_param_list[0];
+ best_params = $.asv.main_json.graph_param_list[0];
}
return obj_copy(best_params);
}
function setup_state(state_selection) {
- var index = $.asv.master_json;
+ var index = $.asv.main_json;
var state = {};
state.machine = index.params.machine;
@@ -142,7 +142,7 @@ $(document).ready(function() {
}
function replace_params_ui() {
- var index = $.asv.master_json;
+ var index = $.asv.main_json;
var nav = $('#summarylist-navigation');
nav.empty();
@@ -207,7 +207,7 @@ $(document).ready(function() {
}
function construct_benchmark_table(data) {
- var index = $.asv.master_json;
+ var index = $.asv.main_json;
/* Form a new table */
@@ -234,14 +234,14 @@ $(document).ready(function() {
/* Format benchmark url */
benchmark_url_args.location = [row.name];
benchmark_url_args.params = {};
- $.each($.asv.master_json.params, function (key, values) {
+ $.each($.asv.main_json.params, function (key, values) {
if (values.length > 1) {
benchmark_url_args.params[key] = [state[key]];
}
});
benchmark_base_url = $.asv.format_hash_string(benchmark_url_args);
if (row.idx !== null) {
- var benchmark = $.asv.master_json.benchmarks[row.name];
+ var benchmark = $.asv.main_json.benchmarks[row.name];
$.each($.asv.param_selection_from_flat_idx(benchmark.params, row.idx).slice(1),
function(i, param_values) {
benchmark_url_args.params['p-'+benchmark.param_names[i]]
@@ -281,7 +281,7 @@ $(document).ready(function() {
var value_td = $(' | ');
if (row.last_value !== null) {
var value, err, err_str, sort_value;
- var unit = $.asv.master_json.benchmarks[row.name].unit;
+ var unit = $.asv.main_json.benchmarks[row.name].unit;
value = $.asv.pretty_unit(row.last_value, unit);
if (unit == "seconds") {
sort_value = row.last_value * 1e100;
@@ -311,7 +311,7 @@ $(document).ready(function() {
var change_td = $(' | ');
if (row.prev_value !== null) {
var text, change_str, change = 0, sort_value = 0;
- var unit = $.asv.master_json.benchmarks[row.name].unit;
+ var unit = $.asv.main_json.benchmarks[row.name].unit;
change_str = $.asv.pretty_unit(row.last_value - row.prev_value, unit);
if (!change_str.match(/^-/)) {
change_str = '+' + change_str;
@@ -329,8 +329,8 @@ $(document).ready(function() {
}
text = text.replace('-', '\u2212');
- var change_commit_a = $.asv.master_json.revision_to_hash[row.change_rev[0]];
- var change_commit_b = $.asv.master_json.revision_to_hash[row.change_rev[1]];
+ var change_commit_a = $.asv.main_json.revision_to_hash[row.change_rev[0]];
+ var change_commit_b = $.asv.main_json.revision_to_hash[row.change_rev[1]];
var change_q;
if (change_commit_a === undefined) {
change_q = '&commits=' + change_commit_b;
@@ -360,25 +360,25 @@ $(document).ready(function() {
/* Change date column */
var changed_at_td = $(' | ');
if (row.change_rev !== null) {
- var date = new Date($.asv.master_json.revision_to_date[row.change_rev[1]]);
+ var date = new Date($.asv.main_json.revision_to_date[row.change_rev[1]]);
var commit_1 = $.asv.get_commit_hash(row.change_rev[0]);
var commit_2 = $.asv.get_commit_hash(row.change_rev[1]);
var commit_a = $('');
var span = $('');
if (commit_1) {
var commit_url;
- if ($.asv.master_json.show_commit_url.match(/.*\/\/github.com\//)) {
- commit_url = ($.asv.master_json.show_commit_url + '../compare/'
+ if ($.asv.main_json.show_commit_url.match(/.*\/\/github.com\//)) {
+ commit_url = ($.asv.main_json.show_commit_url + '../compare/'
+ commit_1 + '...' + commit_2);
}
else {
- commit_url = $.asv.master_json.show_commit_url + commit_2;
+ commit_url = $.asv.main_json.show_commit_url + commit_2;
}
commit_a.attr('href', commit_url);
commit_a.text(commit_1 + '...' + commit_2);
}
else {
- commit_a.attr('href', $.asv.master_json.show_commit_url + commit_2);
+ commit_a.attr('href', $.asv.main_json.show_commit_url + commit_2);
commit_a.text(commit_2);
}
span.text($.asv.format_date_yyyymmdd(date) + ' ');
diff --git a/docs/source/asv.conf.json.rst b/docs/source/asv.conf.json.rst
index c7dc60da2..ec57a0085 100644
--- a/docs/source/asv.conf.json.rst
+++ b/docs/source/asv.conf.json.rst
@@ -139,7 +139,7 @@ Branches to generate benchmark results for.
This controls how the benchmark results are displayed, and what
benchmarks ``asv run ALL`` and ``asv run NEW`` run.
-If not provided, "master" (Git) or "default" (Mercurial) is chosen.
+If not provided, "main" (Git) or "default" (Mercurial) is chosen.
``show_commit_url``
-------------------
@@ -156,7 +156,7 @@ For example, if using Github to host your repository, the
-----------
The versions of Python to run the benchmarks in. If not provided, it
will to default to the version of Python that the ``asv`` command
-(master) is being run under.
+(main) is being run under.
If provided, it should be a list of strings. It may be one of the
following:
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 158d6e6bc..0646625cf 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -54,8 +54,8 @@
# The encoding of source files.
# source_encoding = 'utf-8-sig'
-# The master toctree document.
-master_doc = 'index'
+# The root toctree document.
+root_doc = 'index'
# General information about the project.
project = u'airspeed velocity'
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 41e10f57c..23123c930 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -1,4 +1,4 @@
-.. airspeed velocity documentation master file, created by
+.. airspeed velocity documentation root file, created by
sphinx-quickstart on Mon Nov 18 09:12:08 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
diff --git a/pyproject.toml b/pyproject.toml
index d1a299c07..6c389836b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -77,8 +77,8 @@ hg = [
[build-system]
requires = [
"wheel",
- "setuptools>=61.2",
- "setuptools_scm[toml]>=6.2",
+ "setuptools>=64",
+ "setuptools_scm>=6",
]
build-backend = "setuptools.build_meta"
diff --git a/test/test_publish.py b/test/test_publish.py
index 9ee43659b..174e6bbe8 100644
--- a/test/test_publish.py
+++ b/test/test_publish.py
@@ -20,6 +20,8 @@
from . import tools
+pytestmark = pytest.mark.skipif(tools.HAS_PYPY, reason="Flaky on pypy")
+
BENCHMARK_DIR = abspath(join(dirname(__file__), 'benchmark'))
@@ -36,18 +38,18 @@ def test_publish(tmpdir, example_results):
result_files = [fn for fn in os.listdir(join(example_results, 'cheetah'))
if fn.endswith('.json') and fn != 'machine.json']
result_files.sort()
- master_values = list(range(len(result_files) * 2 // 3))
- branch_values = list(range(len(master_values), len(result_files)))
- dvcs = tools.generate_test_repo(tmpdir, master_values, 'git',
+ main_values = list(range(len(result_files) * 2 // 3))
+ branch_values = list(range(len(main_values), len(result_files)))
+ dvcs = tools.generate_test_repo(tmpdir, main_values, 'git',
[(f'{util.git_default_branch()}~6',
'some-branch', branch_values)])
# Copy and modify result files, fixing commit hashes and setting result
# dates to distinguish the two branches
- master_commits = dvcs.get_branch_hashes(f'{util.git_default_branch()}')
+ main_commits = dvcs.get_branch_hashes(f'{util.git_default_branch()}')
only_branch = [x for x in dvcs.get_branch_hashes('some-branch')
- if x not in master_commits]
- commits = master_commits + only_branch
+ if x not in main_commits]
+ commits = main_commits + only_branch
for k, item in enumerate(zip(result_files, commits)):
fn, commit = item
src = join(example_results, 'cheetah', fn)
@@ -99,12 +101,12 @@ def check_file(branch, cython):
data = util.load_json(fn)
data_commits = [revision_to_hash[x[0]] for x in data]
if branch == f'{util.git_default_branch()}':
- assert all(c in master_commits for c in data_commits)
+ assert all(c in main_commits for c in data_commits)
else:
# Must contains commits from some-branch
assert any(c in only_branch for c in data_commits)
- # And commits from master
- assert any(c in master_commits for c in data_commits)
+ # And commits from main
+ assert any(c in main_commits for c in data_commits)
# Check that revisions are strictly increasing
assert all(x[0] < y[0] for x, y in zip(data, data[1:]))
@@ -149,10 +151,10 @@ def check_file(branch, cython):
def _graph_path(dvcs_type):
if dvcs_type == "git":
- master = f"{util.git_default_branch()}"
+ main = f"{util.git_default_branch()}"
elif dvcs_type == "hg":
- master = "default"
- return join("graphs", f"branch-{master}", "machine-tarzan", "time_func.json")
+ main = "default"
+ return join("graphs", f"branch-{main}", "machine-tarzan", "time_func.json")
def test_publish_range_spec(generate_result_dir):
@@ -260,40 +262,40 @@ def test_regression_parameterized(generate_result_dir):
def test_regression_multiple_branches(dvcs_type, tmpdir):
tmpdir = str(tmpdir)
if dvcs_type == "git":
- master = f"{util.git_default_branch()}"
+ main = f"{util.git_default_branch()}"
elif dvcs_type == "hg":
- master = "default"
+ main = "default"
dvcs = tools.generate_repo_from_ops(
tmpdir, dvcs_type, [
("commit", 1),
- ("checkout", "stable", master),
+ ("checkout", "stable", main),
("commit", 1),
- ("checkout", master),
+ ("checkout", main),
] + 4 * [
("commit", 1),
("checkout", "stable"),
("commit", 1),
- ("checkout", master),
+ ("checkout", main),
] + 5 * [
("commit", 1),
("checkout", "stable"),
("commit", 2),
- ("checkout", master),
+ ("checkout", main),
],
)
commit_values = {}
branches = dict(
(branch, list(reversed(dvcs.get_branch_hashes(branch))))
- for branch in (master, "stable")
+ for branch in (main, "stable")
)
for branch, values in (
- (master, 10 * [1]),
+ (main, 10 * [1]),
("stable", 5 * [1] + 5 * [2]),
):
for commit, value in zip(branches[branch], values):
commit_values[commit] = value
conf = tools.generate_result_dir(tmpdir, dvcs, commit_values)
- conf.branches = [master, "stable"]
+ conf.branches = [main, "stable"]
tools.run_asv_with_conf(conf, "publish")
repo = get_repo(conf)
regressions = util.load_json(join(conf.html_dir, "regressions.json"))
diff --git a/test/test_repo.py b/test/test_repo.py
index 548cebdff..a3f380b2e 100644
--- a/test/test_repo.py
+++ b/test/test_repo.py
@@ -16,8 +16,10 @@
from . import tools
+pytestmark = pytest.mark.skipif(tools.HAS_PYPY, reason="Randomly times out on pypy")
-def _test_generic_repo(conf, tmpdir, hash_range, master, branch, is_remote=False):
+
+def _test_generic_repo(conf, tmpdir, hash_range, main, branch, is_remote=False):
workcopy_dir = tempfile.mkdtemp(dir=tmpdir, prefix="workcopy")
os.rmdir(workcopy_dir)
@@ -35,7 +37,7 @@ def _test_generic_repo(conf, tmpdir, hash_range, master, branch, is_remote=False
r = repo.get_repo(conf)
# Subrepo creation
- r.checkout(workcopy_dir, master)
+ r.checkout(workcopy_dir, main)
assert os.path.exists(join(workcopy_dir, "setup.py"))
for filename in ("README", "untracked"):
@@ -49,14 +51,14 @@ def _test_generic_repo(conf, tmpdir, hash_range, master, branch, is_remote=False
data = fd.read(33)
assert data == b"This is the asv_test_repo project"
- r.checkout(workcopy_dir, master)
+ r.checkout(workcopy_dir, main)
# check recovering from corruption
for pth in ['.hg', '.git']:
pth = os.path.join(workcopy_dir, pth)
if os.path.isdir(pth):
shutil.rmtree(pth)
- r.checkout(workcopy_dir, master)
+ r.checkout(workcopy_dir, main)
hashes = r.get_hashes_from_range(hash_range)
assert len(hashes) == 4
@@ -170,7 +172,7 @@ def test_it(is_remote=False):
conf.project = mirror_dir
conf.repo = dvcs.path
_test_generic_repo(conf, tmpdir, hash_range="reverse(default~3::default)",
- master="default", branch="tag5",
+ main="default", branch="tag5",
is_remote=is_remote)
conf.branches = ['default', 'somebranch']
@@ -204,9 +206,9 @@ def test_it(is_remote=False):
def test_get_branch_commits(two_branch_repo_case):
# Test that get_branch_commits() return an ordered list of commits (last
# first) and follow first parent in case of merge
- dvcs, master, r, conf = two_branch_repo_case
+ dvcs, main, r, conf = two_branch_repo_case
expected = {
- master: [
+ main: [
"Revision 6",
"Revision 4",
"Merge stable",
@@ -244,7 +246,7 @@ def test_get_branch_commits(two_branch_repo_case):
(["Revision 6"], ["Revision 5", "Merge master", "Revision 2", "Revision 1"]),
], ids=["all", "new", "no-new", "new-branch-added-in-config"])
def test_get_new_branch_commits(two_branch_repo_case, existing, expected):
- dvcs, master, r, conf = two_branch_repo_case
+ dvcs, main, r, conf = two_branch_repo_case
existing_commits = set()
for branch in conf.branches:
diff --git a/test/test_run.py b/test/test_run.py
index 2558f5aa2..f603f3b77 100644
--- a/test/test_run.py
+++ b/test/test_run.py
@@ -48,7 +48,7 @@ def test_run_spec(basic_conf_2):
conf.repo = dvcs.path
initial_commit = dvcs.get_hash(f"{util.git_default_branch()}~1")
- master_commit = dvcs.get_hash(f"{util.git_default_branch()}")
+ main_commit = dvcs.get_hash(f"{util.git_default_branch()}")
branch_commit = dvcs.get_hash("some-branch")
template_dir = os.path.join(tmpdir, "results_workflow_template")
results_dir = os.path.join(tmpdir, 'results_workflow')
@@ -90,15 +90,15 @@ def _test_run(range_spec, branches, expected_commits):
assert set(result_files) == expected
for branches, expected_commits in (
- # Without branches in config, shoud just use master
- ([None], [initial_commit, master_commit]),
+ # Without branches in config, shoud just use main
+ ([None], [initial_commit, main_commit]),
# With one branch in config, should just use that branch
(["some-branch"], [initial_commit, branch_commit]),
# With two branch in config, should apply to specified branches
([f"{util.git_default_branch()}", "some-branch"],
- [initial_commit, master_commit, branch_commit]),
+ [initial_commit, main_commit, branch_commit]),
):
for range_spec in (None, "NEW", "ALL"):
_test_run(range_spec, branches, expected_commits)
@@ -310,6 +310,7 @@ def check_env_matrix(env_build, env_nobuild):
check_env_matrix({'SOME_TEST_VAR': ['1', '2']}, {})
+@pytest.mark.skipif(tools.HAS_PYPY, reason="Times out randomly on pypy")
def test_parallel(basic_conf_2, dummy_packages):
tmpdir, local, conf, machine_file = basic_conf_2
diff --git a/test/tools.py b/test/tools.py
index ecf5a280f..dd6eb2eb3 100644
--- a/test/tools.py
+++ b/test/tools.py
@@ -361,7 +361,7 @@ def generate_test_repo(tmpdir, values=[0], dvcs_type='git',
extra_branches : list of (start_commit, branch_name, values)
Additional branches to generate in the repository.
For branch start commits, use relative references, e.g.,
- the format 'master~10' or 'default~10' works both for Hg
+ the format 'main~10' or 'default~10' works both for Hg
and Git.
subdir
A relative subdirectory inside the repository to copy the