Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ jlpm && jlpm run build
python -m pip install -e .
jupyter labextension develop . --overwrite
jupyter server extension enable voila.server_extension --sys-prefix
jupyter serverextension enable voila.server_extension --sys-prefix
jupyter serverextension enable voila.server_extension --sys-prefix
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
lint-staged.config.js
.eslintrc.js

node_modules
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jest/recommended'
],
Expand Down
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[flake8]
max-line-length=200

ignore = E, C, W, D
exclude =
.github
2 changes: 0 additions & 2 deletions .github/workflows/benchmark-report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Commenting on a PR requires write access
# This script is taken from jupyterlab project.


name: Comment on the pull request

on:
Expand Down Expand Up @@ -41,7 +40,6 @@ jobs:
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/benchmark-assets.zip', Buffer.from(download.data));
- run: unzip benchmark-assets.zip

- name: 'Comment on PR'
uses: actions/github-script@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:
github_token: ${{ secrets.github_token }}
url_path: voila/tree
url_path: voila/tree
64 changes: 32 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,43 @@ name: Build Frontend Packages
on:
push:
branches:
- '*'
- '*'
pull_request:
branches:
- '*'
- '*'
schedule:
- cron: "0 2 * * 1-5" # run on weekdays at 2:00am UTC
- cron: '0 2 * * 1-5' # run on weekdays at 2:00am UTC

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install Dependencies
run: |
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.10

- name: Install the Voilà Preview JupyterLab extension
run: |
python -m pip install .

- name: Check the extensions are installed
run: |
jupyter nbextension list 2>&1 | grep -ie "voila/extension.*enabled" -
jupyter labextension list 2>&1 | grep -ie "@voila-dashboards/jupyterlab-preview.*enabled.*ok" -
jupyter server extension list 2>&1 | grep -ie "voila\.server_extension.*enabled" -

- name: Browser check
run: |
python -m jupyterlab.browser_check

- name: Lint
run: |
jlpm
jlpm run eslint:check
jlpm run prettier:check
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install Dependencies
run: |
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.10

- name: Install the Voilà Preview JupyterLab extension
run: |
python -m pip install .

- name: Check the extensions are installed
run: |
jupyter nbextension list 2>&1 | grep -ie "voila/extension.*enabled" -
jupyter labextension list 2>&1 | grep -ie "@voila-dashboards/jupyterlab-preview.*enabled.*ok" -
jupyter server extension list 2>&1 | grep -ie "voila\.server_extension.*enabled" -

- name: Browser check
run: |
python -m jupyterlab.browser_check

- name: Lint
run: |
jlpm
jlpm run eslint:check
jlpm run prettier:check
146 changes: 71 additions & 75 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ name: Tests
on:
push:
branches:
- '*'
- '*'
pull_request:
branches:
- '*'
- '*'
schedule:
- cron: "0 2 * * 1-5" # run on weekdays at 2:00am UTC
- cron: '0 2 * * 1-5' # run on weekdays at 2:00am UTC

jobs:
test-linux:

runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -22,47 +21,45 @@ jobs:
python_version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2

- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge

- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"

- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test]"
(cd tests/test_template; pip install .)
(cd tests/skip_template; pip install .)

- name: Run tests
shell: bash -l {0}
run: |
VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
voila --help # Making sure we can run `voila --help`
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
# Note that wget is the only easily available software that has a read-timeout
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
sleep 2
wget --read-timeout=5 --tries=1 http://localhost:8878

- name: Flake8
shell: bash -l {0}
run: |
python -m flake8 voila tests setup.py
- uses: actions/checkout@v2

- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge

test-osx:
- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"

- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test]"
(cd tests/test_template; pip install .)
(cd tests/skip_template; pip install .)

- name: Run tests
shell: bash -l {0}
run: |
VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
voila --help # Making sure we can run `voila --help`
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
# Note that wget is the only easily available software that has a read-timeout
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
sleep 2
wget --read-timeout=5 --tries=1 http://localhost:8878

- name: Flake8
shell: bash -l {0}
run: |
python -m flake8 voila tests setup.py

test-osx:
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -72,41 +69,40 @@ jobs:
python_version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2

- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge

- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"

- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test]"
(cd tests/test_template; pip install .)
(cd tests/skip_template; pip install .)

- name: Run tests
shell: bash -l {0}
run: |
py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
voila --help # Making sure we can run `voila --help`
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
# Note that wget is the only easily available software that has a read-timeout
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
sleep 2
wget --read-timeout=5 --tries=1 http://localhost:8878
- uses: actions/checkout@v2

test-win:
- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge

- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"

- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test]"
(cd tests/test_template; pip install .)
(cd tests/skip_template; pip install .)

- name: Run tests
shell: bash -l {0}
run: |
py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
voila --help # Making sure we can run `voila --help`
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
# Note that wget is the only easily available software that has a read-timeout
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
sleep 2
wget --read-timeout=5 --tries=1 http://localhost:8878

test-win:
runs-on: ${{ matrix.os }}

strategy:
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Packaging
on:
push:
branches:
- '*'
- '*'
pull_request:
branches:
- '*'
- '*'

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
Expand All @@ -19,37 +19,37 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: |
python -m pip install setuptools jupyter_packaging~=0.10 "jupyterlab>=3,<4" build
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Build pypi distributions
run: |
python -m build
- name: Install dependencies
run: |
python -m pip install setuptools jupyter_packaging~=0.10 "jupyterlab>=3,<4" build

- name: Build npm distributions
run: |
pushd packages/jupyterlab-preview
npm pack
popd
cp packages/*/*.tgz dist
- name: Build pypi distributions
run: |
python -m build

- name: Build checksum file
run: |
cd dist
sha256sum * | tee SHA256SUMS
- name: Build npm distributions
run: |
pushd packages/jupyterlab-preview
npm pack
popd
cp packages/*/*.tgz dist

- name: Upload distributions
uses: actions/upload-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Build checksum file
run: |
cd dist
sha256sum * | tee SHA256SUMS

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

install:
runs-on: ${{ matrix.os }}-latest
Expand Down
Loading