Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 44 additions & 97 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Checkout
uses: actions/checkout@v2
with:
repository: 'bqplot/bqplot'
path: 'bqplot'

- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-environment: bqplot-gl-test
environment-name: bqplot-gl-test
environment-file: test-environment.yml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
auto-activate-base: false
channels: conda-forge

- name: Install bqplot
run: pip install .
working-directory: bqplot

- name: Yarn build bqplot
run: |
yarn install
yarn run build
working-directory: bqplot/js

- name: Yarn install bqplot-gl
run: yarn install

- name: Patch node_modules/bqplot
run: |
rm -rf bqplot
ln -s $GITHUB_WORKSPACE/bqplot/js bqplot
ls bqplot
working-directory: node_modules

- name: Yarn build
run: yarn run build
run: pip install --pre bqplot

- name: Install bqplot-gl
run: pip install .
run: pip install . -vvv

- name: Test installation files
run: |
Expand All @@ -82,76 +53,34 @@ jobs:
run: flake8 bqplot_gl --ignore=E501,W504,W503

- name: JavaScript prettyfier
run: yarn run prettier:check

- name: JavaScript tests
run: yarn run test

- name: Install Galata
run: yarn install
working-directory: ui-tests

- name: Launch JupyterLab
run: yarn run start-jlab:detached
working-directory: ui-tests

- name: Wait for JupyterLab
uses: ifaxity/wait-on-action@v1
with:
resource: http-get://localhost:8888/api
timeout: 20000

- name: Run UI Tests
run: yarn run test
working-directory: ui-tests

- name: Upload UI Test artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: ui-test-output
path: ui-tests/test-output
run: jlpm run prettier:check

- name: Build Python package
run: |
python setup.py sdist bdist_wheel
cd dist
sha256sum * | tee SHA256SUMS

- name: Pack JavaScript package
run: |
yarn pack
mv bqplot*.tgz ../dist
run: python -m build

- name: Upload builds
uses: actions/upload-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist

install:
runs-on: ${{ matrix.os }}-latest
visual-regression-tests:
runs-on: ubuntu-latest
needs: [build]

strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.9']

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-environment: bqplot-gl-test
environment-name: bqplot-gl-test
environment-file: test-environment.yml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
auto-activate-base: false
channels: conda-forge

- uses: actions/download-artifact@v2
Expand All @@ -164,17 +93,35 @@ jobs:
cd dist
pip install -vv bqplot*.whl

- name: Test installation files
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl
test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl
test -f $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl/package.json
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl/static

- name: Validate the nbextension
run: jupyter nbextension list 2>&1 | grep "bqplot-gl/extension"

- name: Validate the labextension
run: jupyter labextension list 2>&1 | grep bqplot-gl
- name: Install dependencies
shell: bash -l {0}
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

- name: Install browser
shell: bash -l {0}
run: npx playwright install chromium
working-directory: ui-tests

- name: Execute integration tests
shell: bash -l {0}
working-directory: ui-tests
run: npx playwright test

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v3
with:
name: bqplot-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,5 @@ bqplot_gl/labextension/*.tgz
bqplot_gl/labextension

ui-tests/test-output/*
ui-tests/test-results/*
ui-tests/playwright-report/*
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules
enableImmutableInstalls: false
40 changes: 0 additions & 40 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion bqplot_gl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Distributed under the terms of the Modified BSD License.

from .marks import * # noqa
from ._version import __version__, version_info # noqa
from ._version import __version__ # noqa


def _jupyter_labextension_paths():
Expand Down
3 changes: 1 addition & 2 deletions bqplot_gl/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
# Copyright (c) The bqplot Development Team.
# Distributed under the terms of the Modified BSD License.

version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
__version__ = "0.1.0"
51 changes: 16 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@
"url": "https://github.com/bqplot/bqplot-gl"
},
"scripts": {
"build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension:dev",
"build:prod": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension",
"build": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension:dev",
"build:prod": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension",
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc",
"build:nbextension": "webpack",
"clean": "yarn run clean:lib && yarn run clean:nbextension && yarn run clean:labextension",
"clean": "jlpm run clean:lib && jlpm run clean:nbextension && jlpm run clean:labextension",
"clean:lib": "rimraf lib",
"clean:labextension": "rimraf bqplot-gl/labextension",
"clean:nbextension": "rimraf bqplot-gl/nbextension/static/index.js",
"prepack": "yarn run build:lib",
"test": "karma start --single-run",
"prepack": "jlpm run build:lib",
"watch": "npm-run-all -p watch:*",
"watch:lib": "tsc -w",
"watch:nbextension": "webpack --watch --mode=development",
Expand All @@ -51,56 +50,38 @@
"eslint:fix": "eslint src --ext .ts --fix"
},
"dependencies": {
"@jupyter-widgets/base": "^1.1.10 || ^2.0.0 || ^3.0.0 || ^4.0.0",
"bqplot": "^0.5.31",
"bqscales": "^0.2.2",
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6",
"@lumino/application": "^1 || ^2",
"@lumino/widgets": "^1 || ^2",
"@types/underscore": "^1.11.5",
"bqplot": "^0.6.0-alpha.0",
"bqscales": "^0.3.2",
"d3": "^5.7.0",
"is-typedarray": "^1.0.0",
"lodash": "^4.17.21",
"three": "^0.91.0"
"three": "^0.91.0",
"underscore": "^1.13.6"
},
"devDependencies": {
"@jupyter-widgets/controls": "^1.5.0 || ^2 || ^3",
"@babel/core": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@babel/preset-typescript": "^7.15.0",
"@jupyterlab/builder": "^3.0.0",
"@phosphor/application": "^1.6.0",
"@phosphor/widgets": "^1.6.0",
"@types/chai": "^4.1.7",
"@jupyter-widgets/base-manager": "^1.0.0",
"@jupyter-widgets/controls": "^5",
"@jupyterlab/builder": "^4",
"@types/d3": "^5.7.2",
"@types/expect.js": "^0.3.29",
"@types/mocha": "^7.0.2",
"@types/sinon": "^9.0.0",
"@types/node": "^13.13.2",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.3",
"chai": "^4.1.2",
"acorn": "^7.2.0",
"css-loader": "^3.2.0",
"eslint": "^7.4.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1",
"karma": "^5.0.2",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^2.0.0",
"karma-mocha-reporter": "^2.2.5",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.7",
"karma-typescript": "^5.0.2",
"karma-typescript-es6-transform": "^5.0.2",
"karma-webpack": "^5.0.0",
"mocha": "^7.1.1",
"fs-extra": "^7.0.0",
"identity-obj-proxy": "^3.0.0",
"mkdirp": "^0.5.1",
"npm-run-all": "^4.1.3",
"prettier": "^2.0.5",
"raw-loader": "~4.0.1",
"rimraf": "^2.6.2",
"sinon": "^9.0.2",
"sinon-chai": "^3.3.0",
"source-map-loader": "^1.1.3",
"style-loader": "^1.0.0",
"ts-loader": "^8.0.0",
Expand Down
Loading