Skip to content

Commit 239bd0b

Browse files
authored
Merge pull request #15 from martinRenou/rebuild
Rebuild against bqplot 0.13, JupyterLab 4, ipywidgets 8 + Hatch migration
2 parents 7e01ff9 + d11df3a commit 239bd0b

File tree

118 files changed

+12195
-15074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+12195
-15074
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,18 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v2
2323

24-
- name: Checkout
25-
uses: actions/checkout@v2
26-
with:
27-
repository: 'bqplot/bqplot'
28-
path: 'bqplot'
29-
30-
- name: Setup conda
31-
uses: conda-incubator/setup-miniconda@v2
24+
- name: Install Conda environment with Micromamba
25+
uses: mamba-org/provision-with-micromamba@main
3226
with:
33-
activate-environment: bqplot-gl-test
27+
environment-name: bqplot-gl-test
3428
environment-file: test-environment.yml
35-
python-version: ${{ matrix.python-version }}
36-
mamba-version: "*"
37-
auto-activate-base: false
3829
channels: conda-forge
3930

4031
- name: Install bqplot
41-
run: pip install .
42-
working-directory: bqplot
43-
44-
- name: Yarn build bqplot
45-
run: |
46-
yarn install
47-
yarn run build
48-
working-directory: bqplot/js
49-
50-
- name: Yarn install bqplot-gl
51-
run: yarn install
52-
53-
- name: Patch node_modules/bqplot
54-
run: |
55-
rm -rf bqplot
56-
ln -s $GITHUB_WORKSPACE/bqplot/js bqplot
57-
ls bqplot
58-
working-directory: node_modules
59-
60-
- name: Yarn build
61-
run: yarn run build
32+
run: pip install --pre bqplot
6233

6334
- name: Install bqplot-gl
64-
run: pip install .
35+
run: pip install . -vvv
6536

6637
- name: Test installation files
6738
run: |
@@ -82,76 +53,34 @@ jobs:
8253
run: flake8 bqplot_gl --ignore=E501,W504,W503
8354

8455
- name: JavaScript prettyfier
85-
run: yarn run prettier:check
86-
87-
- name: JavaScript tests
88-
run: yarn run test
89-
90-
- name: Install Galata
91-
run: yarn install
92-
working-directory: ui-tests
93-
94-
- name: Launch JupyterLab
95-
run: yarn run start-jlab:detached
96-
working-directory: ui-tests
97-
98-
- name: Wait for JupyterLab
99-
uses: ifaxity/wait-on-action@v1
100-
with:
101-
resource: http-get://localhost:8888/api
102-
timeout: 20000
103-
104-
- name: Run UI Tests
105-
run: yarn run test
106-
working-directory: ui-tests
107-
108-
- name: Upload UI Test artifacts
109-
if: always()
110-
uses: actions/upload-artifact@v2
111-
with:
112-
name: ui-test-output
113-
path: ui-tests/test-output
56+
run: jlpm run prettier:check
11457

11558
- name: Build Python package
116-
run: |
117-
python setup.py sdist bdist_wheel
118-
cd dist
119-
sha256sum * | tee SHA256SUMS
120-
121-
- name: Pack JavaScript package
122-
run: |
123-
yarn pack
124-
mv bqplot*.tgz ../dist
59+
run: python -m build
12560

12661
- name: Upload builds
12762
uses: actions/upload-artifact@v2
12863
with:
12964
name: dist ${{ github.run_number }}
13065
path: ./dist
13166

132-
install:
133-
runs-on: ${{ matrix.os }}-latest
67+
visual-regression-tests:
68+
runs-on: ubuntu-latest
13469
needs: [build]
13570

13671
strategy:
13772
fail-fast: false
138-
matrix:
139-
os: [ubuntu, macos, windows]
140-
python: ['3.9']
14173

14274
steps:
14375

14476
- name: Checkout
14577
uses: actions/checkout@v2
14678

147-
- name: Setup conda
148-
uses: conda-incubator/setup-miniconda@v2
79+
- name: Install Conda environment with Micromamba
80+
uses: mamba-org/provision-with-micromamba@main
14981
with:
150-
activate-environment: bqplot-gl-test
82+
environment-name: bqplot-gl-test
15183
environment-file: test-environment.yml
152-
python-version: ${{ matrix.python-version }}
153-
mamba-version: "*"
154-
auto-activate-base: false
15584
channels: conda-forge
15685

