Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to jlpm, align with jupyter-fs, move back to typescript #278

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
python-version: [3.9]
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -39,7 +39,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache: 'pip'
cache-dependency-path: 'setup.py'

- name: Use Node.js ${{ matrix.node-version }}
Expand Down
156 changes: 76 additions & 80 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

package-lock.json
lib

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -68,6 +6,10 @@ __pycache__/
# C extensions
*.so

# JS/TS stuff
.yarn/
*.tsbuildinfo

# Distribution / packaging
.Python
env/
Expand All @@ -82,10 +24,10 @@ lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
package-lock.json

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -103,10 +45,14 @@ htmlcov/
.coverage
.coverage.*
.cache
python_junit.xml
junit.xml
nosetests.xml
coverage.xml
*.cover
*,cover
.hypothesis/
.pytest_cache
.ruff_cache

# Translations
*.mo
Expand All @@ -116,54 +62,107 @@ coverage.xml
*.log
local_settings.py

# Flask stuff:
# Flask instance folder
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/source

# PyBuilder
target/

# Jupyter Notebook
# IPython Notebook
.ipynb_checkpoints
*.ipynb
.autoversion

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site
# =========================
# Operating System Files
# =========================

# mypy
.mypy_cache/
# OSX
# =========================

.DS_Store
.autoversion
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk


# NPM
# ----
**/node_modules/

# Coverage data
# -------------
**/coverage/

# Notebook and lab extensions
nbcelltests/nbextension/static/index.*
nbcelltests/labextension/*.tgz
nbcelltests/labextension

# generated
*.ipynb
Expand All @@ -176,6 +175,3 @@ junit.xml
examples/_*
*_test.py
*_test.html

nbcelltests/labextension/*.tgz
nbcelltests/labextension
12 changes: 12 additions & 0 deletions .vscode/jupyterlab_venv.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# set VIRTUAL_ENV to the root of your venv
VIRTUAL_ENV="<root-of-your-venv>"

# jupyter env vars
JUPYTER_CONFIG_DIR="${VIRTUAL_ENV}/.jupyter"
JUPYTER_PATH="${VIRTUAL_ENV}/share/jupyter"
JUPYTER_RUNTIME_DIR="${JUPYTER_PATH}/runtime"

# jupyterlab env vars
JUPYTERLAB_DIR="${VIRTUAL_ENV}/share/jupyter/lab"
JUPYTERLAB_SETTINGS_DIR="${VIRTUAL_ENV}/.jupyter/lab"
JUPYTERLAB_WORKSPACES_DIR="${VIRTUAL_ENV}/.jupyter/lab"
79 changes: 79 additions & 0 deletions .vscode/launch.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
// to debug jupyterlab running in a venv or conda env:
// - set up Python env in your workspace as per https://code.visualstudio.com/docs/python/environments
// - uncomment the "envFile" line below
// - configure the .vscode/jupyterlab_venv.env file as needed
"version": "0.2.0",
"configurations": [
{
"name": "jlab backend",
"type": "python",
"request": "launch",

"args": [
// "--watch",
"--notebook-dir=${env:HOME}",
"--no-browser",
"--ServerApp.token=''",
"--port=9999"
],
"justMyCode": false,
"module": "jupyterlab.labapp",

// set environment variables for jupyter/lab config
// "envFile": "${workspaceFolder}/.vscode/jupyterlab_venv.env",
},
{
"name": "jlab frontend",
"type": "chrome",
"request": "launch",

"sourceMapPathOverrides": {
"webpack:///./node_modules/jupyter-fs/*": "${webRoot}/*"
},
"timeout": 180000,
"url": "http://localhost:9999",
"webRoot": "${workspaceFolder}/js",

// debug using a specific copy of chrome/chromium
// "runtimeExecutable": "<path-to-your-chrome-or-chromium>",
},
],
"compounds": [
{
"name": "jlab all",
"configurations": [
"jlab backend",
"jlab frontend"
]
}
]

// some extra configurations, useful for troubleshooting
// jupyter-related vscode debug configs
//
// "configurations": [
// {
// "name": "(troubleshoot) jupyter paths",
// "type": "python",
// "request": "launch",
// "args": [
// "--paths",
// ],
// "justMyCode": false,
// "module": "jupyter_core.command",
// "envFile": "${workspaceFolder}/.vscode/jupyterlab_venv.env",
// },
// {
// "name": "(troubleshoot) jupyter serverextensions",
// "type": "python",
// "request": "launch",
// "args": [
// "list",
// ],
// "justMyCode": false,
// "module": "notebook.serverextensions",
// "envFile": "${workspaceFolder}/.vscode/jupyterlab_venv.env",
// }
// ]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "./js/node_modules/typescript/lib",
"eslint.workingDirectories": ["./js"]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "./js/node_modules/typescript/lib",
"eslint.workingDirectories": ["./js"]
}
Loading