Skip to content

Commit

Permalink
Upgrade to Jupyterlab 4
Browse files Browse the repository at this point in the history
  • Loading branch information
peytondmurray committed Apr 28, 2023
1 parent ac55437 commit 6f195be
Show file tree
Hide file tree
Showing 18 changed files with 5,722 additions and 6,601 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

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

This file was deleted.

104 changes: 69 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,82 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
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: Build the extension
run: |
set -eux
python -m pip install .[test]
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-skip-traceback.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlab-skip-traceback" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
node-version: '14.x'
name: extension-artifacts
path: dist/jupyterlab-skip-traceback*
if-no-files-found: error

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

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.9'
architecture: 'x64'


- name: Setup pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-3.7-${{ hashFiles('package.json') }}
restore-keys: |
pip-3.7-
pip-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Setup yarn cache
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- uses: actions/download-artifact@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Install dependencies
run: python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.7.9
- name: Build the extension
name: extension-artifacts
- name: Install and Test
run: |
jlpm
jlpm run eslint:check
python -m pip install .
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-skip-traceback*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-skip-traceback.*OK"
python -m jupyterlab.browser_check
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
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
*.bundle.*
lib/
node_modules/
*.log
.eslintcache
.stylelintcache
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
jupyterlab-skip-traceback/labextension
# Version file is handled by hatchling
jupyterlab-skip-traceback/_version.py

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
Expand Down Expand Up @@ -56,6 +61,7 @@ htmlcov/
.coverage.*
.cache
nosetests.xml
coverage/
coverage.xml
*.cover
.hypothesis/
Expand Down Expand Up @@ -111,5 +117,5 @@ dmypy.json
# OSX files
.DS_Store

# Jupyter Upgrades
_temp_extension
# Yarn cache
.yarn/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
**/node_modules
**/lib
**/package.json
!/package.json
jupyterlab-skip-traceback
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
24 changes: 4 additions & 20 deletions jupyterlab-skip-traceback/_version.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
import json
from pathlib import Path

__all__ = ["__version__"]


def _fetchVersion():
HERE = Path(__file__).parent.resolve()

for settings in HERE.rglob("package.json"):
try:
with settings.open() as f:
return json.load(f)["version"]
except FileNotFoundError:
pass

raise FileNotFoundError(f"Could not find package.json under dir {HERE!s}")


__version__ = _fetchVersion()
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore
__version__ = VERSION = '4.0.4'
Loading

0 comments on commit 6f195be

Please sign in to comment.