File tree Expand file tree Collapse file tree 6 files changed +20
-9
lines changed
{{cookiecutter.github_project_name}}
{{cookiecutter.python_package_name}} Expand file tree Collapse file tree 6 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,20 @@ information:
41
41
be used for both the "back-end" and "front-end" packages.
42
42
43
43
After this, you will have a directory containing files used for creating a
44
- custom Jupyter widget. You will now be able to easily package and distribute
45
- your custom Jupyter widget.
44
+ custom Jupyter widget. To check that eveything is set up as it should be,
45
+ you should run the tests:
46
+
47
+ ``` bash
48
+ # First install the python package. This will also build the JS packages.
49
+ pip install -e .
50
+
51
+ # Run the python tests. This should only give you TODO errors:
52
+ py.test
53
+
54
+ # Run the JS tests. This should again, only give TODO errors (Expected 'Value' to equal 'Expected value'):
55
+ cd ts
56
+ npm test
57
+ ```
46
58
47
59
48
60
## Releasing your initial packages:
@@ -55,6 +67,9 @@ your custom Jupyter widget.
55
67
npm login
56
68
cd ts
57
69
npm publish
70
+ # Now, you need to update the entry in /<your python package>/jlextension/package.json
71
+ # from "file:../../ts" to "^<the version of the NPM packge you just released>
72
+ # After this, run:
58
73
cd ../< your python package> /jlextension
59
74
npm publish
60
75
```
Original file line number Diff line number Diff line change 33
33
"metadata" : {},
34
34
"outputs" : [],
35
35
"source" : [
36
- " raise Error ('TODO: Add example usage of your widget.')"
36
+ " raise ValueError ('TODO: Add example usage of your widget.')"
37
37
]
38
38
}
39
39
],
Original file line number Diff line number Diff line change 67
67
68
68
setup_args = dict (
69
69
name = name ,
70
- description = {{ cookiecutter .project_short_description }},
70
+ description = ' {{ cookiecutter.project_short_description }}' ,
71
71
version = version_ns ['__version__' ],
72
72
scripts = glob (pjoin ('scripts' , '*' )),
73
73
cmdclass = cmdclass ,
Original file line number Diff line number Diff line change @@ -50,6 +50,3 @@ class ExampleView extends DOMWidgetView {
50
50
this . el . textContent = this . model . get ( 'value' ) ;
51
51
}
52
52
}
53
-
54
- // Remove me:
55
- throw new Error ( 'Implement your code' ) ;
Original file line number Diff line number Diff line change 4
4
# Copyright (c) {{ cookiecutter.author_name }}.
5
5
# Distributed under the terms of the Modified BSD License.
6
6
7
- from .ndarray import *
8
7
from .example import ExampleWidget
9
8
from ._version import *
10
9
Original file line number Diff line number Diff line change 8
8
"@jupyterlab/application" : " ~0.9.0" ,
9
9
"@phosphor/coreutils" : " ~1.3.0" ,
10
10
"@jupyter-widgets/jupyterlab-manager" : " ~0.25.11" ,
11
- "{{ cookiecutter.npm_package_name }}" : " ^{{ cookiecutter.npm_package_version }} "
11
+ "{{ cookiecutter.npm_package_name }}" : " file:../../ts "
12
12
},
13
13
"devDependencies" : {
14
14
"rimraf" : " ^2.6.1" ,
You can’t perform that action at this time.
0 commit comments