Skip to content

Commit

Permalink
vdk-jupyter: publish image to pip registry (#2407)
Browse files Browse the repository at this point in the history
# Why
We need to publish the image to a pip registry so others can consume it
and setup is easy and doesn't require cloning the source code

# What
Most plugins are installed using the same command. which is declared in
a common gitlab file.
For building this plugin I didn't think it made sense to reuse that code
as building jupyter is a little more complicated.
So the release is totally new code. 


# How was this tested
I published to the registry and installed locally. 

Commands: 
```
pip install -U vdk_jupyterlab_extension
jupyter lab
```
Make sure the UI has the correct panels
![Screenshot 2023-07-13 at 12 32
42](https://github.com/vmware/versatile-data-kit/assets/9319000/a2484490-f367-4608-8df0-1b64debd156d)

---------

Signed-off-by: murphp15 <[email protected]>
Co-authored-by: paulm2 <[email protected]>
  • Loading branch information
murphp15 and paulm2 authored Jul 14, 2023
1 parent f079376 commit 4d07d8b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
22 changes: 22 additions & 0 deletions projects/vdk-plugins/vdk-jupyter/.plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,25 @@ build-vdk-jupyterlab-extension:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes:
- "projects/vdk-plugins/vdk-jupyter/**/*"


release-vdk-jupyter:
variables:
PLUGIN_NAME:
image: "python:3.10-alpine"
stage: release
before_script:
- export VDK_PATCH_VERSION=${CI_PIPELINE_ID}
script:
- cd projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/ || exit 1
- apk --no-cache add npm rust cargo libffi-dev
- pip install -U pip setuptools wheel twine pre-commit build hatch jupyter
- hatch version 0.1.$VDK_PATCH_VERSION
- python -m build
- twine upload --repository-url $PIP_REPO_UPLOAD_URL -u "$PIP_REPO_UPLOAD_USER_NAME" -p "$PIP_REPO_UPLOAD_USER_PASSWORD" dist/* --verbose
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
changes:
- "projects/vdk-plugins/vdk-jupyter/**/*"
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ for the frontend extension.
- Versatile Data Kit
- npm

## Install

To install the extension,first navigate to the project directory and then execute:
## Install and run

```bash
# Once in the project directory, use the npm ci command to install
# the exact versions of the dependencies specified in the package-lock.json
npm ci
# Install the extension
# install the extension
pip install vdk-jupyterlab-extension
# run jupyterlab
jupyter lab
```

## Uninstall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
dependencies = [
"jupyter_server>=1.6,<3"
"jupyter_server>=1.6,<3",
"jupyterlab==3.6.3",
"vdk-control-cli",
"vdk-core"
]
dynamic = ["version", "description", "authors", "urls", "keywords"]

Expand Down

This file was deleted.

0 comments on commit 4d07d8b

Please sign in to comment.