15786
- uses: actions/download-artifact@v2
@@ -164,17 +93,35 @@ jobs:
16493
cd dist
16594
pip install -vv bqplot*.whl
16695
167-
- name: Test installation files
168-
run: |
169-
test -d $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl
170-
test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl/extension.js
171-
test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl/index.js
172-
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl
173-
test -f $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl/package.json
174-
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl/static
175-
176-
- name: Validate the nbextension
177-
run: jupyter nbextension list 2>&1 | grep "bqplot-gl/extension"
178-
179-
- name: Validate the labextension
180-
run: jupyter labextension list 2>&1 | grep bqplot-gl
96+
- name: Install dependencies
97+
shell: bash -l {0}
98+
working-directory: ui-tests
99+
env:
100+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
101+
run: jlpm install
102+
103+
- name: Set up browser cache
104+
uses: actions/cache@v3
105+
with:
106+
path: |
107+
${{ github.workspace }}/pw-browsers
108+
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
109+
110+
- name: Install browser
111+
shell: bash -l {0}
112+
run: npx playwright install chromium
113+
working-directory: ui-tests
114+
115+
- name: Execute integration tests
116+
shell: bash -l {0}
117+
working-directory: ui-tests
118+
run: npx playwright test
119+
120+
- name: Upload Playwright Test report
121+
if: always()
122+
uses: actions/upload-artifact@v3
123+
with:
124+
name: bqplot-playwright-tests
125+
path: |
126+
ui-tests/test-results
127+
ui-tests/playwright-report

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,5 @@ bqplot_gl/labextension/*.tgz
156156
bqplot_gl/labextension
157157

158158
ui-tests/test-output/*
159+
ui-tests/test-results/*
160+
ui-tests/playwright-report/*

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodeLinker: node-modules
2+
enableImmutableInstalls: false

MANIFEST.in

Lines changed: 0 additions & 40 deletions
This file was deleted.

bqplot_gl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Distributed under the terms of the Modified BSD License.
66

77
from .marks import * # noqa
8-
from ._version import __version__, version_info # noqa
8+
from ._version import __version__ # noqa
99

1010

1111
def _jupyter_labextension_paths():

bqplot_gl/_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
# Copyright (c) The bqplot Development Team.
55
# Distributed under the terms of the Modified BSD License.
66

7-
version_info = (0, 1, 0)
8-
__version__ = ".".join(map(str, version_info))
7+
__version__ = "0.1.0"

package.json

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@
2929
"url": "https://github.com/bqplot/bqplot-gl"
3030
},
3131
"scripts": {
32-
"build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension:dev",
33-
"build:prod": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension",
32+
"build": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension:dev",
33+
"build:prod": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension",
3434
"build:labextension": "jupyter labextension build .",
3535
"build:labextension:dev": "jupyter labextension build --development True .",
3636
"build:lib": "tsc",
3737
"build:nbextension": "webpack",
38-
"clean": "yarn run clean:lib && yarn run clean:nbextension && yarn run clean:labextension",
38+
"clean": "jlpm run clean:lib && jlpm run clean:nbextension && jlpm run clean:labextension",
3939
"clean:lib": "rimraf lib",
4040
"clean:labextension": "rimraf bqplot-gl/labextension",
4141
"clean:nbextension": "rimraf bqplot-gl/nbextension/static/index.js",
42-
"prepack": "yarn run build:lib",
43-
"test": "karma start --single-run",
42+
"prepack": "jlpm run build:lib",
4443
"watch": "npm-run-all -p watch:*",
4544
"watch:lib": "tsc -w",
4645
"watch:nbextension": "webpack --watch --mode=development",
@@ -51,56 +50,38 @@
5150
"eslint:fix": "eslint src --ext .ts --fix"
5251
},
5352
"dependencies": {
54-
"@jupyter-widgets/base": "^1.1.10 || ^2.0.0 || ^3.0.0 || ^4.0.0",
55-
"bqplot": "^0.5.31",
56-
"bqscales": "^0.2.2",
53+
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6",
54+
"@lumino/application": "^1 || ^2",
55+
"@lumino/widgets": "^1 || ^2",
56+
"@types/underscore": "^1.11.5",
57+
"bqplot": "^0.6.0-alpha.0",
58+
"bqscales": "^0.3.2",
5759
"d3": "^5.7.0",
5860
"is-typedarray": "^1.0.0",
5961
"lodash": "^4.17.21",
60-
"three": "^0.91.0"
62+
"three": "^0.91.0",
63+
"underscore": "^1.13.6"
6164
},
6265
"devDependencies": {
63-
"@jupyter-widgets/controls": "^1.5.0 || ^2 || ^3",
6466
"@babel/core": "^7.5.0",
6567
"@babel/preset-env": "^7.5.0",
6668
"@babel/preset-typescript": "^7.15.0",
67-
"@jupyterlab/builder": "^3.0.0",
68-
"@phosphor/application": "^1.6.0",
69-
"@phosphor/widgets": "^1.6.0",
70-
"@types/chai": "^4.1.7",
69+
"@jupyter-widgets/base-manager": "^1.0.0",
70+
"@jupyter-widgets/controls": "^5",
71+
"@jupyterlab/builder": "^4",
7172
"@types/d3": "^5.7.2",
72-
"@types/expect.js": "^0.3.29",
73-
"@types/mocha": "^7.0.2",
74-
"@types/sinon": "^9.0.0",
73+
"@types/node": "^13.13.2",
7574
"@types/webpack-env": "^1.13.6",
7675
"@typescript-eslint/eslint-plugin": "^4.29.3",
7776
"@typescript-eslint/parser": "^4.29.3",
78-
"chai": "^4.1.2",
79-
"acorn": "^7.2.0",
8077
"css-loader": "^3.2.0",
8178
"eslint": "^7.4.0",
8279
"eslint-config-prettier": "^8.3.0",
8380
"eslint-plugin-prettier": "^3.4.1",
84-
"karma": "^5.0.2",
85-
"karma-chai": "^0.1.0",
86-
"karma-chrome-launcher": "^3.1.0",
87-
"karma-mocha": "^2.0.0",
88-
"karma-mocha-reporter": "^2.2.5",
89-
"karma-sinon": "^1.0.5",
90-
"karma-sourcemap-loader": "^0.3.7",
91-
"karma-typescript": "^5.0.2",
92-
"karma-typescript-es6-transform": "^5.0.2",
93-
"karma-webpack": "^5.0.0",
94-
"mocha": "^7.1.1",
95-
"fs-extra": "^7.0.0",
96-
"identity-obj-proxy": "^3.0.0",
97-
"mkdirp": "^0.5.1",
9881
"npm-run-all": "^4.1.3",
9982
"prettier": "^2.0.5",
10083
"raw-loader": "~4.0.1",
10184
"rimraf": "^2.6.2",
102-
"sinon": "^9.0.2",
103-
"sinon-chai": "^3.3.0",
10485
"source-map-loader": "^1.1.3",
10586
"style-loader": "^1.0.0",
10687
"ts-loader": "^8.0.0",

0 commit comments

Comments
 (0)