File tree Expand file tree Collapse file tree 5 files changed +19
-12
lines changed
{{cookiecutter.github_project_name}}
{{cookiecutter.python_package_name}} Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,9 @@ import {
18
18
} from './widget' ;
19
19
20
20
import {
21
- JUPYTER_EXTENSION_VERSION
21
+ EXTENSION_SPEC_VERSION
22
22
} from './version' ;
23
23
24
-
25
24
const EXTENSION_ID = '{{ cookiecutter.jlab_extension_id }}' ;
26
25
27
26
@@ -44,7 +43,7 @@ export default examplePlugin;
44
43
function activateWidgetExtension ( app : Application < Widget > , registry : IJupyterWidgetRegistry ) : void {
45
44
registry . registerWidget ( {
46
45
name : '{{ cookiecutter.npm_package_name }}' ,
47
- version : JUPYTER_EXTENSION_VERSION ,
46
+ version : EXTENSION_SPEC_VERSION ,
48
47
exports : {
49
48
ExampleModel : ExampleModel ,
50
49
ExampleView : ExampleView
Original file line number Diff line number Diff line change 10
10
* your models, or serialized format changes.
11
11
*/
12
12
export
13
- const JUPYTER_EXTENSION_VERSION = '1.0.0' ;
13
+ const EXTENSION_SPEC_VERSION = '1.0.0' ;
Original file line number Diff line number Diff line change 6
6
} from '@jupyter-widgets/base' ;
7
7
8
8
import {
9
- JUPYTER_EXTENSION_VERSION
9
+ EXTENSION_SPEC_VERSION
10
10
} from './version' ;
11
11
12
12
@@ -31,10 +31,10 @@ class ExampleModel extends DOMWidgetModel {
31
31
32
32
static model_name = 'ExampleModel' ;
33
33
static model_module = '{{ cookiecutter.npm_package_name }}' ;
34
- static model_module_version = JUPYTER_EXTENSION_VERSION ;
34
+ static model_module_version = EXTENSION_SPEC_VERSION ;
35
35
static view_name = 'ExampleView' ; // Set to null if no view
36
36
static view_module = '{{ cookiecutter.npm_package_name }}' ; // Set to null if no view
37
- static view_module_version = JUPYTER_EXTENSION_VERSION ;
37
+ static view_module_version = EXTENSION_SPEC_VERSION ;
38
38
}
39
39
40
40
Original file line number Diff line number Diff line change 6
6
7
7
version_info = (0 , 1 , 0 , 'dev' )
8
8
__version__ = "." .join (map (str , version_info ))
9
+
10
+ # The version of the attribute spec that this package
11
+ # implements. This is the value used in
12
+ # _model_module_version/_view_module_version.
13
+ #
14
+ # Update this value when attributes are added/removed from
15
+ # your models, or serialized format changes.
16
+ EXTENSION_SPEC_VERSION = '1.0.0'
Original file line number Diff line number Diff line change 10
10
11
11
from ipywidgets import DOMWidget
12
12
from traitlets import Unicode
13
+ from ._version import EXTENSION_SPEC_VERSION
13
14
14
15
module_name = "{{ cookiecutter.npm_package_name }}"
15
- module_version = "{{ cookiecutter.npm_package_version }}"
16
16
17
17
18
18
class ExampleWidget (DOMWidget ):
19
19
"""TODO: Add docstring here
20
20
"""
21
- _model_name = Unicode ('ExampleModel' ).tag (sync = True )
21
+ _model_name = Unicode ('ExampleModel' ).tag (sync = True )
22
22
_model_module = Unicode (module_name ).tag (sync = True )
23
- _model_module_version = Unicode (module_version ).tag (sync = True )
24
- _view_name = Unicode ('ExampleView' ).tag (sync = True )
23
+ _model_module_version = Unicode (EXTENSION_SPEC_VERSION ).tag (sync = True )
24
+ _view_name = Unicode ('ExampleView' ).tag (sync = True )
25
25
_view_module = Unicode (module_name ).tag (sync = True )
26
- _view_module_version = Unicode (module_version ).tag (sync = True )
26
+ _view_module_version = Unicode (EXTENSION_SPEC_VERSION ).tag (sync = True )
27
27
28
28
value = Unicode ('Hello World' )
You can’t perform that action at this time.
0 commit comments