Skip to content

Commit

Permalink
Merge branch 'main' into python311
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou authored Aug 1, 2023
2 parents 3168f6b + a2453b3 commit 680ea2a
Show file tree
Hide file tree
Showing 90 changed files with 21,677 additions and 15,135 deletions.
3 changes: 2 additions & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: voila
channels:
- conda-forge
dependencies:
- jupyterlab=3
- jupyterlab=3.6
- ipywidgets=8
- ipyvolume
- bqplot
- scipy
- ipympl
- xleaflet=0.16.0
- xeus-cling=0.13.0
- python=3.10
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-use-before-define': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Install Dependencies
run: |
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.10
python -m pip install -U jupyterlab~=4.0 jupyter_packaging~=0.10 "notebook<7"
- name: Install the Voilà Preview JupyterLab extension
run: |
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ jobs:
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Upgrade packaging dependencies
run: |
pip install --upgrade jupyter-packaging~=0.10 --user
- name: Install Dependencies
run: |
pip install .
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- 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 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6"
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel

- name: Install dependencies
shell: bash -l {0}
Expand All @@ -51,21 +51,26 @@ jobs:
- 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_TEST_XEUS_CLING=1 py.test tests/app --async-test-timeout=240 --reruns 2 --reruns-delay 1
VOILA_TEST_XEUS_CLING=1 py.test tests/server --async-test-timeout=240 --reruns 2 --reruns-delay 1 --trace
py.test tests/execute_output_test.py
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 nbconvert < 7.6.0
python -m pip install "nbconvert<7.6.0"
VOILA_TEST_XEUS_CLING=1 py.test tests/app/image_inlining_test.py
test-osx:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [macos-10.15]
os: [macos-12]
python_version: ['3.8', '3.9', '3.10', '3.11']

steps:
Expand All @@ -79,28 +84,24 @@ jobs:

- 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 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel

- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test]"
python -m pip install ".[test,dev]"
(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
py.test tests/app --async-test-timeout=240 --reruns 2 --reruns-delay 1
py.test tests/server --async-test-timeout=240 --reruns 2 --reruns-delay 1 --trace
py.test tests/execute_output_test.py
test-win:
runs-on: ${{ matrix.os }}
Expand All @@ -120,11 +121,11 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: Install dependencies
run: |
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rereunfailures ipywidgets matplotlib traitlets
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures ipywidgets matplotlib traitlets ipykernel
yarn install --network-timeout 100000
python -m pip install ".[test]"
cd tests/test_template
Expand All @@ -135,4 +136,6 @@ jobs:
- name: Run test
run: |
set VOILA_TEST_DEBUG=1
py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
py.test tests/app --async-test-timeout=240 --reruns 2 --reruns-delay 1
py.test tests/server --async-test-timeout=240 --reruns 2 --reruns-delay 1 --trace
py.test tests/execute_output_test.py
8 changes: 4 additions & 4 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install setuptools jupyter_packaging~=0.10 "jupyterlab>=3,<4" build
python -m pip install setuptools jupyter_packaging~=0.10 "jupyterlab>=4,<5" build
- name: Build pypi distributions
run: |
Expand Down Expand Up @@ -58,9 +58,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.7', '3.10']
python: ['3.8', '3.10']
include:
- python: '3.7'
- python: '3.8'
dist: 'voila*.tar.gz'
- python: '3.10'
dist: 'voila*.whl'
Expand All @@ -82,7 +82,7 @@ jobs:
path: ./dist
- name: Install the prerequisites
run: |
${{ matrix.py_cmd }} -m pip install pip wheel jupyterlab~=3.0 notebook~=6.4
${{ matrix.py_cmd }} -m pip install pip wheel "jupyterlab>=4.0.0,<5" notebook~=6.4
- name: Install the package
run: |
cd dist
Expand Down
36 changes: 3 additions & 33 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -r requirements-visual-test.txt
python -m pip install jupyterlab_miami_nights --no-deps
python -m pip install ".[test]"
jlpm
jlpm build
jupyter labextension develop . --overwrite
cd ui-tests
jlpm install --frozen-lockfile
jlpm install
- name: Launch Voila
run: |
Expand All @@ -34,7 +35,7 @@ jobs:
working-directory: ui-tests

- name: Install browser
run: jlpm playwright install chromium
run: npx playwright install chromium
working-directory: ui-tests

- name: Wait for Voila
Expand All @@ -47,37 +48,6 @@ jobs:
run: jlpm run test
working-directory: ui-tests

- uses: iterative/setup-cml@v1

- name: Publish Results
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPORT: ./benchmark-results/voila-benchmark.md
shell: bash
run: |
cd ui-tests
# Publish image to cml.dev
echo "" >> ${REPORT}
cml-publish ./benchmark-results/voila-benchmark.png --md >> ${REPORT}
echo "" >> ${REPORT}
# Test if metadata have changed
export METADATA_DIFF="/tmp/metadata.diff"
diff -u <(jq --sort-keys .metadata benchmark-results/voila-benchmark.json) <(jq --sort-keys .metadata voila-benchmark-expected.json) > ${METADATA_DIFF} || true
if [[ -s ${METADATA_DIFF} ]]; then
echo "<details><summary>:exclamation: Test metadata have changed</summary>" >> ${REPORT}
echo "" >> ${REPORT}
echo "\`\`\`diff" >> ${REPORT}
cat ${METADATA_DIFF} >> ${REPORT}
echo "\`\`\`" >> ${REPORT}
echo "" >> ${REPORT}
echo "</details>" >> ${REPORT}
fi
# Save PR number for comment publication
echo "${{ github.event.number }}" > ./benchmark-results/NR
- name: Upload Playwright Test assets
if: always()
uses: actions/upload-artifact@v2
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/update_galata_references.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ jobs:
name: Update Galata References
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update galata references') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
node-version: [16.x]

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

- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -40,7 +47,7 @@ jobs:
jlpm build
jupyter labextension develop . --overwrite
cd ui-tests
jlpm install --frozen-lockfile
jlpm install
- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@main
with:
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config.rst
package-lock.json

share/jupyter/voila/templates/base/static/*voila.js
share/jupyter/voila/templates/base/static/*treepage.js
share/jupyter/voila/templates/base/static/*voila-style.js
share/jupyter/voila/templates/base/static/*.woff
share/jupyter/voila/templates/base/static/*.woff2
Expand All @@ -38,6 +39,8 @@ share/jupyter/voila/templates/base/static/*.svg
share/jupyter/voila/templates/base/static/*.ttf
share/jupyter/voila/templates/base/static/labvariables.css
share/jupyter/voila/templates/base/static/materialcolors.css
share/jupyter/voila/templates/base/static/*.LICENSE.txt


lib

Expand All @@ -48,3 +51,9 @@ ui-tests/playwright-report
ui-tests/test-results
ui-tests/benchmark-results
ui-tests/jlab_root

.yarn/

share/jupyter/voila/schemas
share/jupyter/voila/themes
share/jupyter/voila/style.js
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ repos:

# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.255
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.281
hooks:
- id: ruff
args: ['--fix']
Expand Down
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
Loading

0 comments on commit 680ea2a

Please sign in to comment.