Skip to content

Commit

Permalink
Change to using main instead of master as the default branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arindam Bose committed Jun 18, 2020
1 parent ada2446 commit 1299199
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ workflows:
tags:
ignore: /.*/
branches:
only: master
only: main
- test-flow:
requires:
- prepare
Expand Down Expand Up @@ -86,7 +86,7 @@ workflows:
only: /v[0-9]+.[0-9]+.[0-9]+(-.+)?/
branches:
only:
- master
- main
- /release-.*/
- deploy-release:
requires:
Expand Down Expand Up @@ -158,10 +158,10 @@ jobs:
- run: yarn run build-flow-types
- run: yarn run test-build
- deploy:
name: Trigger memory metrics when merging to master
name: Trigger memory metrics when merging to main
command: |
if [ -n "${WEB_METRICS_TOKEN}" ]; then
if [[ $CIRCLE_BRANCH == master ]]; then
if [[ $CIRCLE_BRANCH == main ]]; then
curl -X POST https://circleci.com/api/v1.1/project/github/mapbox/web-metrics/build?circle-token=${WEB_METRICS_TOKEN}
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Vector tiles are fetched and parsed on WebWorker threads. "Parsing" a vector ti

`WorkerTile#parse()` takes a (deserialized) vector tile, fetches additional resources if they're needed (fonts, images), and then creates a `Bucket` for each 'family' of style layers that share the same underlying features and 'layout' properties (see `group_by_layout.js`).

