Skip to content

Commit 0785552

Browse files
authored
Merge pull request #159 from kpinnipa/pyPackage
Added python package scripts.
2 parents df7d2ed + fd20570 commit 0785552

24 files changed

+361
-20
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ __pycache__/
2525
.Python
2626
build/
2727
develop-eggs/
28-
dist/
2928
downloads/
3029
eggs/
3130
.eggs/

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ for the frontend extension.
2020
- JupyterLab >= 3.0
2121

2222
## Install
23-
23+
Install using jupyter:
2424
```bash
2525
jupyter labextension install jupyterlab-code-snippets
2626
```
27+
Install using pip:
28+
```bash
29+
pip install jupyterlab-code-snippets
30+
```
2731

2832
## Troubleshoot
2933

@@ -74,3 +78,7 @@ Now every change will be built locally and bundled into JupyterLab. Be sure to r
7478
```bash
7579
jupyter labextension uninstall jupyterlab-code-snippets
7680
```
81+
OR
82+
```bash
83+
pip uninstall jupyterlab-code-snippets
84+
```

code_snippet/labextension/package.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab-code-snippets",
3-
"version": "1.0.4",
3+
"version": "2.0.0",
44
"description": "EXPERIMENTAL: Save, reuse, and share code snippets using JupyterLab Code Snippets",
55
"keywords": [
66
"jupyter",
@@ -44,7 +44,9 @@
4444
"prepare": "jlpm run clean && jlpm run build:prod",
4545
"watch": "run-p watch:src watch:labextension",
4646
"watch:labextension": "jupyter labextension watch .",
47-
"watch:src": "tsc -w"
47+
"watch:src": "tsc -w",
48+
"test": "jest --watch",
49+
"test:cov": "jest --collect-coverage"
4850
},
4951
"dependencies": {
5052
"@jupyterlab/application": "^3.0.3",
@@ -64,23 +66,45 @@
6466
"@lumino/dragdrop": "^1.7.1",
6567
"@lumino/messaging": "^1.4.3",
6668
"@lumino/properties": "^1.2.3",
67-
"@lumino/signaling": "^1.4.3"
69+
"@lumino/signaling": "^1.4.3",
70+
"@lumino/widgets": "^1.13.2"
6871
},
6972
"devDependencies": {
7073
"@jupyterlab/builder": "^3.0.0-rc.13",
7174
"@typescript-eslint/eslint-plugin": "^2.27.0",
7275
"@typescript-eslint/parser": "^2.27.0",
7376
"eslint": "^7.5.0",
77+
"@babel/core": "^7",
78+
"@babel/preset-env": "^7.12.1",
79+
"@babel/preset-react": "^7.12.5",
80+
"@testing-library/react": "^11.1.1",
81+
"@types/enzyme": "^3.10.8",
82+
"@types/enzyme-adapter-react-16": "^1.0.6",
83+
"@types/jest": "^26.0.15",
84+
"@types/node-fetch": "^2.5.7",
85+
"@types/react": "^16.9.56",
86+
"@types/react-dom": "^16.9.9",
87+
"@types/react-test-renderer": "^16.9.3",
88+
"babel-jest": "^26.6.3",
89+
"enzyme": "^3.11.0",
90+
"enzyme-adapter-react-16": "^1.15.5",
7491
"eslint-config-prettier": "^6.10.1",
7592
"eslint-plugin-prettier": "^3.1.2",
7693
"eslint-plugin-react": "^7.20.4",
7794
"husky": "^4.2.5",
95+
"jest": "^26.6.3",
96+
"jest-fetch-mock": "^3.0.3",
7897
"lint-staged": "^10.2.13",
7998
"mkdirp": "^1.0.3",
8099
"npm-run-all": "^4.1.5",
81100
"prettier": "^1.19.0",
82101
"rimraf": "^3.0.2",
83-
"typescript": "~4.1.3"
102+
"typescript": "~4.1.3",
103+
"react-test-renderer": "^17.0.1",
104+
"ts-jest": "^26.4.4"
105+
},
106+
"resolutions": {
107+
"@types/react": "^16.9.56"
84108
},
85109
"sideEffects": [
86110
"style/*.css",
@@ -91,7 +115,7 @@
91115
"schemaDir": "schema",
92116
"outputDir": "code_snippet/labextension",
93117
"_build": {
94-
"load": "static/remoteEntry.11378e5cdb89337016e1.js",
118+
"load": "static/remoteEntry.dbdbed7c413868b37118.js",
95119
"extension": "./extension",
96120
"style": "./style"
97121
}
@@ -102,10 +126,10 @@
102126
}
103127
},
104128
"lint-staged": {
105-
"*.{js,jsx,ts,tsx}": [
129+
"src/*.{js,jsx,ts,tsx}": [
106130
"eslint --cache --fix"
107131
],
108-
"*.js": "eslint --cache --fix"
132+
"src/*.js": "eslint --cache --fix"
109133
},
110134
"styleModule": "style/index.js"
111135
}

