Skip to content

Commit 022b808

Browse files
authored
Merge pull request #110 from martinRenou/lab4
Update JupyterLab 4
2 parents 8f02f56 + 8544768 commit 022b808

33 files changed

+11917
-8279
lines changed

.github/workflows/build.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Base Setup
18+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
19+
20+
- name: Install dependencies
21+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
22+
23+
- name: Lint the extension
24+
run: |
25+
set -eux
26+
jlpm
27+
jlpm run lint:check
28+
29+
- name: Build the extension
30+
run: |
31+
set -eux
32+
python -m pip install .[test]
33+
34+
jupyter labextension list
35+
jupyter labextension list 2>&1 | grep -ie "@jupyter-widgets/jupyterlab-sidecar.*OK"
36+
37+
- name: Package the extension
38+
run: |
39+
set -eux
40+
41+
pip install build
42+
python -m build
43+
pip uninstall -y "sidecar" jupyterlab
44+
45+
- name: Upload extension packages
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: extension-artifacts
49+
path: dist/sidecar*
50+
if-no-files-found: error
51+
52+
test_isolated:
53+
needs: build
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- name: Install Python
58+
uses: actions/setup-python@v4
59+
with:
60+
python-version: '3.9'
61+
architecture: 'x64'
62+
- uses: actions/download-artifact@v3
63+
with:
64+
name: extension-artifacts
65+
- name: Install and Test
66+
run: |
67+
set -eux
68+
# Remove NodeJS, twice to take care of system and locally installed node versions.
69+
sudo rm -rf $(which node)
70+
sudo rm -rf $(which node)
71+
72+
pip install "jupyterlab>=4.0.0,<5" sidecar*.whl
73+
74+
jupyter labextension list
75+
jupyter labextension list 2>&1 | grep -ie "@jupyter-widgets/jupyterlab-sidecar.*OK"
76+
77+
78+
check_links:
79+
name: Check Links
80+
runs-on: ubuntu-latest
81+
timeout-minutes: 15
82+
steps:
83+
- uses: actions/checkout@v3
84+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
85+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

.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

.gitignore

Lines changed: 45 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
*.bundle.*
2+
lib/
3+
node_modules/
4+
*.log
5+
.eslintcache
6+
.stylelintcache
7+
*.egg-info/
8+
.ipynb_checkpoints
9+
*.tsbuildinfo
10+
sidecar/labextension
11+
# Version file is handled by hatchling
12+
sidecar/_version.py
13+
14+
# Created by https://www.gitignore.io/api/python
15+
# Edit at https://www.gitignore.io/?templates=python
16+
17+
### Python ###
118
# Byte-compiled / optimized / DLL files
219
__pycache__/
320
*.py[cod]
@@ -8,7 +25,6 @@ __pycache__/
825

926
# Distribution / packaging
1027
.Python
11-
env/
1228
build/
1329
develop-eggs/
1430
dist/
@@ -20,9 +36,12 @@ lib64/
2036
parts/
2137
sdist/
2238
var/
23-
*.egg-info/
39+
wheels/
40+
pip-wheel-metadata/
41+
share/python-wheels/
2442
.installed.cfg
2543
*.egg
44+
MANIFEST
2645

2746
# PyInstaller
2847
# Usually these files are written by a python script from a template
@@ -37,119 +56,66 @@ pip-delete-this-directory.txt
3756
# Unit test / coverage reports
3857
htmlcov/
3958
.tox/
59+
.nox/
4060
.coverage
4161
.coverage.*
4262
.cache
4363
nosetests.xml
64+
coverage/
4465
coverage.xml
45-
*,cover
66+
*.cover
4667
.hypothesis/
68+
.pytest_cache/
4769

4870
# Translations
4971
*.mo
5072
*.pot
5173

52-
# Django stuff:
53-
*.log
54-
local_settings.py
55-
56-
# Flask instance folder
57-
instance/
58-
5974
# Scrapy stuff:
6075
.scrapy
6176

6277
# Sphinx documentation
6378
docs/_build/
64-
docs/source/_static/embed-bundle.js
65-
docs/source/_static/embed-bundle.js.map
6679

6780
# PyBuilder
6881
target/
6982

70-
# IPython Notebook
71-
.ipynb_checkpoints
72-
7383
# pyenv
7484
.python-version
7585

