Skip to content

Commit e815ae1

Browse files
authored
Convert hyphens to underscore for Python package name (#71)
* convert hyphens to underscore for python * add hyphen to dash conversion to test * force test to determine the python package name in order to test if the hyphens are being replaced correctly * rename test package everywhere
1 parent 074244b commit e815ae1

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ script:
3333
- make linkcheck
3434
- popd
3535
# Make a non-local install so the data_files get populated
36-
- pip uninstall -y ipywidgettestwidgets
36+
- pip uninstall -y jupyter_widget_testwidgets
3737
- pip install .
38-
- jupyter nbextension enable --py --sys-prefix ipywidgettestwidgets
38+
- jupyter nbextension enable --py --sys-prefix jupyter_widget_testwidgets
3939
# Validate nbextension (enable does not use exit code):
40-
- python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('ipywidgettestwidgets/extension') or 0)"
40+
- python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('jupyter_widget_testwidgets/extension') or 0)"
4141
- pip install jupyterlab
4242
# Make sure our lab extension was installed.
4343
- jupyter labextension list

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author_email": "",
44
"github_project_name": "",
55
"github_organization_name": "",
6-
"python_package_name": "{{ cookiecutter.github_project_name }}",
6+
"python_package_name": "{{ cookiecutter.github_project_name | replace('-', '_') }}",
77
"npm_package_name": "{{ cookiecutter.github_project_name }}",
88
"npm_package_version": "0.1.0",
99
"project_short_description": "A Custom Jupyter Widget Library"

tests/test_instantiate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def example_instance(tmpdir_factory):
2929
yield instance_path
3030
finally:
3131
try:
32-
pip.main(['uninstall', 'ipywidgettestwidgets', '-y'])
32+
pip.main(['uninstall', 'jupyter_widget_testwidgets', '-y'])
3333
except Exception:
3434
pass
3535

tests/testconfig.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ default_context:
33
author_email: "[email protected]"
44
github_project_name: "jupyter-widget-testwidgets"
55
github_organization_name: "jupyter"
6-
python_package_name: "ipywidgettestwidgets"
76
npm_package_name: "@jupyter-widgets/jupyter-widget-testwidgets"
87
npm_package_version: "1.1.0"
98
project_short_description: "A Test Jupyter Widget Library"

0 commit comments

Comments
 (0)