Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Jupyter Lab v4 #135

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
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
156 changes: 72 additions & 84 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Tests
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master

defaults:
run:
Expand All @@ -23,78 +23,72 @@ jobs:
python-version: [3.9]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: ipywebrtc-dev
environment-file: dev_environment.yml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
auto-activate-base: false
channels: conda-forge

- name: Test flake8
run: flake8 ipywebrtc --ignore=E501,F405

- name: Install ipywebrtc
run: pip install .

- name: Check installation files
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/package.json

- name: Check nbextension and labextension
run: |
jupyter nbextension list 2>&1 | grep -ie "jupyter-webrtc/extension.*enabled" -
jupyter labextension list 2>&1 | grep -ie "jupyter-webrtc.*enabled.*ok" -

- name: Run js tests
run: |
npm install
npm run test
working-directory: js

- name: Build docs (Only on MacOS for build speed)
if: matrix.os == 'macos-latest'
run: |
cd docs/source/
sphinx-build . _build/html
cd ../..
- name: Checkout
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: dev_environment.yml
condarc: |
dependencies:
- python==${{ matrix.python-version }}

- name: Test flake8
run: flake8 ipywebrtc --ignore=E501,F405

- name: Install ipywebrtc
run: pip install .

- name: Check installation files
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/package.json

- name: Check nbextension and labextension
run: |
jupyter labextension list 2>&1 | grep -ie "jupyter-webrtc.*enabled.*ok" -

- name: Run js tests
run: |
npm install
npm run test
working-directory: js

- name: Build docs (Only on MacOS for build speed)
if: matrix.os == 'macos-latest'
run: |
cd docs/source/
sphinx-build . _build/html
cd ../..
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid unneeded changes/reformatting, or put them in a separate PR or top commit first. This makes tracking changes much easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand what you're saying, I can do a new PR for style changes.


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

- name: Checkout
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: ipywebrtc-dev
environment-file: dev_environment.yml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
auto-activate-base: false
channels: conda-forge

- name: Build packages
run: |
python setup.py sdist bdist_wheel
cd dist
sha256sum * | tee SHA256SUMS
- name: Upload builds
uses: actions/upload-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: dev_environment.yml
condarc: |
dependencies:
- python==${{ matrix.python-version }}

- name: Build packages
run: |
python setup.py sdist bdist_wheel
cd dist
sha256sum * | tee SHA256SUMS
- name: Upload builds
uses: actions/upload-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist
Comment on lines +71 to +91
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, very difficult to see what actually changed and what is related to the intention or the PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier to review hiding the whitespaces changes https://github.com/maartenbreddels/ipywebrtc/pull/135/files?diff=split&w=1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w=1 is the query parameter


install:
runs-on: ${{ matrix.os }}-latest
Expand All @@ -104,27 +98,24 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.6', '3.9']
python: ["3.6", "3.9"]
include:
- python: '3.6'
dist: 'ipywebrtc*.tar.gz'
- python: '3.9'
dist: 'ipywebrtc*.whl'
- python: "3.6"
dist: "ipywebrtc*.tar.gz"
- python: "3.9"
dist: "ipywebrtc*.whl"
Comment on lines +103 to +106
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't that bad, because it's not mixed with other changes, but adds noise.


steps:

- name: Checkout
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-name: ipywebrtc-dev
environment-file: dev_environment.yml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
auto-activate-base: false
channels: conda-forge
condarc: |
dependencies:
- python==${{ matrix.python-version }}

- uses: actions/download-artifact@v2
with:
Expand All @@ -145,8 +136,5 @@ jobs:
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/package.json
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/static

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

- name: Validate the labextension
run: jupyter labextension list 2>&1 | grep jupyter-webrtc
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ share

# OS X
.DS_Store

.yarn/
28 changes: 14 additions & 14 deletions dev_environment.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: ipywebrtc-dev
channels:
- conda-forge
- conda-forge
dependencies:
- pip
- nodejs=14.*
- yarn
- jupyter-packaging
- jupyterlab=3
- notebook
- ipywidgets>=7.6
- flake8
- nbsphinx
- sphinx
- sphinx_rtd_theme
- pygments==2.6.1
- jupyter-sphinx
- pip
- nodejs=14.*
- yarn
- jupyter-packaging
- jupyterlab=4
- notebook
- ipywidgets>=7.6
- flake8
- nbsphinx
- sphinx
- sphinx_rtd_theme
- pygments==2.6.1
- jupyter-sphinx
2 changes: 2 additions & 0 deletions js/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enableImmutableInstalls: false
nodeLinker: node-modules
Loading
Loading