Skip to content

Commit 7f33f2c

Browse files
authored
Merge pull request #17 from QuantStack/migrateV4
Upgrade to `v0.3.2` of `jupyterlab-blockly`
2 parents 3b70bde + 3068f41 commit 7f33f2c

23 files changed

+7320
-26241
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ examples
1212
.eslintignore
1313
.eslintrc.js
1414
.gitignore
15+
16+
.yarn.yml

.github/workflows/build.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,39 @@ jobs:
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616

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

2020
- name: Install dependencies
21-
run: python -m pip install -U check-manifest jupyterlab
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-niryo-one.*OK"
3636
python -m jupyterlab.browser_check
37-
37+
3838
- name: Package the extension
3939
run: |
4040
set -eux
41-
check-manifest -v
4241
4342
pip install build
4443
python -m build
4544
pip uninstall -y "jupyterlab_niryo_one" jupyterlab
4645
4746
- name: Upload extension packages
48-
uses: actions/upload-artifact@v2
47+
uses: actions/upload-artifact@v3
4948
with:
5049
name: extension-artifacts
5150
path: dist/jupyterlab_niryo_one*
@@ -56,14 +55,12 @@ jobs:
5655
runs-on: ubuntu-latest
5756

5857
steps:
59-
- name: Checkout
60-
uses: actions/checkout@v2
6158
- name: Install Python
62-
uses: actions/setup-python@v2
59+
uses: actions/setup-python@v4
6360
with:
6461
python-version: '3.9'
6562
architecture: 'x64'
66-
- uses: actions/download-artifact@v2
63+
- uses: actions/download-artifact@v3
6764
with:
6865
name: extension-artifacts
6966
- name: Install and Test
@@ -73,10 +70,18 @@ jobs:
7370
sudo rm -rf $(which node)
7471
sudo rm -rf $(which node)
7572
76-
pip install jupyterlab jupyterlab_niryo_one*.whl
73+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_niryo_one*.whl
7774
7875
7976
jupyter labextension list
8077
jupyter labextension list 2>&1 | grep -ie "jupyterlab-niryo-one.*OK"
81-
python -m jupyterlab.browser_check --no-chrome-test
78+
python -m jupyterlab.browser_check --no-browser-test
8279
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: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
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
@@ -15,49 +13,19 @@ jobs:
1513
runs-on: ubuntu-latest
1614
steps:
1715
- name: Checkout
18-
uses: actions/checkout@v2
19-
- name: Install Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: 3.9
23-
architecture: 'x64'
24-
- name: Install node
25-
uses: actions/setup-node@v2
26-
with:
27-
node-version: '14.x'
28-
29-
30-
- name: Get pip cache dir
31-
id: pip-cache
32-
run: |
33-
echo "::set-output name=dir::$(pip cache dir)"
34-
- name: Cache pip
35-
uses: actions/cache@v1
36-
with:
37-
path: ${{ steps.pip-cache.outputs.dir }}
38-
key: ${{ runner.os }}-pip-${{ hashFiles('package.json') }}
39-
restore-keys: |
40-
${{ runner.os }}-pip-
41-
- name: Cache checked links
42-
uses: actions/cache@v2
43-
with:
44-
path: ~/.cache/pytest-link-check
45-
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/.md') }}-md-links
46-
restore-keys: |
47-
${{ runner.os }}-linkcheck-
48-
- name: Upgrade packaging dependencies
49-
run: |
50-
pip install --upgrade pip setuptools wheel jupyter-packaging~=0.10 --user
51-
- name: Install Dependencies
52-
run: |
53-
pip install .
16+
uses: actions/checkout@v3
17+
18+
- name: Base Setup
19+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
20+
5421
- name: Check Release
55-
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
22+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
5623
with:
5724
token: ${{ secrets.GITHUB_TOKEN }}
58-
25+
5926
- name: Upload Distributions
60-
uses: actions/upload-artifact@v2
27+
uses: actions/upload-artifact@v3
6128
with:
6229
name: jupyterlab_niryo_one-releaser-dist-${{ github.run_number }}
63-
path: .jupyter_releaser_checkout/dist
30+
path: |
31+
.jupyter_releaser_checkout/dist

.github/workflows/enforce-label.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: enforce-triage-label
13+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

.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
@@ -43,12 +43,10 @@ pip-wheel-metadata/
4343
share/python-wheels/
4444
.installed.cfg
4545
*.egg
46-
MANIFEST
4746

4847
# PyInstaller
4948
# Usually these files are written by a python script from a template
5049
# before PyInstaller builds the exe, so as to inject date/other infos into it.
51-
*.manifest
5250
*.spec
5351

5452
# Installer logs
@@ -117,3 +115,6 @@ dmypy.json
117115

118116
# OSX files
119117
.DS_Store
118+
119+
# Yarn cache
120+
.yarn

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5+
!/package.json
56
jupyterlab_niryo_one
67

78
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, quantstack
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 & 29 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Docs: https://docs.niryo.com/dev/pyniryo/v1.1.2/en/index.html
2626

2727
## Requirements
2828

29-
- JupyterLab == 3.4
29+
- JupyterLab >= 4.0.0
3030

3131
## Install
3232

@@ -63,7 +63,7 @@ The `jlpm` command is JupyterLab's pinned version of
6363
`yarn` or `npm` in lieu of `jlpm` below.
6464

6565
```bash
66-
micromamba create -n niryo -c conda-forge python nodejs yarn jupyterlab==3.4 jupyter-packaging jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
66+
micromamba create -n niryo -c conda-forge python nodejs yarn jupyterlab jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
6767
micromamba activate niryo
6868
# Clone the repo to your local environment
6969
# Change directory to the jupyterlab_niryo_one directory

0 commit comments

Comments
 (0)