[Bucket](https://github.com/mapbox/mapbox-gl-js/blob/master/src/data/bucket.js) is the single point of knowledge about turning vector tiles into WebGL buffers. Each bucket holds the vertex and element array data needed to render its group of style layers (see [ArrayGroup](https://github.com/mapbox/mapbox-gl-js/blob/master/src/data/bucket.js)). The particular bucket types each know how to populate that data for their layer types.
[Bucket](./src/data/bucket.js) is the single point of knowledge about turning vector tiles into WebGL buffers. Each bucket holds the vertex and element array data needed to render its group of style layers (see [ArrayGroup](./src/data/bucket.js)). The particular bucket types each know how to populate that data for their layer types.

### Rendering with WebGL

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This release significantly refactors and improves gesture handling on desktop an
* Fix a bug [#9468](https://github.com/mapbox/mapbox-gl-js/issues/9468) in which an exception would get thrown when updating symbol layer paint property using `setPaintProperty`.

## 1.9.0
With this release, we're adding [a new changelog policy](https://github.com/mapbox/mapbox-gl-js/blob/master/CONTRIBUTING.md#changelog-conventions) to our contribution guidelines.
With this release, we're adding [a new changelog policy](./CONTRIBUTING.md#changelog-conventions) to our contribution guidelines.

This release also fixes several long-standing bugs and unintentional rendering behavior with `line-pattern`. The fixes come with a visual change to how patterns added with `line-pattern` scale. Previously, patterns that became larger than the line would be clipped, sometimes distorting the pattern, particularly on mobile and retina devices. Now the pattern will be scaled to fit under all circumstances. [#9266](https://github.com/mapbox/mapbox-gl-js/pull/9266) showcases examples of the visual differences. For more information and to provide feedback on this change, see [#9394](https://github.com/mapbox/mapbox-gl-js/pull/9394).

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ Once those commands finish, you will have a standalone build at `dist/mapbox-gl.

## Writing & Running Tests

See [`test/README.md`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/README.md).
See [`test/README.md`](./test/README.md).

## Writing & Running Benchmarks

See [`bench/README.md`](https://github.com/mapbox/mapbox-gl-js/blob/master/bench/README.md).
See [`bench/README.md`](./bench/README.md).

## Code Conventions

Expand Down Expand Up @@ -142,7 +142,7 @@ Here is a recommended way to get setup:
4. Add the Mapbox repository as an upstream repository: `git remote add upstream git@github.com:mapbox/mapbox-gl-js.git`
5. Create a new branch `git checkout -b your-branch` for your contribution
6. Write code, open a PR from your branch when you're ready
7. If you need to rebase your fork's PR branch onto master to resolve conflicts: `git fetch upstream`, `git rebase upstream/master` and force push to Github `git push --force origin your-branch`
7. If you need to rebase your fork's PR branch onto main to resolve conflicts: `git fetch upstream`, `git rebase upstream/main` and force push to Github `git push --force origin your-branch`

## Changelog Conventions

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ native SDKs. For code and issues specific to the native SDKs, see the
- [Examples](https://docs.mapbox.com/mapbox-gl-js/examples/)
- [Style documentation](https://docs.mapbox.com/mapbox-gl-js/style-spec/)
- [Open source styles](https://github.com/mapbox/mapbox-gl-styles)
- [Contributor documentation](https://github.com/mapbox/mapbox-gl-js/blob/master/CONTRIBUTING.md)
- [Contributor documentation](./CONTRIBUTING.md)

[<img width="981" alt="Mapbox GL gallery" src="https://raw.githubusercontent.com/mapbox/mapbox-gl-js-docs/publisher-production/docs/pages/assets/gallery.png">](https://www.mapbox.com/gallery/)

## License

Mapbox GL JS is licensed under the [3-Clause BSD license](https://github.com/mapbox/mapbox-gl-js/blob/master/LICENSE.txt).
Mapbox GL JS is licensed under the [3-Clause BSD license](./LICENSE.txt).
The licenses of its dependencies are tracked via [FOSSA](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fmapbox-gl-js):

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fmapbox-gl-js.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fmapbox-gl-js?ref=badge_large)
2 changes: 1 addition & 1 deletion bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To run all benchmarks, open [the benchmark page, `http://localhost:9966/bench/ve

To run a specific benchmark, add its name to the url hash, for example [`http://localhost:9966/bench/versions#Layout`](http://localhost:9966/bench/versions#Layout).

By default, the benchmark page will compare the local branch against `master` and the latest release. To change this, include one or more `compare` query parameters in the URL: E.g., [localhost:9966/bench/versions?compare=master](http://localhost:9966/bench/versions?compare=master) or [localhost:9966/bench/versions?compare=master#Layout](http://localhost:9966/bench/versions?compare=master#Layout) to compare only to master, or [localhost:9966/bench/versions?compare=v0.44.0&compare=v0.44.1](http://localhost:9966/bench/versions?compare=v0.44.0&compare=v0.44.1) to compare to `v0.44.0` and `v0.44.1` (but not `master`). Versions available for comparison are: `master` and `vX.Y.Z` for versions >= `v0.41.0`.
By default, the benchmark page will compare the local branch against `main` and the latest release. To change this, include one or more `compare` query parameters in the URL: E.g., [localhost:9966/bench/versions?compare=main](http://localhost:9966/bench/versions?compare=main) or [localhost:9966/bench/versions?compare=main#Layout](http://localhost:9966/bench/versions?compare=main#Layout) to compare only to main, or [localhost:9966/bench/versions?compare=v0.44.0&compare=v0.44.1](http://localhost:9966/bench/versions?compare=v0.44.0&compare=v0.44.1) to compare to `v0.44.0` and `v0.44.1` (but not `main`). Versions available for comparison are: `main` and `vX.Y.Z` for versions >= `v0.41.0`.

## Running Style Benchmarks

Expand Down
18 changes: 9 additions & 9 deletions bench/benchmarks_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,31 +365,31 @@ class BenchmarkRow extends React.Component {
render() {
const endedCount = this.props.versions.filter(version => version.status === 'ended').length;

let master;
let main;
let current;
if (/master/.test(this.props.versions[0].name)) {
[master, current] = this.props.versions;
if (/main/.test(this.props.versions[0].name)) {
[main, current] = this.props.versions;
} else {
[current, master] = this.props.versions;
[current, main] = this.props.versions;
}

let change;
let pInferiority;
if (endedCount === 2) {
const delta = current.summary.trimmedMean - master.summary.trimmedMean;
const delta = current.summary.trimmedMean - main.summary.trimmedMean;
// Use "Cohen's d" (modified to used the trimmed mean/sd) to decide
// how much to emphasize difference between means
// https://en.wikipedia.org/wiki/Effect_size#Cohen.27s_d
const pooledDeviation = Math.sqrt(
(
(master.samples.length - 1) * Math.pow(master.summary.windsorizedDeviation, 2) +
(main.samples.length - 1) * Math.pow(main.summary.windsorizedDeviation, 2) +
(current.samples.length - 1) * Math.pow(current.summary.windsorizedDeviation, 2)
) /
(master.samples.length + current.samples.length - 2)
(main.samples.length + current.samples.length - 2)
);
const d = delta / pooledDeviation;

const {superior, inferior} = probabilitiesOfSuperiority(master.samples, current.samples);
const {superior, inferior} = probabilitiesOfSuperiority(main.samples, current.samples);

change = <span className={d < 0.2 ? 'quiet' : d < 1.5 ? '' : 'strong'}>(
{delta > 0 ? '+' : ''}{formatSample(delta)} ms / {d.toFixed(1)} std devs
Expand All @@ -400,7 +400,7 @@ class BenchmarkRow extends React.Component {
pInferiority = <p className={`center ${probability > 0.90 ? 'strong' : 'quiet'}`}>
{(probability * 100).toFixed(0)}%
chance that a random <svg width={8} height={8}><circle fill={versionColor(current.name)} cx={4} cy={4} r={4} /></svg> sample is
{comparison} than a random <svg width={8} height={8}><circle fill={versionColor(master.name)} cx={4} cy={4} r={4} /></svg> sample.
{comparison} than a random <svg width={8} height={8}><circle fill={versionColor(main.name)} cx={4} cy={4} r={4} /></svg> sample.
</p>;
}

Expand Down
2 changes: 1 addition & 1 deletion bench/versions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
params.getAll('compare').filter(Boolean) :
fetch('https://api.github.com/repos/mapbox/mapbox-gl-js/releases/latest')
.then(response => response.json())
.then(pkg => [pkg['tag_name'], 'master']))
.then(pkg => [pkg['tag_name'], 'main']))
.then(versions => {
return versions
.map(v => `https://s3.amazonaws.com/mapbox-gl-js/${v}/benchmarks.js`)
Expand Down
4 changes: 2 additions & 2 deletions build/check-bundle-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ function getMergeBase() {
});
} else {
// Walk backward through the history (maximum of 10 commits) until
// finding a commit on either master or release-*; assume that's the
// finding a commit on either main or release-*; assume that's the
// base branch.
const head = process.env['CIRCLE_SHA1'];
for (const sha of execSync(`git rev-list --max-count=10 ${head}`).toString().trim().split('\n')) {
const base = execSync(`git branch -r --contains ${sha} origin/master origin/release-* origin/publisher-production`).toString().split('\n')[0].trim().replace(/^origin\//, '');
const base = execSync(`git branch -r --contains ${sha} origin/main origin/release-* origin/publisher-production`).toString().split('\n')[0].trim().replace(/^origin\//, '');
if (base) {
return Promise.resolve(execSync(`git merge-base origin/${base} ${head}`).toString().trim());
}
Expand Down
2 changes: 1 addition & 1 deletion src/shaders/hillshade.fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void main() {

// We scale the slope exponentially based on intensity, using a calculation similar to
// the exponential interpolation function in the style spec:
// https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228
// src/style-spec/expression/definitions/interpolate.js#L217-L228
// so that higher intensity values create more opaque hillshading.
float base = 1.875 - intensity * 1.75;
float maxValue = 0.5 * PI;
Expand Down
2 changes: 1 addition & 1 deletion src/shaders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// It provides the shaders entry point for Node (tests and GL Native)
// In a browser environment, this file is replaced with ./src/shaders/shaders.js
// when Rollup builds the main bundle.
// See https://github.com/mapbox/mapbox-gl-js/blob/master/package.json#L104-L108
// See package.json#browser

/* eslint-disable import/unambiguous, import/no-commonjs, flowtype/require-valid-file-annotation, no-global-assign */

Expand Down
2 changes: 1 addition & 1 deletion src/util/web_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// It implements a MessageBus main thread interface for use in Node environments
// In a browser environment, this file is replaced with ./src/util/browser/web_worker.js
// when Rollup builds the main bundle.
// See https://github.com/mapbox/mapbox-gl-js/blob/master/package.json#L104-L108
// See package.json#browser

import Worker from '../source/worker';

Expand Down
2 changes: 1 addition & 1 deletion src/util/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// It implements a JSDOM window object for use in Node environments
// In a browser environment, this file is replaced with ./src/util/browser/window.js
// when Rollup builds the main bundle
// See https://github.com/mapbox/mapbox-gl-js/blob/master/package.json#L104-L108
// See package.json#browser

import jsdom from 'jsdom';

Expand Down
6 changes: 3 additions & 3 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Running Tests

First you must configure your development environment per [`../CONTRIBUTING.md`](https://github.com/mapbox/mapbox-gl-js/blob/master/CONTRIBUTING.md)
First you must configure your development environment per [`../CONTRIBUTING.md`](../CONTRIBUTING.md)

There are two test suites associated with Mapbox GL JS

Expand All @@ -18,7 +18,7 @@ There are two test suites associated with Mapbox GL JS

## Integration Tests

See [`test/integration/README.md`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/integration/README.md).
See [`test/integration/README.md`](./integration/README.md).

## Writing Unit Tests

Expand All @@ -31,7 +31,7 @@ See [`test/integration/README.md`](https://github.com/mapbox/mapbox-gl-js/blob/m

## Browser Tests

See [`test/browser/README.md`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/browser/README.md).
See [`test/browser/README.md`](./browser/README.md).

## Spies, Stubs, and Mocks

Expand Down
6 changes: 3 additions & 3 deletions test/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ These integration tests verify the correctness and consistency of [mapbox-gl-js]
## Organization

Tests are contained in a directory tree, generally organized by [style specification](https://github.com/mapbox/mapbox-gl-style-spec)
property: `background-color`, `line-width`, etc., with a second level of directories below that for individual tests. For example, the test for specifying a literal `circle-radius` value lives in [`test/integration/render-tests/circle-radius/literal/`](https://github.com/mapbox/mapbox-gl-js/tree/master/test/integration/render-tests/circle-radius/literal).
property: `background-color`, `line-width`, etc., with a second level of directories below that for individual tests. For example, the test for specifying a literal `circle-radius` value lives in [`test/integration/render-tests/circle-radius/literal/`](./render-tests/circle-radius/literal).

Within a leaf directory is a `style.json` file (e.g. [`circle-radius/literal/style.json`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/integration/render-tests/circle-radius/literal/style.json)), which contains the minimal style needed for the given test case. The style can specify the map size, center, bearing, and pitch, and additional test metadata (e.g. output image dimensions).
Within a leaf directory is a `style.json` file (e.g. [`circle-radius/literal/style.json`](./render-tests/circle-radius/literal/style.json)), which contains the minimal style needed for the given test case. The style can specify the map size, center, bearing, and pitch, and additional test metadata (e.g. output image dimensions).

The expected output for a given test case is in `expected.png`, e.g. [`circle-radius/literal/expected.png`](https://github.com/mapbox/mapbox-gl-js/blob/master/test/integration/render-tests/circle-radius/literal/expected.png).
The expected output for a given test case is in `expected.png`, e.g. [`circle-radius/literal/expected.png`](./render-tests/circle-radius/literal/expected.png).

Supporting files -- glyphs, sprites, and tiles -- live in their own respective subdirectories at the top level. The test
harness sets up the environment such that requests for these resources are directed to the correct location.
Expand Down

0 comments on commit 1299199

Please sign in to comment.