{"id":20101584,"url":"https://github.com/ploomber/jupysql-plugin","last_synced_at":"2025-12-14T13:33:47.418Z","repository":{"id":153395025,"uuid":"614684219","full_name":"ploomber/jupysql-plugin","owner":"ploomber","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-12T10:40:33.000Z","size":1553,"stargazers_count":15,"open_issues_count":28,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-06-13T10:24:51.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ploomber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-16T05:11:41.000Z","updated_at":"2024-06-14T10:37:33.041Z","dependencies_parsed_at":"2023-12-23T20:36:45.009Z","dependency_job_id":"5b2f68e4-5bb0-4c78-88bf-93ef6cf9c895","html_url":"https://github.com/ploomber/jupysql-plugin","commit_stats":null,"previous_names":["ploomber/jupysql-autocompletion"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ploomber%2Fjupysql-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ploomber%2Fjupysql-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ploomber%2Fjupysql-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ploomber%2Fjupysql-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ploomber","download_url":"https://codeload.github.com/ploomber/jupysql-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230268710,"owners_count":18199805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T17:25:50.726Z","updated_at":"2025-12-14T13:33:42.358Z","avatar_url":"https://github.com/ploomber.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jupysql-plugin\n\n\u003e [!TIP]\n\u003e Deploy AI apps for free on [Ploomber Cloud!](https://ploomber.io/?utm_medium=github\u0026utm_source=jupysql-plugin)\n\n\u003e [!NOTE]\n\u003e Code in the `main` branch is compatible with JupyterLab 4 (`0.4.x` or higher releases),\n\u003e the `jupyterlab3` branch contains code compatible with JupyterLab 3 (`0.3.x` releases).\n\u003e We'll keep backporting some features and making `0.3.x` releases for some time, but\n\u003e we highly recommend upgrading to JupyterLab 4 for a better experience.\n\n\n## Install\n\n```bash\npip install jupysql-plugin\n```\n\n## Contributing\n\n### Development install\n\n```sh\nconda create --name jupysql-plugin python=3.11 --channel conda-forge --yes\nconda activate jupysql-plugin\nconda install nodejs=20 --channel conda-forge --yes\npip install -r requirements.txt\npip install -r requirements.dev.txt\n\njlpm install\n```\nNote: `pkgmt format` can be used to format and lint Python files before committing code. \nTo format JavaScript and TypeScript files, use `yarn run eslint`. To lint without formatting,\nuse `yarn run eslint:check`\n\n```bash\n# Note: this command will take some time the first time as it has to compile the\n# frontend code. If the command fails, see the \"troubleshooting setup\" section below\npip install -e \".\"\n\n# upon installation, both the frontend and backend extensions must be activated\n# automatically, you can verify it by ensuring jupysql-plugin appears here:\njupyter labextension list # frontend extension\njupyter server extension list # backend extension\n\n# if they don't appear, you can activate them manually, but this means that\n# the setup is incorrect! see pyproject.toml, under\n# tool.hatch.build.targets.wheel.shared-data, and fix any issues\n\n# activate manually\njupyter server extension enable jupysql_plugin\njupyter labextension enable jupysql_plugin\n\n\njupyter labextension develop . --overwrite\n\n# NOTE: the two previous commands will fail if there are missing dependencies\n\n# rebuild extension Typescript\n# important: we had to set skipLibCheck: true\n# https://discourse.jupyter.org/t/struggling-with-extensions-and-dependencies-versions/19550\njlpm build\n```\n\nTo watch for changes and reload:\n\n```bash\n# in one terminal\njlpm watch\n\n# another terminal\njupyter lab\n```\n\nRefresh JupyterLab to load the change in your browser.\n\nBy 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:\n\n```bash\njupyter lab build --minimize=False\n```\n\n### Troubleshooting setup\n\nIf you encounter errors when installing the package for development, you can try the\nfollowing to configure an environment from scratch:\n\n```sh\n# remove conda environment\nconda env remove --name jupysql-plugin\n\n# delete yarn.lock\nrm yarn.lock\n\n# delete all temporary files\ngit clean -fdx\n```\n\nThen, create the conda environment again, install dependencies (`jlpm install`), and\nbuild the extension manually (`jupyter labextension build --development True .`).\nFinally, verify if `pip install -e \".\"` works.\n\n\n### Adding dependencies\n\n```bash\njlpm add PACKAGE\n\n# example\njlpm add @jupyter-widgets/base\n```\n\n### Development uninstall\n\n```bash\npip uninstall jupysql-plugin\n```\n\nIn development mode, you will also need to remove the symlink created by `jupyter labextension develop`\ncommand. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`\nfolder is located. Then you can remove the symlink named `jupysql-plugin` within that folder.\n\n### Testing the extension\n\nThis extension is using [Jest](https://jestjs.io/) for JavaScript code testing.\n\nThis extension uses [Playwright](https://playwright.dev/docs/intro/) for the integration tests (aka user level tests).\nMore precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab. More information are provided within the [ui-tests](./ui-tests/README.md) README.\n\nTo run the tests:\n\n```sh\npip install nox pyyaml\n\n# unit tests\nnox --session test\n\n# ui tests\nnox --session ui_test\n\n# to only run the python unit tests\npytest tests\n```\n\n### Releasing the extension\n\nSee [RELEASE](RELEASE.md)\n\n### Configuration\n\nThe `package.json` file contains a `jupyterlab` extension. More information about\nthis section is [here](https://github.com/jupyterlab/jupyterlab/blob/main/docs/source/extension/extension_dev.rst) (you might need to switch the git branch dependin on which version JupyterLab version you're building for). The schema is [here](https://github.com/jupyterlab/jupyterlab/blob/main/builder/metadata_schema.json).\n\n### Ploomber Cloud API Endpoint\n\nYou can set the `PLOOMBER_CLOUD_HOST` variable to switch the API endpoint (by default, it's set to our production API endpoint).\n\n```sh\nexport PLOOMBER_CLOUD_HOST=https://cloudapi-dev.ploomber.io\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fploomber%2Fjupysql-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fploomber%2Fjupysql-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fploomber%2Fjupysql-plugin/lists"}