Skip to content

Commit

Permalink
Merge pull request #53 from data-exp-lab/typescript_conversion
Browse files Browse the repository at this point in the history
Convert to Typescript
  • Loading branch information
munkm committed Nov 6, 2020
2 parents 8b4b1ca + ddf14fd commit eb1b419
Show file tree
Hide file tree
Showing 23 changed files with 919 additions and 350 deletions.
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
*.bundle.*
lib/
node_modules/
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo

*/labextension/*.tgz
# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -8,18 +20,20 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
pip-wheel-metadata/
share/python-wheels/
.installed.cfg
*.egg
node_modules/
Expand Down Expand Up @@ -102,3 +116,4 @@ ENV/

# mypy
.mypy_cache/
.vscode/settings.json
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"problemMatcher": [
"$tsc"
],
"group": {
"kind": "build",
"isDefault": true
},
"label": "npm: build",
"detail": "jlpm run build:lib"
}
}
24 changes: 22 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
recursive-include widgyts/static *.*
recursive-include jupyter-config *.json
include LICENSE
include README.md
include pyproject.toml

include jupyter-config/widgyts.json

include package.json
include ts*.json
include widgyts/labextension/*.tgz

# Javascript files
graft src
graft style
prune **/node_modules
prune lib

# Patterns to exclude from any directory
global-exclude *~
global-exclude *.pyc
global-exclude *.pyo
global-exclude .git
global-exclude .ipynb_checkpoints
5 changes: 5 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@
'nbsphinx',
'jupyter_sphinx.execute',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx.ext.intersphinx'
]

intersphinx_mapping = {
'ipycanvas': ('https://ipycanvas.readthedocs.io/en/latest/', None),
}

nbsphinx_allow_errors = True # exception ipstruct.py ipython_genutils

# Add any paths that contain templates here, relative to this directory.
Expand Down
5 changes: 0 additions & 5 deletions jupyter-config/nbconfig/notebook.d/widgyts.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"NotebookApp": {
"nbserver_extensions": {
"widgyts": true
"widgytsts": true
}
}
}
92 changes: 92 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"name": "@data-exp-lab/yt-widgets",
"version": "0.4.0",
"description": "A Custom Jupyter Widget Library for Interactive Visualization with yt",
"author": "Data Exploration Lab",
"contributors": [
{
"name": "Nathanael Claussen",
"email": "nclauss2@illinois.edu"
},
{
"name": "Madicken Munk",
"email": "madicken.munk@gmail.com"
},
{
"name": "Matthew Turk",
"email": "matthewturk@gmail.com"
}
],
"keywords": [
"jupyter",
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/data-exp-lab/widgyts",
"bugs": {
"url": "https://github.com/data-exp-lab/widgyts/issues"
},
"license": "BSD-3-Clause",
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf,wasm}",
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"style": "style/index.css",
"repository": {
"type": "git",
"url": "https://github.com/data-exp-lab/widgyts.git"
},
"scripts": {
"build": "jlpm run build:lib",
"build:labextension": "cd widgyts && rimraf labextension && mkdirp labextension && cd labextension && npm pack ../..",
"build:lib": "tsc",
"build:all": "jlpm run build:labextension",
"clean": "jlpm run clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:labextension": "rimraf widgyts/labextension",
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
"eslint": "eslint . --ext .ts,.tsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"prepare": "jlpm run clean && jlpm run build",
"watch": "tsc -w"
},
"dependencies": {
"@data-exp-lab/yt-tools": "^0.3.0",
"@jupyterlab/application": "^2.0.0",
"@jupyterlab/coreutils": "^4.0.0",
"@jupyterlab/mainmenu": "^2.1.1",
"@jupyterlab/services": "^5.0.0",
"@lumino/widgets": "^1.13.0",
"@types/node": "^14.0.5",
"ipycanvas": "^0.4.7"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.2",
"mkdirp": "^1.0.3",
"prettier": "1.16.4",
"rimraf": "^2.6.1",
"typescript": "^3.9.3"
},
"sideEffects": [
"style/*.css"
],
"jupyterlab": {
"discovery": {
"server": {
"managers": [
"pip"
],
"base": {
"name": "widgyts"
}
}
},
"extension": "lib/plugin"
}
}
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["jupyter_packaging~=0.4.0", "jupyterlab~=2.0", "setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

0 comments on commit eb1b419

Please sign in to comment.