Skip to content

Commit ddc8218

Browse files
authored
Merge pull request #17 from QuantStack/migrateV4
Upgrade to `v0.3.2` of `jupyterlab-blockly`
2 parents da3b62b + 8107f58 commit ddc8218

21 files changed

+6757
-25224
lines changed

.github/workflows/binder-on-pr.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66

77
permissions:
88
pull-requests: write
9-
10-
119
jobs:
1210
binder:
1311
runs-on: ubuntu-latest
@@ -23,9 +21,8 @@ jobs:
2321
issue_number: context.issue.number,
2422
owner: context.repo.owner,
2523
repo: context.repo.repo,
26-
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}_`
24+
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab/tree/examples/demo.jpblockly) :point_left: Launch a Binder on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
2725
})
2826
env:
2927
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
30-
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
31-
28+
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}

.github/workflows/build.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ jobs:
1818
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
1919

2020
- name: Install dependencies
21-
run: python -m pip install -U jupyterlab~=3.4
22-
21+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
22+
2323
- name: Lint the extension
2424
run: |
2525
set -eux
2626
jlpm
27-
jlpm run lint:check
27+
jlpm eslint:check
2828
2929
- name: Build the extension
3030
run: |
3131
set -eux
32-
python -m pip install .[test]
32+
python -m pip install .
3333
3434
jupyter labextension list
3535
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lego-boost.*OK"
3636
python -m jupyterlab.browser_check
37-
37+
3838
- name: Package the extension
3939
run: |
4040
set -eux
@@ -55,8 +55,6 @@ jobs:
5555
runs-on: ubuntu-latest
5656

5757
steps:
58-
- name: Checkout
59-
uses: actions/checkout@v3
6058
- name: Install Python
6159
uses: actions/setup-python@v4
6260
with:
@@ -72,9 +70,18 @@ jobs:
7270
sudo rm -rf $(which node)
7371
sudo rm -rf $(which node)
7472
75-
pip install jupyterlab~=3.4 jupyterlab_lego_boost*.whl
73+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_lego_boost*.whl
74+
7675
7776
jupyter labextension list
7877
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lego-boost.*OK"
79-
python -m jupyterlab.browser_check --no-chrome-test
78+
python -m jupyterlab.browser_check --no-browser-test
8079
80+
check_links:
81+
name: Check Links
82+
runs-on: ubuntu-latest
83+
timeout-minutes: 15
84+
steps:
85+
- uses: actions/checkout@v3
86+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
87+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

.github/workflows/check-release.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
11
name: Check Release
22
on:
33
push:
4-
branches:
5-
- main
4+
branches: ["main"]
65
pull_request:
7-
branches:
8-
- main
6+
branches: ["*"]
97

108
permissions:
119
contents: write
1210

1311
jobs:
1412
check_release:
1513
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
group: [check_release, link_check]
19-
python-version: ["3.9"]
20-
node-version: ["14.x"]
21-
2214
steps:
2315
- name: Checkout
2416
uses: actions/checkout@v3
17+
2518
- name: Base Setup
2619
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
27-
- name: Install Dependencies
28-
run: pip install -e .
29-
30-
- name: Check Links
31-
if: ${{ matrix.group == 'link_check' }}
32-
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
3320

3421
- name: Check Release
35-
if: ${{ matrix.group == 'check_release' }}
3622
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
3723
with:
3824
token: ${{ secrets.GITHUB_TOKEN }}
25+
3926
- name: Upload Distributions
40-
if: ${{ matrix.group == 'check_release' }}
4127
uses: actions/upload-artifact@v3
4228
with:
43-
name: jupyter-releaser-dist-${{ github.run_number }}
44-
path: .jupyter_releaser_checkout/dist
29+
name: jupyterlab_lego_boost-releaser-dist-${{ github.run_number }}
30+
path: |
31+
.jupyter_releaser_checkout/dist

.github/workflows/prep-release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Step 1: Prep Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version_spec:
6+
description: "New Version Specifier"
7+
default: "next"
8+
required: false
9+
branch:
10+
description: "The branch to target"
11+
required: false
12+
post_version_spec:
13+
description: "Post Version Specifier"
14+
required: false
15+
since:
16+
description: "Use PRs with activity since this date or git reference"
17+
required: false
18+
since_last_stable:
19+
description: "Use PRs with activity since the last stable git tag"
20+
required: false
21+
type: boolean
22+
jobs:
23+
prep_release:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
27+
28+
- name: Prep Release
29+
id: prep-release
30+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
31+
with:
32+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
33+
version_spec: ${{ github.event.inputs.version_spec }}
34+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
35+
branch: ${{ github.event.inputs.branch }}
36+
since: ${{ github.event.inputs.since }}
37+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
38+
39+
- name: "** Next Step **"
40+
run: |
41+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

.github/workflows/publish-release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Step 2: Publish Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: "The target branch"
7+
required: false
8+
release_url:
9+
description: "The URL of the draft GitHub release"
10+
required: false
11+
steps_to_skip:
12+
description: "Comma separated list of steps to skip"
13+
required: false
14+
15+
jobs:
16+
publish_release:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
# This is useful if you want to use PyPI trusted publisher
20+
# and NPM provenance
21+
id-token: write
22+
steps:
23+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
24+
25+
- name: Populate Release
26+
id: populate-release
27+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
28+
with:
29+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
30+
branch: ${{ github.event.inputs.branch }}
31+
release_url: ${{ github.event.inputs.release_url }}
32+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
33+
34+
- name: Finalize Release
35+
id: finalize-release
36+
env:
37+
# The following are needed if you use legacy PyPI set up
38+
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
39+
# PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
40+
# TWINE_USERNAME: __token__
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
43+
with:
44+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
45+
release_url: ${{ steps.populate-release.outputs.release_url }}
46+
47+
- name: "** Next Step **"
48+
if: ${{ success() }}
49+
run: |
50+
echo "Verify the final release"
51+
echo ${{ steps.finalize-release.outputs.release_url }}
52+
53+
- name: "** Failure Message **"
54+
if: ${{ failure() }}
55+
run: |
56+
echo "Failed to Publish the Draft Release Url:"
57+
echo ${{ steps.populate-release.outputs.release_url }}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ pip-wheel-metadata/
4545
share/python-wheels/
4646
.installed.cfg
4747
*.egg
48-
MANIFEST
4948

5049
# PyInstaller
5150
# Usually these files are written by a python script from a template
5251
# before PyInstaller builds the exe, so as to inject date/other infos into it.
53-
*.manifest
5452
*.spec
5553

5654
# Installer logs
@@ -119,3 +117,6 @@ dmypy.json
119117

120118
# OSX files
121119
.DS_Store
120+
121+
# Yarn cache
122+
.yarn

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5+
!/package.json
56
jupyterlab_lego_boost
7+
8+
CHANGELOG.md

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2022, Denisa Checiu
3+
Copyright (c) 2024, QuantStack
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

MANIFEST.in

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ Link: https://www.lego.com/en-de/product/boost-creative-toolbox-17101
1818

1919
## Requirements
2020

21-
- JupyterLab == 3.4
21+
- JupyterLab >= 4.0.0
2222

2323
## Install
2424

2525
To install the extension, execute:
2626

2727
```bash
28-
micromamba create -n boost -c conda-forge python=3.9 nodejs=16 yarn jupyterlab=3.4 jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
29-
micromamba activate boost
3028
pip install jupyterlab-lego-boost
3129
```
3230

@@ -59,7 +57,7 @@ The `jlpm` command is JupyterLab's pinned version of
5957
`yarn` or `npm` in lieu of `jlpm` below.
6058

6159
```bash
62-
micromamba create -n boost -c conda-forge python=3.9 nodejs=16 yarn jupyterlab=3.4 jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
60+
micromamba create -n boost -c conda-forge python nodejs jupyterlab jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
6361
micromamba activate boost
6462
# Clone the repo to your local environment
6563
# Change directory to the jupyterlab-lego-boost directory

0 commit comments

Comments
 (0)