jl-db-comp 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jl_db_comp/__init__.py +36 -0
- jl_db_comp/_version.py +4 -0
- jl_db_comp/labextension/build_log.json +728 -0
- jl_db_comp/labextension/package.json +219 -0
- jl_db_comp/labextension/schemas/jl_db_comp/package.json.orig +214 -0
- jl_db_comp/labextension/schemas/jl_db_comp/plugin.json +27 -0
- jl_db_comp/labextension/static/lib_index_js.a0969ed73da70f2cc451.js +561 -0
- jl_db_comp/labextension/static/lib_index_js.a0969ed73da70f2cc451.js.map +1 -0
- jl_db_comp/labextension/static/remoteEntry.5763ae02737e035e938c.js +560 -0
- jl_db_comp/labextension/static/remoteEntry.5763ae02737e035e938c.js.map +1 -0
- jl_db_comp/labextension/static/style.js +4 -0
- jl_db_comp/labextension/static/style_index_js.5364c7419a6b9db5d727.js +508 -0
- jl_db_comp/labextension/static/style_index_js.5364c7419a6b9db5d727.js.map +1 -0
- jl_db_comp/routes.py +332 -0
- jl_db_comp/tests/__init__.py +1 -0
- jl_db_comp/tests/test_routes.py +49 -0
- jl_db_comp-0.1.0.data/data/etc/jupyter/jupyter_server_config.d/jl_db_comp.json +7 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/build_log.json +728 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/install.json +5 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/package.json +219 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/schemas/jl_db_comp/package.json.orig +214 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/schemas/jl_db_comp/plugin.json +27 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/lib_index_js.a0969ed73da70f2cc451.js +561 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/lib_index_js.a0969ed73da70f2cc451.js.map +1 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/remoteEntry.5763ae02737e035e938c.js +560 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/remoteEntry.5763ae02737e035e938c.js.map +1 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/style.js +4 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/style_index_js.5364c7419a6b9db5d727.js +508 -0
- jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/style_index_js.5364c7419a6b9db5d727.js.map +1 -0
- jl_db_comp-0.1.0.dist-info/METADATA +440 -0
- jl_db_comp-0.1.0.dist-info/RECORD +33 -0
- jl_db_comp-0.1.0.dist-info/WHEEL +4 -0
- jl_db_comp-0.1.0.dist-info/licenses/LICENSE +29 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jl_db_comp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A JupyterLab extension to complete db queries in jupyterlab notebooks
|
|
5
|
+
Project-URL: Homepage, https://github.com/Ben-Herz/jl_db_completer
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/Ben-Herz/jl_db_completer/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/Ben-Herz/jl_db_completer.git
|
|
8
|
+
Author-email: jl_db_completer <herzben@pm.me>
|
|
9
|
+
License: BSD 3-Clause License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2025, jl_db_completer
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
Redistribution and use in source and binary forms, with or without
|
|
15
|
+
modification, are permitted provided that the following conditions are met:
|
|
16
|
+
|
|
17
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
18
|
+
list of conditions and the following disclaimer.
|
|
19
|
+
|
|
20
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimer in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
25
|
+
contributors may be used to endorse or promote products derived from
|
|
26
|
+
this software without specific prior written permission.
|
|
27
|
+
|
|
28
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
29
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
30
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
31
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
32
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
33
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
34
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
35
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
36
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
37
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
+
License-File: LICENSE
|
|
39
|
+
Keywords: jupyter,jupyterlab,jupyterlab-extension
|
|
40
|
+
Classifier: Framework :: Jupyter
|
|
41
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
42
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
43
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
|
|
44
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
45
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
46
|
+
Classifier: Programming Language :: Python
|
|
47
|
+
Classifier: Programming Language :: Python :: 3
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
50
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
51
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
53
|
+
Requires-Python: >=3.10
|
|
54
|
+
Requires-Dist: jupyter-server<3,>=2.4.0
|
|
55
|
+
Requires-Dist: psycopg2-binary>=2.9.0
|
|
56
|
+
Provides-Extra: dev
|
|
57
|
+
Requires-Dist: jupyterlab>=4; extra == 'dev'
|
|
58
|
+
Provides-Extra: test
|
|
59
|
+
Requires-Dist: coverage; extra == 'test'
|
|
60
|
+
Requires-Dist: pytest; extra == 'test'
|
|
61
|
+
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
62
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
63
|
+
Requires-Dist: pytest-jupyter[server]>=0.6.0; extra == 'test'
|
|
64
|
+
Description-Content-Type: text/markdown
|
|
65
|
+
|
|
66
|
+
# jl_db_comp
|
|
67
|
+
|
|
68
|
+
[](https://github.com/Ben-Herz/jl_db_completer/actions/workflows/build.yml)
|
|
69
|
+
|
|
70
|
+
A JupyterLab extension that provides PostgreSQL table and column name autocompletion when typing SQL queries in notebooks and editors.
|
|
71
|
+
|
|
72
|
+
## Features
|
|
73
|
+
|
|
74
|
+
- **Smart SQL Detection**: Automatically activates when SQL keywords (SELECT, FROM, JOIN, etc.) are detected
|
|
75
|
+
- **PostgreSQL Integration**: Queries table and column names from PostgreSQL databases
|
|
76
|
+
- **Client-Side Caching**: 5-minute TTL cache to minimize database calls
|
|
77
|
+
- **Configurable**: Database connection via environment variable or settings
|
|
78
|
+
- **Schema Support**: Query specific database schemas (defaults to 'public')
|
|
79
|
+
|
|
80
|
+
This extension is composed of a Python package named `jl_db_comp`
|
|
81
|
+
for the server extension and a NPM package named `jl_db_comp`
|
|
82
|
+
for the frontend extension.
|
|
83
|
+
|
|
84
|
+
## Requirements
|
|
85
|
+
|
|
86
|
+
- JupyterLab >= 4.0.0
|
|
87
|
+
- PostgreSQL database
|
|
88
|
+
- Python >= 3.10
|
|
89
|
+
|
|
90
|
+
## Install
|
|
91
|
+
|
|
92
|
+
To install the extension, execute:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pip install jl_db_comp
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Configuration
|
|
99
|
+
|
|
100
|
+
### Database Connection
|
|
101
|
+
|
|
102
|
+
There are two ways to configure your PostgreSQL database connection:
|
|
103
|
+
|
|
104
|
+
#### Option 1: Environment Variable (Recommended)
|
|
105
|
+
|
|
106
|
+
Set the `POSTGRES_URL` environment variable before starting JupyterLab:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
export POSTGRES_URL="postgresql://user:password@localhost:5432/dbname"
|
|
110
|
+
jupyter lab
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Option 2: JupyterLab Settings
|
|
114
|
+
|
|
115
|
+
1. Open JupyterLab Settings (Settings → Settings Editor)
|
|
116
|
+
2. Search for "PostgreSQL Database Completer"
|
|
117
|
+
3. Configure:
|
|
118
|
+
- **Database URL**: PostgreSQL connection string
|
|
119
|
+
- **Schema**: Database schema to query (default: 'public')
|
|
120
|
+
- **Enabled**: Toggle completions on/off
|
|
121
|
+
|
|
122
|
+
### Connection String Format
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
postgresql://[user[:password]@][host][:port][/dbname]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Examples:**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Local database
|
|
132
|
+
postgresql://postgres:example@localhost:5432/ehrexample
|
|
133
|
+
|
|
134
|
+
# Remote database with SSL
|
|
135
|
+
postgresql://user:pass@db.example.com:5432/mydb?sslmode=require
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Usage
|
|
139
|
+
|
|
140
|
+
### Table Name Completion
|
|
141
|
+
|
|
142
|
+
Type SQL and press **Tab** or **Ctrl+Space** to see table names:
|
|
143
|
+
|
|
144
|
+
```sql
|
|
145
|
+
SELECT * FROM pat<Tab>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Completions will show:**
|
|
149
|
+
|
|
150
|
+
- 📋 patients
|
|
151
|
+
- 📋 patient_visits
|
|
152
|
+
- 📋 patient_records
|
|
153
|
+
|
|
154
|
+
### Column Name Completion (After Table Name)
|
|
155
|
+
|
|
156
|
+
After typing a table name followed by a dot, you'll see **only the columns from that table**:
|
|
157
|
+
|
|
158
|
+
```sql
|
|
159
|
+
SELECT patients.<Tab>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Completions will show columns from 'patients' table:**
|
|
163
|
+
|
|
164
|
+
- 📊 patient_id (patients)
|
|
165
|
+
- 📊 patient_name (patients)
|
|
166
|
+
- 📊 date_of_birth (patients)
|
|
167
|
+
|
|
168
|
+
```sql
|
|
169
|
+
-- Works with table aliases too:
|
|
170
|
+
SELECT p.<Tab>
|
|
171
|
+
FROM patients p
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Completions will show columns from 'p' (if it's a known table)**
|
|
175
|
+
|
|
176
|
+
### Smart Activation
|
|
177
|
+
|
|
178
|
+
Autocomplete activates when SQL keywords are detected:
|
|
179
|
+
|
|
180
|
+
- SELECT, FROM, JOIN, WHERE
|
|
181
|
+
- INSERT, UPDATE, DELETE
|
|
182
|
+
- GROUP BY, ORDER BY, etc.
|
|
183
|
+
|
|
184
|
+
### Schema-Aware Completion
|
|
185
|
+
|
|
186
|
+
Access tables and columns from different schemas:
|
|
187
|
+
|
|
188
|
+
```sql
|
|
189
|
+
-- List tables from a specific schema
|
|
190
|
+
SELECT * FROM custom_schema.<Tab>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Completions will show tables and views from 'custom_schema':**
|
|
194
|
+
|
|
195
|
+
- 📋 users
|
|
196
|
+
- 📋 products
|
|
197
|
+
- 👁️ active_users (view)
|
|
198
|
+
|
|
199
|
+
```sql
|
|
200
|
+
-- Access columns from schema-qualified table
|
|
201
|
+
SELECT custom_schema.users.<Tab>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Completions will show columns from custom_schema.users:**
|
|
205
|
+
|
|
206
|
+
- 📊 user_id (users)
|
|
207
|
+
- 📊 username (users)
|
|
208
|
+
- 📊 email (users)
|
|
209
|
+
|
|
210
|
+
### JSONB Key Completion
|
|
211
|
+
|
|
212
|
+
For JSONB columns, get autocomplete for JSON object keys after typing `->` or `->>`:
|
|
213
|
+
|
|
214
|
+
```sql
|
|
215
|
+
-- First-level JSONB keys
|
|
216
|
+
SELECT metadata-><Tab>
|
|
217
|
+
FROM patients
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Completions will show keys from the 'metadata' JSONB column:**
|
|
221
|
+
|
|
222
|
+
- 🔑 allergies
|
|
223
|
+
- 🔑 medications
|
|
224
|
+
- 🔑 diagnosis
|
|
225
|
+
|
|
226
|
+
```sql
|
|
227
|
+
-- Nested JSONB keys
|
|
228
|
+
SELECT metadata->>'diagnosis'-><Tab>
|
|
229
|
+
FROM patients
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Completions will show nested keys under 'diagnosis':**
|
|
233
|
+
|
|
234
|
+
- 🔑 code
|
|
235
|
+
- 🔑 description
|
|
236
|
+
- 🔑 date
|
|
237
|
+
|
|
238
|
+
**How it works:**
|
|
239
|
+
|
|
240
|
+
- Extension queries actual table data to extract unique JSONB keys
|
|
241
|
+
- Supports nested paths (e.g., `column->>'key1'->>'key2'->`
|
|
242
|
+
)
|
|
243
|
+
- Samples up to 1000 rows for performance
|
|
244
|
+
- Works with table-qualified columns (e.g., `patients.metadata->`)
|
|
245
|
+
|
|
246
|
+
### Complete Example
|
|
247
|
+
|
|
248
|
+
```sql
|
|
249
|
+
-- Step 1: Type table name and press Tab (default schema)
|
|
250
|
+
SELECT * FROM pat<Tab>
|
|
251
|
+
-- → Suggests: patients, patient_visits
|
|
252
|
+
|
|
253
|
+
-- Step 2: After selecting "patients", type dot and press Tab
|
|
254
|
+
SELECT patients.<Tab>
|
|
255
|
+
-- → Shows columns: patient_id, patient_name, etc.
|
|
256
|
+
|
|
257
|
+
-- Step 3: JSONB key completion
|
|
258
|
+
SELECT patients.metadata-><Tab>
|
|
259
|
+
-- → Shows JSONB keys: allergies, medications, diagnosis
|
|
260
|
+
|
|
261
|
+
-- Step 4: Nested JSONB keys
|
|
262
|
+
SELECT patients.metadata->>'diagnosis'-><Tab>
|
|
263
|
+
-- → Shows nested keys: code, description, date
|
|
264
|
+
|
|
265
|
+
-- Step 5: With different schemas
|
|
266
|
+
SELECT
|
|
267
|
+
public.patients.<Tab>,
|
|
268
|
+
custom_schema.users.<Tab>
|
|
269
|
+
FROM public.patients
|
|
270
|
+
JOIN custom_schema.users ON patients.user_id = users.user_id
|
|
271
|
+
-- → "public.patients." shows patient columns
|
|
272
|
+
-- → "custom_schema.users." shows user columns
|
|
273
|
+
|
|
274
|
+
-- Step 6: List tables from specific schema
|
|
275
|
+
SELECT * FROM custom_schema.<Tab>
|
|
276
|
+
-- → Shows tables and views from custom_schema
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Uninstall
|
|
280
|
+
|
|
281
|
+
To remove the extension, execute:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
pip uninstall jl_db_comp
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## Troubleshoot
|
|
288
|
+
|
|
289
|
+
If you are seeing the frontend extension, but it is not working, check
|
|
290
|
+
that the server extension is enabled:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
jupyter server extension list
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
If the server extension is installed and enabled, but you are not seeing
|
|
297
|
+
the frontend extension, check the frontend extension is installed:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
jupyter labextension list
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Contributing
|
|
304
|
+
|
|
305
|
+
### Development install
|
|
306
|
+
|
|
307
|
+
Note: You will need NodeJS to build the extension package.
|
|
308
|
+
|
|
309
|
+
The `jlpm` command is JupyterLab's pinned version of
|
|
310
|
+
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
|
|
311
|
+
`yarn` or `npm` in lieu of `jlpm` below.
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Clone the repo to your local environment
|
|
315
|
+
# Change directory to the jl_db_comp directory
|
|
316
|
+
|
|
317
|
+
# Set up a virtual environment and install package in development mode
|
|
318
|
+
python -m venv .venv
|
|
319
|
+
source .venv/bin/activate
|
|
320
|
+
pip install --editable ".[dev,test]"
|
|
321
|
+
|
|
322
|
+
# Link your development version of the extension with JupyterLab
|
|
323
|
+
jupyter labextension develop . --overwrite
|
|
324
|
+
# Server extension must be manually installed in develop mode
|
|
325
|
+
jupyter server extension enable jl_db_comp
|
|
326
|
+
|
|
327
|
+
# Rebuild extension Typescript source after making changes
|
|
328
|
+
# IMPORTANT: Unlike the steps above which are performed only once, do this step
|
|
329
|
+
# every time you make a change.
|
|
330
|
+
jlpm build
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
# Watch the source directory in one terminal, automatically rebuilding when needed
|
|
337
|
+
jlpm watch
|
|
338
|
+
# Run JupyterLab in another terminal
|
|
339
|
+
jupyter lab
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
|
|
343
|
+
|
|
344
|
+
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:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
jupyter lab build --minimize=False
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Development uninstall
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
# Server extension must be manually disabled in develop mode
|
|
354
|
+
jupyter server extension disable jl_db_comp
|
|
355
|
+
pip uninstall jl_db_comp
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
|
|
359
|
+
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
|
|
360
|
+
folder is located. Then you can remove the symlink named `jl_db_comp` within that folder.
|
|
361
|
+
|
|
362
|
+
### Testing the extension
|
|
363
|
+
|
|
364
|
+
#### Server tests
|
|
365
|
+
|
|
366
|
+
This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
|
|
367
|
+
|
|
368
|
+
Install test dependencies (needed only once):
|
|
369
|
+
|
|
370
|
+
```sh
|
|
371
|
+
pip install -e ".[test]"
|
|
372
|
+
# Each time you install the Python package, you need to restore the front-end extension link
|
|
373
|
+
jupyter labextension develop . --overwrite
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
To execute them, run:
|
|
377
|
+
|
|
378
|
+
```sh
|
|
379
|
+
pytest -vv -r ap --cov jl_db_comp
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
#### Frontend tests
|
|
383
|
+
|
|
384
|
+
This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
|
|
385
|
+
|
|
386
|
+
To execute them, execute:
|
|
387
|
+
|
|
388
|
+
```sh
|
|
389
|
+
jlpm
|
|
390
|
+
jlpm test
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
#### Integration tests
|
|
394
|
+
|
|
395
|
+
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
|
|
396
|
+
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
|
|
397
|
+
|
|
398
|
+
More information are provided within the [ui-tests](./ui-tests/README.md) README.
|
|
399
|
+
|
|
400
|
+
## AI Coding Assistant Support
|
|
401
|
+
|
|
402
|
+
This project includes an `AGENTS.md` file with coding standards and best practices for JupyterLab extension development. The file follows the [AGENTS.md standard](https://agents.md) for cross-tool compatibility.
|
|
403
|
+
|
|
404
|
+
### Compatible AI Tools
|
|
405
|
+
|
|
406
|
+
`AGENTS.md` works with AI coding assistants that support the standard, including Cursor, GitHub Copilot, Windsurf, Aider, and others. For a current list of compatible tools, see [the AGENTS.md standard](https://agents.md).
|
|
407
|
+
This project also includes symlinks for tool-specific compatibility:
|
|
408
|
+
|
|
409
|
+
- `CLAUDE.md` → `AGENTS.md` (for Claude Code)
|
|
410
|
+
|
|
411
|
+
- `GEMINI.md` → `AGENTS.md` (for Gemini Code Assist)
|
|
412
|
+
|
|
413
|
+
Other conventions you might encounter:
|
|
414
|
+
|
|
415
|
+
- `.cursorrules` - Cursor's YAML/JSON format (Cursor also supports AGENTS.md natively)
|
|
416
|
+
- `CONVENTIONS.md` / `CONTRIBUTING.md` - For CodeConventions.ai and GitHub bots
|
|
417
|
+
- Project-specific rules in JetBrains AI Assistant settings
|
|
418
|
+
|
|
419
|
+
All tool-specific files should be symlinks to `AGENTS.md` as the single source of truth.
|
|
420
|
+
|
|
421
|
+
### What's Included
|
|
422
|
+
|
|
423
|
+
The `AGENTS.md` file provides guidance on:
|
|
424
|
+
|
|
425
|
+
- Code quality rules and file-scoped validation commands
|
|
426
|
+
- Naming conventions for packages, plugins, and files
|
|
427
|
+
- Coding standards (TypeScript, Python)
|
|
428
|
+
- Development workflow and debugging
|
|
429
|
+
- Backend-frontend integration patterns (`APIHandler`, `requestAPI()`, routing)
|
|
430
|
+
- Common pitfalls and how to avoid them
|
|
431
|
+
|
|
432
|
+
### Customization
|
|
433
|
+
|
|
434
|
+
You can edit `AGENTS.md` to add project-specific conventions or adjust guidelines to match your team's practices. The file uses plain Markdown with Do/Don't patterns and references to actual project files.
|
|
435
|
+
|
|
436
|
+
**Note**: `AGENTS.md` is living documentation. Update it when you change conventions, add dependencies, or discover new patterns. Include `AGENTS.md` updates in commits that modify workflows or coding standards.
|
|
437
|
+
|
|
438
|
+
### Packaging the extension
|
|
439
|
+
|
|
440
|
+
See [RELEASE](RELEASE.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
jl_db_comp/__init__.py,sha256=L_Vn61SO_SScZsd1--0ug5RN35CibN9SH-yHBpGXR7g,1102
|
|
2
|
+
jl_db_comp/_version.py,sha256=ac3tgjoOzsODOlacRPCwz99LbZv0NK7ZYAaBWulFo7E,171
|
|
3
|
+
jl_db_comp/routes.py,sha256=Pe-eOBSCBT6exEAMC39p41B80L29QT8nmFnta6jDmPM,11875
|
|
4
|
+
jl_db_comp/labextension/build_log.json,sha256=9Fa7HddpMOiLtfcoYI5E_z5GVoepOZWn_vFhPoQ1Lvc,22866
|
|
5
|
+
jl_db_comp/labextension/package.json,sha256=ilRPoMw03hLstG3ZZmsTSwqS7DtAqW5H7wJRW3-EAPI,6192
|
|
6
|
+
jl_db_comp/labextension/schemas/jl_db_comp/package.json.orig,sha256=DkqDZXCT7xbUu43ld2SCIx_knACzO9Kg3-YTu1NMUO8,7048
|
|
7
|
+
jl_db_comp/labextension/schemas/jl_db_comp/plugin.json,sha256=x5QwcUiPowlvRS2GmWX8ShVp_mSBpa8KzmOqXtUmwr0,883
|
|
8
|
+
jl_db_comp/labextension/static/lib_index_js.a0969ed73da70f2cc451.js,sha256=jLdpa9d4NhvN4SkRSIW0RmHbb_10L5eBW2yV4jGHeyc,23033
|
|
9
|
+
jl_db_comp/labextension/static/lib_index_js.a0969ed73da70f2cc451.js.map,sha256=llIygypU4AkI_EHcH31iWfVAFQgDu6_OXG_Cj0S1Lag,32091
|
|
10
|
+
jl_db_comp/labextension/static/remoteEntry.5763ae02737e035e938c.js,sha256=Yr-FJ22zCsiTE2pmuouGd49UqUSNxePzFjNt5w1XB6M,27460
|
|
11
|
+
jl_db_comp/labextension/static/remoteEntry.5763ae02737e035e938c.js.map,sha256=yfmN24Pf_NopFihOdiI4k8GuDKaPv9tKODh3SJ_RcQo,26210
|
|
12
|
+
jl_db_comp/labextension/static/style.js,sha256=kHmCPOWdRY7r0Voabh7CMyxQJA6oPseEwKF6mcW--Zs,153
|
|
13
|
+
jl_db_comp/labextension/static/style_index_js.5364c7419a6b9db5d727.js,sha256=igPCVhf4WBPKMw5Tj-kjKW4ErSnvcYO4rErGoJQUgl0,20179
|
|
14
|
+
jl_db_comp/labextension/static/style_index_js.5364c7419a6b9db5d727.js.map,sha256=gzr0DMPk4dFovCxWekh8FGwioiYIB6VBvF95k0eaynk,15976
|
|
15
|
+
jl_db_comp/tests/__init__.py,sha256=mdd3JucOpGsN8PiHaypFnGLdv2nemscFn0piCZc2fls,40
|
|
16
|
+
jl_db_comp/tests/test_routes.py,sha256=eMw0eOa2vA2gjpJVNN_dYtuKXlowGOEkDqbBs_9j3BA,1753
|
|
17
|
+
jl_db_comp-0.1.0.data/data/etc/jupyter/jupyter_server_config.d/jl_db_comp.json,sha256=fSmY5rlApxKaWIC5WmqvKJ2xW5lLmO_ybLJKogoJcq8,85
|
|
18
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/build_log.json,sha256=9Fa7HddpMOiLtfcoYI5E_z5GVoepOZWn_vFhPoQ1Lvc,22866
|
|
19
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/package.json,sha256=ilRPoMw03hLstG3ZZmsTSwqS7DtAqW5H7wJRW3-EAPI,6192
|
|
20
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/schemas/jl_db_comp/package.json.orig,sha256=DkqDZXCT7xbUu43ld2SCIx_knACzO9Kg3-YTu1NMUO8,7048
|
|
21
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/schemas/jl_db_comp/plugin.json,sha256=x5QwcUiPowlvRS2GmWX8ShVp_mSBpa8KzmOqXtUmwr0,883
|
|
22
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/lib_index_js.a0969ed73da70f2cc451.js,sha256=jLdpa9d4NhvN4SkRSIW0RmHbb_10L5eBW2yV4jGHeyc,23033
|
|
23
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/lib_index_js.a0969ed73da70f2cc451.js.map,sha256=llIygypU4AkI_EHcH31iWfVAFQgDu6_OXG_Cj0S1Lag,32091
|
|
24
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/remoteEntry.5763ae02737e035e938c.js,sha256=Yr-FJ22zCsiTE2pmuouGd49UqUSNxePzFjNt5w1XB6M,27460
|
|
25
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/remoteEntry.5763ae02737e035e938c.js.map,sha256=yfmN24Pf_NopFihOdiI4k8GuDKaPv9tKODh3SJ_RcQo,26210
|
|
26
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/style.js,sha256=kHmCPOWdRY7r0Voabh7CMyxQJA6oPseEwKF6mcW--Zs,153
|
|
27
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/style_index_js.5364c7419a6b9db5d727.js,sha256=igPCVhf4WBPKMw5Tj-kjKW4ErSnvcYO4rErGoJQUgl0,20179
|
|
28
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/static/style_index_js.5364c7419a6b9db5d727.js.map,sha256=gzr0DMPk4dFovCxWekh8FGwioiYIB6VBvF95k0eaynk,15976
|
|
29
|
+
jl_db_comp-0.1.0.data/data/share/jupyter/labextensions/jl_db_comp/install.json,sha256=AkhpkuSkRFqmwkttzIRdh8UApmBhvmiodyEPb9WylXc,181
|
|
30
|
+
jl_db_comp-0.1.0.dist-info/METADATA,sha256=T456HSGlkCXZypfcl6sDIbZ3sWZPPO_psPo4XTiMNbk,14011
|
|
31
|
+
jl_db_comp-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
32
|
+
jl_db_comp-0.1.0.dist-info/licenses/LICENSE,sha256=Oz0oICGKssavDqCu6-PnQedLBaqF1DaZvDyJsGCSIzE,1523
|
|
33
|
+
jl_db_comp-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, jl_db_completer
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|