7686
# celery beat schedule file
7787
celerybeat-schedule
7888

79-
# dotenv
80-
.env
81-
82-
# virtualenv
83-
venv/
84-
ENV/
89+
# SageMath parsed files
90+
*.sage.py
8591

8692
# Spyder project settings
8793
.spyderproject
94+
.spyproject
8895

8996
# Rope project settings
9097
.ropeproject
9198

92-
# =========================
93-
# Operating System Files
94-
# =========================
99+
# Mr Developer
100+
.mr.developer.cfg
101+
.project
102+
.pydevproject
95103

96-
# OSX
97-
# =========================
104+
# mkdocs documentation
105+
/site
98106

99-
.DS_Store
100-
.AppleDouble
101-
.LSOverride
102-
103-
# Thumbnails
104-
._*
105-
106-
# Files that might appear in the root of a volume
107-
.DocumentRevisions-V100
108-
.fseventsd
109-
.Spotlight-V100
110-
.TemporaryItems
111-
.Trashes
112-
.VolumeIcon.icns
113-
114-
# Directories potentially created on remote AFP share
115-
.AppleDB
116-
.AppleDesktop
117-
Network Trash Folder
118-
Temporary Items
119-
.apdisk
120-
121-
# Windows
122-
# =========================
123-
124-
# Windows image file caches
125-
Thumbs.db
126-
ehthumbs.db
127-
128-
# Folder config file
129-
Desktop.ini
107+
# mypy
108+
.mypy_cache/
109+
.dmypy.json
110+
dmypy.json
130111

131-
# Recycle Bin used on file shares
132-
$RECYCLE.BIN/
112+
# Pyre type checker
113+
.pyre/
133114

134-
# Windows Installer files
135-
*.cab
136-
*.msi
137-
*.msm
138-
*.msp
115+
# End of https://www.gitignore.io/api/python
139116

140-
# Windows shortcuts
141-
*.lnk
142-
143-
144-
# NPM
145-
# ----
146-
147-
**/node_modules/
148-
sidecar/labextension/*.tgz
149-
150-
# Coverage data
151-
# -------------
152-
**/coverage/
117+
# OSX files
118+
.DS_Store
153119

154-
# Packed lab extensions
155-
sidecar/labextension
120+
# Yarn cache
121+
.yarn/

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
**/node_modules
3+
**/lib
4+
**/package.json
5+
!/package.json
6+
sidecar

.stylelintrc.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
$schema: https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json
2+
3+
extends:
4+
- stylelint-config-recommended
5+
- stylelint-config-standard
6+
- stylelint-prettier/recommended
7+
8+
plugins:
9+
- stylelint-csstree-validator
10+
11+
rules:
12+
import-notation: null
13+
# TODO: fix all of these rules violated in stylelint-config-recommended
14+
no-descending-specificity: null
15+
# this fixer is incompatible with the copyright headers
16+
comment-whitespace-inside: null
17+
# these fixers assume use of `autoprefixer`: we _don't_ use any CSS preprocessors
18+
property-no-vendor-prefix: null
19+
selector-no-vendor-prefix: null
20+
value-no-vendor-prefix: null
21+
# these fixers doesn't work well with variables
22+
alpha-value-notation: null
23+
color-function-notation: null
24+
# TODO: evaluate these unfixable rules violated in stylelint-config-standard
25+
custom-property-pattern: null
26+
declaration-block-no-redundant-longhand-properties: null
27+
function-linear-gradient-no-nonstandard-direction: null
28+
function-url-quotes: null
29+
keyframes-name-pattern: null
30+
number-max-precision: null
31+
selector-class-pattern: null
32+
selector-id-pattern: null
33+
selector-pseudo-class-no-unknown: null
34+
selector-pseudo-element-no-unknown: null
35+
selector-not-notation: null
36+
# disallow use of more than one bare HTML tag like `div span` to avoid performance regression,
37+
# while allowing compounded HTML tags like `button.jp-Button`
38+
selector-max-type:
39+
- 1
40+
- ignore: "compounded"
41+
# matching complex selectors is expensive
42+
selector-max-class: 4
43+
# TODO: decrease max-compound to 3
44+
selector-max-compound-selectors: 4
45+
# TODO: decrease to 0
46+
selector-max-universal: 1
47+
csstree/validator: true

.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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2023, Project Jupyter
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)