Skip to content

Commit ebdfa08

Browse files
authored
Merge pull request #278 from painebot/tkp/jlpm
Move to jlpm, align with jupyter-fs, move back to typescript
2 parents 7169875 + 20df359 commit ebdfa08

32 files changed

+11358
-8559
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828

2929
strategy:
3030
matrix:
31-
os: [ubuntu-latest, macos-latest, windows-latest]
31+
os: [ubuntu-latest]
3232
python-version: [3.9]
33-
node-version: [16.x]
33+
node-version: [18.x]
3434

3535
steps:
3636
- uses: actions/checkout@v4
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/setup-python@v5
4040
with:
4141
python-version: ${{ matrix.python-version }}
42-
cache: "pip"
42+
cache: 'pip'
4343
cache-dependency-path: 'setup.py'
4444

4545
- name: Use Node.js ${{ matrix.node-version }}

.gitignore

+76-80
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
36-
node_modules/
37-
jspm_packages/
38-
39-
# Typescript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# Yarn Integrity file
55-
.yarn-integrity
56-
57-
# dotenv environment variables file
58-
.env
59-
60-
package-lock.json
61-
lib
62-
631
# Byte-compiled / optimized / DLL files
642
__pycache__/
653
*.py[cod]
@@ -68,6 +6,10 @@ __pycache__/
686
# C extensions
697
*.so
708

9+
# JS/TS stuff
10+
.yarn/
11+
*.tsbuildinfo
12+
7113
# Distribution / packaging
7214
.Python
7315
env/
@@ -82,10 +24,10 @@ lib64/
8224
parts/
8325
sdist/
8426
var/
85-
wheels/
8627
*.egg-info/
8728
.installed.cfg
8829
*.egg
30+
package-lock.json
8931

9032
# PyInstaller
9133
# Usually these files are written by a python script from a template
@@ -103,10 +45,14 @@ htmlcov/
10345
.coverage
10446
.coverage.*
10547
.cache
48+
python_junit.xml
49+
junit.xml
10650
nosetests.xml
10751
coverage.xml
108-
*.cover
52+
*,cover
10953
.hypothesis/
54+
.pytest_cache
55+
.ruff_cache
11056

11157
# Translations
11258
*.mo
@@ -116,54 +62,107 @@ coverage.xml
11662
*.log
11763
local_settings.py
11864

119-
# Flask stuff:
65+
# Flask instance folder
12066
instance/
121-
.webassets-cache
12267

12368
# Scrapy stuff:
12469
.scrapy
12570

12671
# Sphinx documentation
12772
docs/_build/
73+
docs/source
12874

12975
# PyBuilder
13076
target/
13177

132-
# Jupyter Notebook
78+
# IPython Notebook
13379
.ipynb_checkpoints
80+
*.ipynb
81+
.autoversion
13482

13583
# pyenv
13684
.python-version
13785

13886
# celery beat schedule file
13987
celerybeat-schedule
14088

141-
# SageMath parsed files
142-
*.sage.py
143-
14489
# dotenv
14590
.env
14691

14792
# virtualenv
148-
.venv
14993
venv/
15094
ENV/
15195

15296
# Spyder project settings
15397
.spyderproject
154-
.spyproject
15598

15699
# Rope project settings
157100
.ropeproject
158101

159-
# mkdocs documentation
160-
/site
102+
# =========================
103+
# Operating System Files
104+
# =========================
161105

162-
# mypy
163-
.mypy_cache/
106+
# OSX
107+
# =========================
164108

