Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dfguerrerom committed Oct 10, 2024
2 parents ef6ec74 + f1722f4 commit 6f07177
Show file tree
Hide file tree
Showing 14 changed files with 652 additions and 627 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
schedule:
- cron: '0 2 * * 1-5' # run on weekdays at 2:00am UTC

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

Expand All @@ -27,7 +31,7 @@ jobs:
version_spec: next

- name: Upload Distributions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: voila-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
schedule:
- cron: '0 2 * * 1-5' # run on weekdays at 2:00am UTC

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-linux:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -70,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12]
os: [macos]
python_version: ['3.8', '3.9', '3.10', '3.11']

steps:
Expand Down Expand Up @@ -116,7 +120,7 @@ jobs:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

Expand Down Expand Up @@ -46,7 +50,7 @@ jobs:
sha256sum * | tee SHA256SUMS
- name: Upload distributions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
Expand All @@ -72,11 +76,10 @@ jobs:
py_cmd: python
steps:
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ name: UI Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ui-tests:
name: Visual Regression
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
node-version: [18.x]
jupyter-server-version: ["1.24.0", "2.14.2"]
fail-fast: false

steps:
Expand All @@ -22,6 +25,7 @@ jobs:
python -m pip install -r requirements-visual-test.txt
python -m pip install jupyterlab_miami_nights --no-deps
python -m pip install ".[test]"
python -m pip install jupyter-server==${{ matrix.jupyter-server-version }}
jlpm
jlpm build
jupyter labextension develop . --overwrite
Expand Down Expand Up @@ -50,23 +54,23 @@ jobs:

- name: Upload Playwright Test assets
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: voila-test-assets
path: |
ui-tests/test-results
- name: Upload Playwright Benchmark report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: voila-benchmark-report
path: |
ui-tests/benchmark-results
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: voila-test-report
path: |
Expand Down
4 changes: 2 additions & 2 deletions packages/voila/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
},
"browserslist": ">0.8%, not ie 11, not op_mini all, not dead",
"dependencies": {
"@jupyter-widgets/base": "^6.0.6",
"@jupyter-widgets/jupyterlab-manager": "^5.0.9",
"@jupyter-widgets/base": "^6.0.10",
"@jupyter-widgets/jupyterlab-manager": "^5.0.13",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
"@jupyterlab/apputils-extension": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/voila/src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function shouldUseMathJax2() {
PageConfig.setOption(
urlParam,
url === 'null'
? 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js'
? 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/latest.min.js'
: url
);
PageConfig.setOption(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ classifiers = [
dependencies = [
"jupyter_client>=7.4.4,<9",
"jupyter_core>=4.11.0",
"jupyter_server>=2.0.0,<3",
"jupyter_server>=1.18,<3",
"jupyterlab_server>=2.3.0,<3",
"nbclient>=0.4.0",
"nbconvert>=6.4.5,<8",
Expand Down
1 change: 1 addition & 0 deletions requirements-visual-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bokeh
bokeh_sampledata
bqplot
ipympl==0.9.2
jupyterlab~=4.0
Expand Down
2 changes: 1 addition & 1 deletion ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Voila UI Tests",
"private": true,
"scripts": {
"start": "voila ../notebooks --no-browser --show_tracebacks True --Voila.mathjax_url=https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js",
"start": "voila ../notebooks --no-browser --show_tracebacks True",
"start:detached": "yarn run start&",
"test": "npx playwright test",
"test:debug": "PWDEBUG=1 playwright test",
Expand Down
10 changes: 5 additions & 5 deletions ui-tests/tests/voila.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test.describe('Voila performance Tests', () => {
const testFunction = async () => {
await page.goto(`/voila/render/${notebookName}.ipynb?template=classic`);
// wait for the widgets to load
await page.waitForSelector('span[role="presentation"] >> text=x');
await page.waitForSelector('.slider-container');
};
await addBenchmarkToTest(notebookName, testFunction, testInfo, browserName);

Expand All @@ -103,7 +103,7 @@ test.describe('Voila performance Tests', () => {
const testFunction = async () => {
await page.goto(`/voila/render/${notebookName}.ipynb`);
// wait for the widgets to load
await page.waitForSelector('span.mjx-char >> text=x');
await page.waitForSelector('.slider-container');
};
await addBenchmarkToTest(notebookName, testFunction, testInfo, browserName);
// change the value of the slider
Expand All @@ -128,7 +128,7 @@ test.describe('Voila performance Tests', () => {
const testFunction = async () => {
await page.goto(`/voila/render/${notebookName}.ipynb?theme=dark`);
// wait for the widgets to load
await page.waitForSelector('span[role="presentation"] >> text=x');
await page.waitForSelector('.slider-container');
};
await addBenchmarkToTest(notebookName, testFunction, testInfo, browserName);

Expand All @@ -148,7 +148,7 @@ test.describe('Voila performance Tests', () => {
`/voila/render/${notebookName}.ipynb?theme=JupyterLab%20Miami%20Nights`
);
// wait for the widgets to load
await page.waitForSelector('span[role="presentation"] >> text=x');
await page.waitForSelector('.slider-container');
};
await addBenchmarkToTest(notebookName, testFunction, testInfo, browserName);

Expand Down Expand Up @@ -334,7 +334,7 @@ test.describe('Voila performance Tests', () => {
const notebookName = 'reveal';
const testFunction = async () => {
await page.goto(`/voila/render/${notebookName}.ipynb`);
await page.waitForSelector('span[role="presentation"] >> text=x');
await page.waitForSelector('.slider-container');
};
await addBenchmarkToTest(notebookName, testFunction, testInfo, browserName);
expect(await page.screenshot()).toMatchSnapshot(`${notebookName}.png`);
Expand Down
Loading

0 comments on commit 6f07177

Please sign in to comment.