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

Update to JupyterLab 4 #126

Merged
merged 12 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
- bqplot=0.12
- ipytree=0.2
- jupyterlab=3
- retrolab=0.3
- nodejs
- jupyterlab=4
- notebook=7
- nodejs=18
- numpy
14 changes: 14 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.1.0
_src_path: https://github.com/jupyterlab/extension-template
author_email: ''
author_name: ipylab contributors
has_binder: false
has_settings: false
kind: frontend
labextension_name: ipylab
project_short_description: Control JupyterLab from Python notebooks
python_name: ipylab
repository: https://github.com/jtpio/ipylab
test: false

5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

80 changes: 69 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,87 @@ name: Build

on:
push:
branches: [ main ]
branches: main
pull_request:
branches:
- '*'
branches: '*'

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
python -m pip install --upgrade pip jupyterlab~=3.0
- name: Install the ipylab Python package and JupyterLab extension
run: |
python -m pip install .
jupyter labextension list 2>&1 | grep -ie "ipylab.*enabled.*ok" -
- name: Browser check
set -eux
jlpm
jlpm run lint:check

- name: Build the extension
run: |
set -eux
python -m pip install .[test]

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "ipylab.*OK"
python -m jupyterlab.browser_check
- name: Check ipylab can be imported

- name: Package the extension
run: |
set -eux

pip install build
python -m build
pip uninstall -y "ipylab" jupyterlab

- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: extension-artifacts
path: dist/ipylab*
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v3
with:
name: extension-artifacts
- name: Install and Test
run: |
python -c "from ipylab import JupyterFrontEnd"
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.0.0,<5" ipylab*.whl


jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "ipylab.*OK"
python -m jupyterlab.browser_check --no-browser-test


check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
16 changes: 6 additions & 10 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
name: Check Release
on:
push:
branches:
- main
branches: ["main"]
pull_request:
branches:
- main

permissions:
contents: write
branches: ["*"]

jobs:
check_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Install Dependencies
run: |
pip install -e .
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

token: ${{ secrets.GITHUB_TOKEN }}
version_spec: next

- name: Upload Distributions
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/enforce-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
enforce-label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: enforce-triage-label
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1
4 changes: 2 additions & 2 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install dependencies
run: |
python -m pip install "jupyterlab>=3,<4" build
python -m pip install "jupyterlab>=4,<5" build
- name: Build pypi distributions
run: |
python -m build
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
path: ./dist
- name: Install the prerequisites
run: |
${{ matrix.pip_cmd }} install --upgrade pip wheel jupyterlab~=3.0
${{ matrix.pip_cmd }} install --upgrade pip wheel jupyterlab~=4.0
- name: Install the package
run: |
cd dist
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
version_spec: ${{ github.event.inputs.version_spec }}
post_version_spec: ${{ github.event.inputs.post_version_spec }}
target: ${{ github.event.inputs.target }}
branch: ${{ github.event.inputs.branch }}
since: ${{ github.event.inputs.since }}
since_last_stable: ${{ github.event.inputs.since_last_stable }}
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
jobs:
publish_release:
runs-on: ubuntu-latest
permissions:
# This is useful if you want to use PyPI trusted publisher
# and NPM provenance
id-token: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

Expand All @@ -23,22 +27,21 @@ jobs:
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
target: ${{ github.event.inputs.target }}
branch: ${{ github.event.inputs.branch }}
release_url: ${{ github.event.inputs.release_url }}
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}

- name: Finalize Release
id: finalize-release
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
TWINE_USERNAME: __token__
# The following are needed if you use legacy PyPI set up
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
# PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
# TWINE_USERNAME: __token__
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
target: ${{ github.event.inputs.target }}
release_url: ${{ steps.populate-release.outputs.release_url }}

- name: "** Next Step **"
Expand Down
Loading
Loading