Skip to content

Commit

Permalink
Support jupyterlab v4 (#37)
Browse files Browse the repository at this point in the history
* Support jupyterlab v4

* Update azure-pipelines to support jlab3/4 builds
  • Loading branch information
SarantopoulosKon authored Jul 22, 2023
1 parent 3264a7a commit 6941234
Show file tree
Hide file tree
Showing 16 changed files with 7,760 additions and 8,449 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ yarn-error.log*
# Vscode
.vscode

# Yarn cache
.yarn/

# TypeScript incremental compilation cache
*.tsbuildinfo

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enableImmutableInstalls: false
nodeLinker: node-modules
55 changes: 21 additions & 34 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ stages:
- job: Build
strategy:
matrix:
mac_38:
imageName: 'macOS-11'
linux_py38_jlab3:
imageName: 'ubuntu-22.04'
python.version: '3.8'
mac_37:
imageName: 'macOS-11'
python.version: '3.7'
linux_py38:
imageName: 'ubuntu-20.04'
jupyterlab.version: '3.6.5'
linux_py39_jlab3:
imageName: 'ubuntu-22.04'
python.version: '3.9'
jupyterlab.version: '3.6.5'
linux_py38_jlab4:
imageName: 'ubuntu-22.04'
python.version: '3.8'
linux_py37:
imageName: 'ubuntu-20.04'
python.version: '3.7'
jupyterlab.version: '4.0.2'
linux_py39_jlab4:
imageName: 'ubuntu-22.04'
python.version: '3.9'
jupyterlab.version: '4.0.2'
pool:
vmImage: $(imageName)

Expand All @@ -33,38 +37,21 @@ stages:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: |
echo $(node -v)
npm install --global yarn
displayName: 'Install NodeJS and yarn'
condition: eq(variables['imageName'], 'macOS-11')
- script: |
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install nodejs
displayName: 'Install NodeJS'
condition: eq(variables['imageName'], 'ubuntu-20.04')
- script: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
displayName: 'Install yarn'
condition: eq(variables['imageName'], 'ubuntu-20.04')
- script: python -m pip install --upgrade ipywidgets traitlets pytest build jupyter-packaging==0.12.0 jupyterlab==3.3.4
- script: python -m pip install --upgrade ipywidgets traitlets pytest build jupyter-packaging==0.12.0 jupyterlab==$(jupyterlab.version)
# pip installs release candidates by default:
# https://github.com/pypa/pip/issues/4969
displayName: 'Install dependencies'

- script: python -m pip install black==22.3.0
displayName: 'Install black (linter)'
condition: eq(variables['python.version'], '3.7')
condition: eq(variables['python.version'], '3.9')
- script: black --check .
displayName: 'Test Formating'
condition: eq(variables['python.version'], '3.7')
condition: eq(variables['python.version'], '3.9')

- task: NodeTool@0
inputs:
versionSpec: '14.x'
versionSpec: '18.x'
- script: jlpm
displayName: 'Install labextension dependencies'
env:
Expand Down Expand Up @@ -105,20 +92,20 @@ stages:
jobs:
- job: Deploy_package
pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
architecture: 'x64'

- script: 'pip install twine build setuptools setuptools_scm jupyter-packaging==0.12.0 jupyterlab==3.3.4'
- script: 'pip install twine build setuptools setuptools_scm jupyter-packaging==0.12.0 jupyterlab==3.6.5'
displayName: 'Install twine/build'

- task: NodeTool@0
inputs:
versionSpec: '14.x'
versionSpec: '18.x'
- script: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
jlpm
Expand Down
28 changes: 8 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,15 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@jupyterlab/application": "^3.1.0",
"@jupyterlab/apputils": "^3.2.0",
"@jupyterlab/coreutils": "^5.1.0",
"@jupyterlab/docmanager": "^3.2.0",
"@jupyterlab/filebrowser": "^3.2.0",
"@jupyterlab/launcher": "^3.2.0",
"@jupyterlab/mainmenu": "^3.2.0",
"@jupyterlab/services": "^6.1.0",
"@tiledb-inc/tiledb-cloud": "^1.0.10",
"git-tag-version": "^1.3.1"
"@jupyterlab/application": "^3.1.0 || ^4.0.2",
"@jupyterlab/apputils": "^3.2.0 || ^4.0.2",
"@jupyterlab/coreutils": "^5.1.0 || ^6",
"@jupyterlab/launcher": "^3.2.0 || ^4.0.2",
"@jupyterlab/mainmenu": "^3.2.0 || ^4.0.2",
"@jupyterlab/services": "^6.1.0 || ^7.0.2"
},
"devDependencies": {
"@jupyterlab/builder": "^3.1.0",
"@jupyterlab/builder": "^3.1.0 || ^4.0.2",
"@types/jest": "^27.0.2",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
Expand All @@ -73,7 +69,7 @@
"rimraf": "^3.0.2",
"ts-jest": "^27.0.5",
"ts-node": "^9.1.1",
"typescript": "~4.1.3"
"typescript": "~5.1.6"
},
"sideEffects": [
"style/*.css",
Expand All @@ -96,13 +92,5 @@
},
"extension": true,
"outputDir": "tiledb-prompt-options/labextension"
},
"jupyter-releaser": {
"hooks": {
"before-build-npm": [
"python -m pip install jupyterlab~=3.1",
"jlpm"
]
}
}
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
install_requires=[
"jupyter_server>=1.6,<2",
"jupyter_server>=1.6",
"tiledb>=0.7.0",
"tiledb-cloud>=0.6.7",
],
Expand Down
Loading

0 comments on commit 6941234

Please sign in to comment.