Jupyterlab extension for JupySQL
Project description
jupysql-plugin
Install
pip install jupysql-plugin
Contributing
Development install
conda create --name jupysql-plugin python=3.11 --channel conda-forge --yes
conda activate jupysql-plugin
conda install nodejs --channel conda-forge --yes
pip install -r requirements.txt
pip install -r requirements.dev.txt
jlpm install
Note: pkgmt format
can be used to format and lint before committing code.
# Note: this command will take some time the first time as it has to install
# and compile the frontend code
pip install -e "."
jupyter labextension develop . --overwrite
jupyter server extension enable jupysql_plugin
# NOTE: the two previous commands will fail if there are missing dependencies
# rebuild extension Typescript
# important: we had to set skipLibCheck: true
# https://discourse.jupyter.org/t/struggling-with-extensions-and-dependencies-versions/19550
jlpm build
To watch for changes and reload:
# in one terminal
jlpm watch
# another terminal
jupyter lab
Refresh JupyterLab to load the change in your browser.
By default, the jlpm build
command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
jupyter lab build --minimize=False
adding dependencies
jlpm add PACKAGE
# example
jlpm add @jupyter-widgets/base
Development uninstall
pip uninstall jupysql-plugin
In development mode, you will also need to remove the symlink created by jupyter labextension develop
command. To find its location, you can run jupyter labextension list
to figure out where the labextensions
folder is located. Then you can remove the symlink named jupysql-plugin
within that folder.
Testing the extension
This extension is using Jest for JavaScript code testing.
This extension uses Playwright for the integration tests (aka user level tests). More precisely, the JupyterLab helper Galata is used to handle testing the extension in JupyterLab. More information are provided within the ui-tests README.
To run the tests:
pip install nox pyyaml
# note that this will also create a venv
nox --session test
# to only run the python unit tests
pytest tests
Releasing the extension
See RELEASE
Configuration
The package.json
file contains a jupyterlab
extension. More information about
this section is here (you might need to switch the git branch dependin on which version JupyterLab version you're building for). The schema is here.
Ploomber Cloud API Endpoint
You can set the PLOOMBER_CLOUD_HOST
variable to switch the API endpoint (by default, it's set to our production API endpoint).
export PLOOMBER_CLOUD_HOST=https://cloudapi-dev.ploomber.io
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jupysql_plugin-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1904b9482562b6ca9e67a3e91a540481a18e3cd7f510f24f3f04899b7c449548 |
|
MD5 | b1aa925073808a29552f19a44b626e64 |
|
BLAKE2b-256 | ee5106aaf891286248246d7d01c90643686dd521c32dc82627617b74e44530d7 |