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

🪐 Support for JupyterLab 4.x (take 2!) #155

Merged
merged 59 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b14324f
:broom: Rework dependencies (#139)
agoose77 May 15, 2023
bdaee82
chore: drop peerDependencies
agoose77 May 15, 2023
41b0bb6
🎨 Theme updates for showing proofs, algorithms, and github previews (…
rowanc1 May 16, 2023
65eb89e
Publish 1.2.0
agoose77 May 16, 2023
18b8511
chore: run prettier
agoose77 May 16, 2023
a69a4c9
wip: jupyterlab4
agoose77 May 15, 2023
ec1338e
wip: try jlab 4
agoose77 May 16, 2023
00e2d5c
wip: fixed for 4.0
agoose77 May 16, 2023
570f776
wip
agoose77 May 30, 2023
c4a6a11
wip: more 4.0 fixes
agoose77 May 30, 2023
29aaef8
wip: try to rework internals
agoose77 May 31, 2023
242d569
wip: work on trust
agoose77 May 31, 2023
140b58d
feat: restore list item
agoose77 May 31, 2023
375dc1e
chore: improve logging
agoose77 Jun 5, 2023
3858398
Pass trust to the mimerenderer (#150)
rowanc1 Jun 1, 2023
0b1641e
chore: restore original examples
agoose77 Jun 5, 2023
7349656
fix: typo
agoose77 Jun 5, 2023
f0c30a6
chore: merge main
agoose77 Jun 11, 2023
d9f4991
chore: drop legacy mode
agoose77 Jun 11, 2023
e2cb4aa
chore: run `watch:css` with `watch`
agoose77 Jun 11, 2023
fe4fa6c
chore: improve debugging messages
agoose77 Jun 11, 2023
e492f1c
fix: empty render
agoose77 Jun 11, 2023
1433429
Change to debug renderers
rowanc1 Jun 11, 2023
adb8442
Local markdown images in articles
rowanc1 Jun 11, 2023
3e2d7c1
Ignore built css files
rowanc1 Jun 11, 2023
79cf0b6
🔗 Remove trailing slash
rowanc1 Jun 11, 2023
844f0e6
🧹 Linting
rowanc1 Jun 11, 2023
9bcc160
📦 Update ts-jest
rowanc1 Jun 11, 2023
0fc4fa3
Build the css inside the `build:prod` command
rowanc1 Jun 11, 2023
f2c8af4
Playwright is not a package command
rowanc1 Jun 11, 2023
b4ecd0d
Update `@jupyterlab/galata`?
rowanc1 Jun 11, 2023
0f5161d
🧪 Pass in request to `galata`
rowanc1 Jun 11, 2023
7e79fdb
Try `npm_client: jlpm`
rowanc1 Jun 11, 2023
703e2c9
Update Playwright Snapshots
github-actions[bot] Jun 11, 2023
b405903
🧹 Update yml formatting, to trigger build!
rowanc1 Jun 11, 2023
c3b43eb
chore: improve debugging
agoose77 Jun 12, 2023
95a363e
refactor: replace text model provider with controller
agoose77 Jun 12, 2023
1ceb471
refactor: small cleanups
agoose77 Jun 12, 2023
61746c6
fix: don't render notebook twice
agoose77 Jun 12, 2023
55ed07a
fix: don't render delayed on input
agoose77 Jun 12, 2023
2944360
fix: restore quoting
agoose77 Jun 12, 2023
c4a2e92
refactor: drop signal usage
agoose77 Jun 12, 2023
4193d25
fix: disable placeholders for now
agoose77 Jun 12, 2023
8f0efa8
wip
agoose77 Jun 15, 2023
b2aedf6
fix: use signals to set task item
agoose77 Jun 16, 2023
b7c2ab4
refactor: restructure cell file
agoose77 Jun 16, 2023
4646cf9
fix: rename attribute
agoose77 Jun 16, 2023
0cc776e
fix: wait for render of single cell
agoose77 Jun 16, 2023
6a64d0b
fix: add a taksItemController that won't trigger a state update
agoose77 Jun 16, 2023
5bd9009
Only reuse expressions if the model exists
rowanc1 Jun 21, 2023
92f9cbf
Remove block lifting
rowanc1 Jun 22, 2023
872670b
Upgrade myst packages
rowanc1 Jun 22, 2023
cc76765
Turn ts-error into lint warning
rowanc1 Jun 22, 2023
14eb106
Fix local images in markdown files
rowanc1 Jun 22, 2023
3e22dba
Add abbreviations and glossary transforms
rowanc1 Jun 22, 2023
842fc9b
Merge branch 'main' into agoose77/feat-jupyterlab-v4-next
rowanc1 Jun 22, 2023
f2fa307
Fake get rid of the double render
rowanc1 Jun 22, 2023
147178e
Backwards compatible with Jupyterlab3
rowanc1 Jun 22, 2023
b3b6747
Consistent setters/getters on cell metadata
rowanc1 Jun 23, 2023
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
25 changes: 4 additions & 21 deletions .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html
name: Binder Badge
on:
pull_request_target:
types: [opened]

permissions:
pull-requests: write


jobs:
binder:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v3
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab) :point_left: Launch a Binder on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}

github_token: ${{ secrets.github_token }}
241 changes: 120 additions & 121 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,84 +11,85 @@ jobs:
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.1

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Test the extension
run: |
set -eux
jlpm run test

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

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-myst.*OK"
python -m jupyterlab.browser_check

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

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

- name: Upload extension packages
uses: actions/upload-artifact@v2
with:
name: extension-artifacts
path: dist/jupyterlab_myst*
if-no-files-found: error
- 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.0b0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Test the extension
run: |
set -eux
jlpm run test

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

pytest -vv -r ap --cov jupyterlab_myst
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyterlab_myst.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-myst.*OK"
python -m jupyterlab.browser_check

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

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

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

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

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v2
with:
name: extension-artifacts
- name: Install
run: |
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~=3.1" jupyterlab_myst*.whl -r requirements-test.txt

- name: Install and Test
run: |
set -eux

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

python -m pytest "${{ github.workspace }}/tests"
working-directory: "${{ runner.temp }}"
- name: Checkout
uses: actions/checkout@v3
- 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: |
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.0b0,<5" jupyterlab_myst*.whl


jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyterlab_myst.*OK"

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

integration-tests:
name: Integration tests
Expand All @@ -99,63 +100,61 @@ jobs:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers

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

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

- name: Download extension package
uses: actions/download-artifact@v2
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab~=3.1" jupyterlab_myst*.whl

- name: Install dependencies
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

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

- name: Execute integration tests
working-directory: ui-tests
run: |
jlpm playwright test

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v2
with:
name: jupyterlab_myst-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
- name: Checkout
uses: actions/checkout@v3

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

- name: Download extension package
uses: actions/download-artifact@v3
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0b0,<5" jupyterlab_myst*.whl

- name: Install dependencies
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

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

- name: Execute integration tests
working-directory: ui-tests
run: |
jlpm playwright test

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v3
with:
name: jupyterlab_myst-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report

check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install missing dependencies
# On May 30, 2023 this wasn't included in the base try removing in future!
run: pip install typing_extensions
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
with:
ignore_links: 'https:\/\/mybinder\.org.*'
6 changes: 3 additions & 3 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
Expand All @@ -23,7 +23,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jupyterlab_myst-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
path: .jupyter_releaser_checkout/dist
13 changes: 13 additions & 0 deletions .github/workflows/enforce-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Enforce PR label

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
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
1 change: 1 addition & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
run: |
echo "Verify the final release"
echo ${{ steps.finalize-release.outputs.release_url }}

- name: "** Failure Message **"
if: ${{ failure() }}
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/update-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ permissions:
pull-requests: write

jobs:


update-snapshots:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update playwright snapshots') }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -33,7 +31,7 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

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

- name: Install extension
run: |
Expand All @@ -44,7 +42,7 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
npm_client: jlpm
# Playwright knows how to start JupyterLab server
start_server_script: 'null'
test_folder: ui-tests

Loading