Skip to content

Commit

Permalink
Merge pull request #8364 from vega/next
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Aug 15, 2022
2 parents c59f88e + 1102bf3 commit d1cf08a
Show file tree
Hide file tree
Showing 171 changed files with 1,412 additions and 668 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/check-toc.yml
@@ -0,0 +1,53 @@
name: Check

on:
workflow_dispatch:
pull_request:
paths:
- 'site/**'
- 'scripts/**'

jobs:
toc:
name: TOC
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'

- name: Setup data
run: yarn data

- name: Build Jekyll
run: |
gem install bundler
pushd site
bundle install
bundle exec jekyll build -q
popd
- name: Build TOC
run: scripts/generate-toc

- name: Setup Git remote
run: scripts/setup-git-ci.sh

- name: Check and Commit
run: scripts/check-and-commit-toc.sh
56 changes: 6 additions & 50 deletions .github/workflows/check.yml
@@ -1,9 +1,8 @@
name: Check

on:
push:
branches:
- '**'
workflow_dispatch:
pull_request:

jobs:
check:
Expand All @@ -14,6 +13,7 @@ jobs:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Node
uses: actions/setup-node@v3
Expand All @@ -35,60 +35,16 @@ jobs:
sudo mv parallel sem /usr/local/bin
- name: Format
if: github.ref != 'refs/heads/next'
run: yarn format

- name: Build Schema
run: yarn schema

- name: Check Schema
run: ./scripts/check-schema.sh
run: scripts/check-schema.sh

- name: Setup Git remote
run: ./scripts/setup-git-ci.sh
run: scripts/setup-git-ci.sh

- name: Check and Commit
run: ./scripts/check-and-commit.sh

toc:
name: TOC
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'

- name: Setup data
run: yarn data

- name: Build Jekyll
run: |
gem install bundler
pushd site
bundle install
bundle exec jekyll build -q
popd
- name: Build TOC
run: scripts/generate-toc

- name: Setup Git remote
run: ./scripts/setup-git-ci.sh

- name: Check and Commit
run: ./scripts/check-and-commit-toc.sh
run: scripts/check-and-commit.sh
3 changes: 3 additions & 0 deletions .github/workflows/merge-dependabot.yml
@@ -1,7 +1,10 @@
name: Auto-merge Dependabot PRs

on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'

jobs:
auto_merge:
name: Auto-merge Dependabot PRs
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/publish-to-npm.yml
Expand Up @@ -7,28 +7,39 @@ on:
- 'dependabot/**'
# documentation site should not trigger releases
- 'gh-pages'
paths-ignore:
- 'site/**'

jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"

name: Make a release and publish to NPM

steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install Node dependencies
run: yarn --frozen-lockfile

- run: npm run release
- name: Build
run: yarn build

- name: Check NPM deployment
run: ./scripts/check-npm.sh

- name: Create release
run: npm run shipit
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
16 changes: 7 additions & 9 deletions .github/workflows/release-docs-and-schema.yml
Expand Up @@ -15,14 +15,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- name: Setup Git remote
run: ./scripts/setup-git-ci.sh
run: scripts/setup-git-ci.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -34,13 +39,6 @@ jobs:
env:
GH_PAT: ${{ secrets.GH_PAT }}

- name: Check NPM deployment
run: ./scripts/check-npm.sh

- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'

- name: Prebuild website
run: yarn predeploy:site

Expand All @@ -51,4 +49,4 @@ jobs:
site-directory: 'site/'

- name: Publish schema
run: ./scripts/deploy-schema.sh
run: scripts/deploy-schema.sh
31 changes: 31 additions & 0 deletions .github/workflows/test-docs.yml
@@ -0,0 +1,31 @@
name: Test

on:
workflow_dispatch:
pull_request:
paths:
- 'site/**'
- 'yarn.lock'
- '**prettier**'

jobs:
build-site:
name: Build Site
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Lint
run: yarn prettierbase --check

- name: Build
run: yarn build:site
36 changes: 9 additions & 27 deletions .github/workflows/test.yml
@@ -1,13 +1,13 @@
name: Test

on:
push:
branches:
- next
workflow_dispatch:
pull_request:
paths-ignore:
- 'site/**'

jobs:
test-matrix:
test:
name: Node
runs-on: ubuntu-latest

Expand All @@ -31,8 +31,8 @@ jobs:
- name: Build
run: yarn build

build-site:
name: Build Site
runtime-lint-coverage:
name: Runtime, Linting, and Coverage
runs-on: ubuntu-latest

steps:
Expand All @@ -46,24 +46,6 @@ jobs:
- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build:site

runtime-lint-coverage:
name: Runtime, Linting, and Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install extra dependencies for Puppeteer
run: sudo apt-get install libgbm1

Expand Down Expand Up @@ -95,14 +77,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install Node dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build:only

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Expand Up @@ -200,6 +200,7 @@ Publishing is handled by a 2-branch [pre-release process](https://intuit.github.
- When merging into `next`, please use the `squash and merge` strategy.
- To release a new stable version, open a PR from `next` into `stable` using this [compare link](https://github.com/vega/vega-lite/compare/stable...next).
- When merging from `next` into `stable`, please use the `create a merge commit` strategy.
- After the release note is generated (from commits), please take a look to clean up so the log is readable to the community.

## Suggested Programming Environment.

Expand Down
4 changes: 4 additions & 0 deletions build/vega-lite-schema.json
Expand Up @@ -7725,6 +7725,10 @@
"description": "Default time format for raw time values (without time units) in text marks, legend labels and header labels.\n\n__Default value:__ `\"%b %d, %Y\"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.",
"type": "string"
},
"timeFormatType": {
"description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.timeFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is exposed as [`timeFormat` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined to use this feature.",
"type": "string"
},
"title": {
"$ref": "#/definitions/TitleConfig",
"description": "Title configuration, which determines default properties for all [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](https://vega.github.io/vega-lite/docs/title.html#config)."
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/arc_ordinal_theta.vg.json
Expand Up @@ -57,7 +57,7 @@
"endAngle": {
"scale": "theta",
"field": "dir",
"offset": {"scale": "theta", "band": 1}
"offset": {"signal": "max(0.25, bandwidth('theta'))"}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/bar.vg.json
Expand Up @@ -60,7 +60,7 @@
"signal": "\"a: \" + (isValid(datum[\"a\"]) ? datum[\"a\"] : \"\"+datum[\"a\"]) + \"; b: \" + (format(datum[\"b\"], \"\"))"
},
"x": {"scale": "x", "field": "a"},
"width": {"scale": "x", "band": 1},
"width": {"signal": "max(0.25, bandwidth('x'))"},
"y": {"scale": "y", "field": "b_end"},
"y2": {"scale": "y", "field": "b_start"}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/bar_aggregate.vg.json
Expand Up @@ -49,7 +49,7 @@
"x": {"scale": "x", "field": "sum_people"},
"x2": {"scale": "x", "value": 0},
"y": {"scale": "y", "field": "age"},
"height": {"scale": "y", "band": 1}
"height": {"signal": "max(0.25, bandwidth('y'))"}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/bar_aggregate_format.vg.json
Expand Up @@ -49,7 +49,7 @@
"x": {"scale": "x", "field": "sum_people"},
"x2": {"scale": "x", "value": 0},
"y": {"scale": "y", "field": "age"},
"height": {"scale": "y", "band": 1}
"height": {"signal": "max(0.25, bandwidth('y'))"}
}
}
}
Expand Down

0 comments on commit d1cf08a

Please sign in to comment.