Skip to content

Commit d16e150

Browse files
committed
Some fixes and updates to README instructions
1 parent ee0bd9d commit d16e150

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,20 @@ information:
4141
be used for both the "back-end" and "front-end" packages.
4242

4343
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+
```
4658

4759

4860
## Releasing your initial packages:
@@ -55,6 +67,9 @@ your custom Jupyter widget.
5567
npm login
5668
cd ts
5769
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:
5873
cd ../<your python package>/jlextension
5974
npm publish
6075
```

{{cookiecutter.github_project_name}}/examples/introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"metadata": {},
3434
"outputs": [],
3535
"source": [
36-
"raise Error('TODO: Add example usage of your widget.')"
36+
"raise ValueError('TODO: Add example usage of your widget.')"
3737
]
3838
}
3939
],

{{cookiecutter.github_project_name}}/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
setup_args = dict(
6969
name = name,
70-
description = {{ cookiecutter.project_short_description }},
70+
description = '{{ cookiecutter.project_short_description }}',
7171
version = version_ns['__version__'],
7272
scripts = glob(pjoin('scripts', '*')),
7373
cmdclass = cmdclass,

{{cookiecutter.github_project_name}}/ts/src/example.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,3 @@ class ExampleView extends DOMWidgetView {
5050
this.el.textContent = this.model.get('value');
5151
}
5252
}
53-
54-
// Remove me:
55-
throw new Error('Implement your code');

{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Copyright (c) {{ cookiecutter.author_name }}.
55
# Distributed under the terms of the Modified BSD License.
66

7-
from .ndarray import *
87
from .example import ExampleWidget
98
from ._version import *
109

{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/jlextension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@jupyterlab/application": "~0.9.0",
99
"@phosphor/coreutils": "~1.3.0",
1010
"@jupyter-widgets/jupyterlab-manager": "~0.25.11",
11-
"{{ cookiecutter.npm_package_name }}": "^{{ cookiecutter.npm_package_version }}"
11+
"{{ cookiecutter.npm_package_name }}": "file:../../ts"
1212
},
1313
"devDependencies": {
1414
"rimraf": "^2.6.1",

0 commit comments

Comments
 (0)