code_snippet/labextension/schemas/jupyterlab-code-snippets/package.json.orig

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab-code-snippets",
3-
"version": "1.0.4",
3+
"version": "2.0.0",
44
"description": "EXPERIMENTAL: Save, reuse, and share code snippets using JupyterLab Code Snippets",
55
"keywords": [
66
"jupyter",
@@ -44,7 +44,9 @@
4444
"prepare": "jlpm run clean && jlpm run build:prod",
4545
"watch": "run-p watch:src watch:labextension",
4646
"watch:labextension": "jupyter labextension watch .",
47-
"watch:src": "tsc -w"
47+
"watch:src": "tsc -w",
48+
"test": "jest --watch",
49+
"test:cov": "jest --collect-coverage"
4850
},
4951
"dependencies": {
5052
"@jupyterlab/application": "^3.0.3",
@@ -64,23 +66,45 @@
6466
"@lumino/dragdrop": "^1.7.1",
6567
"@lumino/messaging": "^1.4.3",
6668
"@lumino/properties": "^1.2.3",
67-
"@lumino/signaling": "^1.4.3"
69+
"@lumino/signaling": "^1.4.3",
70+
"@lumino/widgets": "^1.13.2"
6871
},
6972
"devDependencies": {
7073
"@jupyterlab/builder": "^3.0.0-rc.13",
7174
"@typescript-eslint/eslint-plugin": "^2.27.0",
7275
"@typescript-eslint/parser": "^2.27.0",
7376
"eslint": "^7.5.0",
77+
"@babel/core": "^7",
78+
"@babel/preset-env": "^7.12.1",
79+
"@babel/preset-react": "^7.12.5",
80+
"@testing-library/react": "^11.1.1",
81+
"@types/enzyme": "^3.10.8",
82+
"@types/enzyme-adapter-react-16": "^1.0.6",
83+
"@types/jest": "^26.0.15",
84+
"@types/node-fetch": "^2.5.7",
85+
"@types/react": "^16.9.56",
86+
"@types/react-dom": "^16.9.9",
87+
"@types/react-test-renderer": "^16.9.3",
88+
"babel-jest": "^26.6.3",
89+
"enzyme": "^3.11.0",
90+
"enzyme-adapter-react-16": "^1.15.5",
7491
"eslint-config-prettier": "^6.10.1",
7592
"eslint-plugin-prettier": "^3.1.2",
7693
"eslint-plugin-react": "^7.20.4",
7794
"husky": "^4.2.5",
95+
"jest": "^26.6.3",
96+
"jest-fetch-mock": "^3.0.3",
7897
"lint-staged": "^10.2.13",
7998
"mkdirp": "^1.0.3",
8099
"npm-run-all": "^4.1.5",
81100
"prettier": "^1.19.0",
82101
"rimraf": "^3.0.2",
83-
"typescript": "~4.1.3"
102+
"typescript": "~4.1.3",
103+
"react-test-renderer": "^17.0.1",
104+
"ts-jest": "^26.4.4"
105+
},
106+
"resolutions": {
107+
"@types/react": "^16.9.56"
84108
},
85109
"sideEffects": [
86110
"style/*.css",
@@ -97,10 +121,10 @@
97121
}
98122
},
99123
"lint-staged": {
100-
"*.{js,jsx,ts,tsx}": [
124+
"src/*.{js,jsx,ts,tsx}": [
101125
"eslint --cache --fix"
102126
],
103-
"*.js": "eslint --cache --fix"
127+
"src/*.js": "eslint --cache --fix"
104128
},
105129
"styleModule": "style/index.js"
106130
}

code_snippet/labextension/static/170.25a817bdb378155319cf.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

code_snippet/labextension/static/266.7c095df4c14c532d8790.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code_snippet/labextension/static/266.aadf787ffc076cf22989.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

code_snippet/labextension/static/534.687b35782532c4d33ec0.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

code_snippet/labextension/static/534.ff25b6990217fe73fcd1.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code_snippet/labextension/static/remoteEntry.11378e5cdb89337016e1.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)