165109
.DS_Store
166-
.autoversion
110+
.AppleDouble
111+
.LSOverride
112+
113+
# Thumbnails
114+
._*
115+
116+
# Files that might appear in the root of a volume
117+
.DocumentRevisions-V100
118+
.fseventsd
119+
.Spotlight-V100
120+
.TemporaryItems
121+
.Trashes
122+
.VolumeIcon.icns
123+
124+
# Directories potentially created on remote AFP share
125+
.AppleDB
126+
.AppleDesktop
127+
Network Trash Folder
128+
Temporary Items
129+
.apdisk
130+
131+
# Windows
132+
# =========================
133+
134+
# Windows image file caches
135+
Thumbs.db
136+
ehthumbs.db
137+
138+
# Folder config file
139+
Desktop.ini
140+
141+
# Recycle Bin used on file shares
142+
$RECYCLE.BIN/
143+
144+
# Windows Installer files
145+
*.cab
146+
*.msi
147+
*.msm
148+
*.msp
149+
150+
# Windows shortcuts
151+
*.lnk
152+
153+
154+
# NPM
155+
# ----
156+
**/node_modules/
157+
158+
# Coverage data
159+
# -------------
160+
**/coverage/
161+
162+
# Notebook and lab extensions
163+
nbcelltests/nbextension/static/index.*
164+
nbcelltests/labextension/*.tgz
165+
nbcelltests/labextension
167166

168167
# generated
169168
*.ipynb
@@ -176,6 +175,3 @@ junit.xml
176175
examples/_*
177176
*_test.py
178177
*_test.html
179-
180-
nbcelltests/labextension/*.tgz
181-
nbcelltests/labextension

.vscode/jupyterlab_venv.env.template

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# set VIRTUAL_ENV to the root of your venv
2+
VIRTUAL_ENV="<root-of-your-venv>"
3+
4+
# jupyter env vars
5+
JUPYTER_CONFIG_DIR="${VIRTUAL_ENV}/.jupyter"
6+
JUPYTER_PATH="${VIRTUAL_ENV}/share/jupyter"
7+
JUPYTER_RUNTIME_DIR="${JUPYTER_PATH}/runtime"
8+
9+
# jupyterlab env vars
10+
JUPYTERLAB_DIR="${VIRTUAL_ENV}/share/jupyter/lab"
11+
JUPYTERLAB_SETTINGS_DIR="${VIRTUAL_ENV}/.jupyter/lab"
12+
JUPYTERLAB_WORKSPACES_DIR="${VIRTUAL_ENV}/.jupyter/lab"

.vscode/launch.json.template

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
// to debug jupyterlab running in a venv or conda env:
3+
// - set up Python env in your workspace as per https://code.visualstudio.com/docs/python/environments
4+
// - uncomment the "envFile" line below
5+
// - configure the .vscode/jupyterlab_venv.env file as needed
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "jlab backend",
10+
"type": "python",
11+
"request": "launch",
12+
13+
"args": [
14+
// "--watch",
15+
"--notebook-dir=${env:HOME}",
16+
"--no-browser",
17+
"--ServerApp.token=''",
18+
"--port=9999"
19+
],
20+
"justMyCode": false,
21+
"module": "jupyterlab.labapp",
22+
23+
// set environment variables for jupyter/lab config
24+
// "envFile": "${workspaceFolder}/.vscode/jupyterlab_venv.env",
25+
},
26+
{
27+
"name": "jlab frontend",
28+
"type": "chrome",
29+
"request": "launch",
30+
31+
"sourceMapPathOverrides": {
32+
"webpack:///./node_modules/jupyter-fs/*": "${webRoot}/*"
33+
},
34+
"timeout": 180000,
35+
"url": "http://localhost:9999",
36+
"webRoot": "${workspaceFolder}/js",
37+
38+
// debug using a specific copy of chrome/chromium
39+
// "runtimeExecutable": "<path-to-your-chrome-or-chromium>",
40+
},
41+
],
42+
"compounds": [
43+
{
44+
"name": "jlab all",
45+
"configurations": [
46+
"jlab backend",
47+
"jlab frontend"
48+
]
49+
}
50+
]
51+
52+
// some extra configurations, useful for troubleshooting
53+
// jupyter-related vscode debug configs
54+
//
55+
// "configurations": [
56+
// {
57+
// "name": "(troubleshoot) jupyter paths",
58+
// "type": "python",
59+
// "request": "launch",
60+
// "args": [
61+
// "--paths",
62+
// ],
63+
// "justMyCode": false,
64+
// "module": "jupyter_core.command",
65+
// "envFile": "${workspaceFolder}/.vscode/jupyterlab_venv.env",
66+
// },
67+
// {
68+
// "name": "(troubleshoot) jupyter serverextensions",
69+
// "type": "python",
70+
// "request": "launch",
71+
// "args": [
72+
// "list",
73+
// ],
74+
// "justMyCode": false,
75+
// "module": "notebook.serverextensions",
76+
// "envFile": "${workspaceFolder}/.vscode/jupyterlab_venv.env",
77+
// }
78+
// ]
79+
}

.vscode/settings.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"typescript.tsdk": "./js/node_modules/typescript/lib",
3+
"eslint.workingDirectories": ["./js"]
4+
}

.vscode/settings.json.template

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"typescript.tsdk": "./js/node_modules/typescript/lib",
3+
"eslint.workingDirectories": ["./js"]
4+
}

0 commit comments

Comments
 (0)