Skip to content

Commit 8a4d12a

Browse files
committed
Update in line with latest 3.0 cookiecutter, use PEP8 package name
1 parent ff72be0 commit 8a4d12a

File tree

15 files changed

+116
-93
lines changed

15 files changed

+116
-93
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version: '3.7'
2323
architecture: 'x64'
2424
- name: Install dependencies
25-
run: python -m pip install -U pip jupyterlab~=3.0 jupyter-packaging~=0.7.9
25+
run: python -m pip install -U jupyterlab~=3.0 jupyter-packaging~=0.7.9
2626
- name: Build the extension
2727
run: |
2828
jlpm
@@ -31,8 +31,5 @@ jobs:
3131
3232
python -m pip install .
3333
34-
jupyter labextension list 1>labextensions 2>&1
35-
cat labextensions | grep "jupyterlab-interactive-dashboard-editor.*OK"
36-
34+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-interactive-dashboard-editor.*OK"
3735
python -m jupyterlab.browser_check
38-

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ node_modules/
55
.ipynb_checkpoints
66
*.tsbuildinfo
77

8-
jupyterlab_interactive_dashboard_editor/labextension
8+
jupyterlab-interactive-dashboard-editor/labextension
99

1010
*/labextension/*.tgz
1111
# Created by https://www.gitignore.io/api/python
@@ -115,4 +115,4 @@ dmypy.json
115115
.vscode
116116

117117
# Local testing
118-
__test/
118+
__test/

.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5-
jupyterlab_interactive_dashboard_editor
5+
jupyterlab-interactive-dashboard-editor
66
.vscode
7-
.github
7+
.github

MANIFEST.in

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,22 @@ include README.md
33
include pyproject.toml
44
include install.json
55

6-
graft jupyterlab_interactive_dashboard_editor/labextension
6+
include package.json
7+
include install.json
8+
include ts*.json
9+
include yarn.lock
10+
11+
graft jupyterlab-interactive-dashboard-editor/labextension
12+
13+
# Javascript files
14+
graft src
15+
graft style
16+
prune **/node_modules
17+
prune lib
18+
19+
# Patterns to exclude from any directory
20+
global-exclude *~
21+
global-exclude *.pyc
22+
global-exclude *.pyo
23+
global-exclude .git
24+
global-exclude .ipynb_checkpoints

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ And edit them again!
6060
Note: You will need NodeJS to install the extension.
6161

6262
```bash
63-
pip install jupyterlab_interactive_dashboard_editor
63+
pip install jupyterlab-interactive-dashboard-editor
6464
jupyter lab build
6565
```
6666

binder/postBuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rm -rf design
1010
rm -rf .github
1111
rm -rf binder
1212
rm -rf docs
13-
rm -rf jupyterlab_interactive_dashboard_editor
13+
rm -rf jupyterlab-interactive-dashboard-editor
1414
rm package.json
1515
rm tsconfig.json
1616
rm yarn.lock

docs/getting_started/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Note: You will need NodeJS to install the extension.
1313

1414
.. code:: bash
1515
16-
pip install jupyterlab_interactive_dashboard_editor
16+
pip install jupyterlab-interactive-dashboard-editor
1717
jupyter lab build
1818
1919
.. code:: bash

install.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"packageManager": "python",
3+
"packageName": "jupyterlab-interactive-dashboard-editor",
4+
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab-interactive-dashboard-editor"
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
import json
3+
from pathlib import Path
4+
5+
from ._version import __version__
6+
7+
HERE = Path(__file__).parent.resolve()
8+
9+
with (HERE / "labextension" / "package.json").open() as fid:
10+
data = json.load(fid)
11+
12+
def _jupyter_labextension_paths():
13+
return [{
14+
"src": "labextension",
15+
"dest": data["name"]
16+
}]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import json
2+
from pathlib import Path
3+
4+
__all__ = ["__version__"]
5+
6+
def _fetchVersion():
7+
HERE = Path(__file__).parent.resolve()
8+
9+
for settings in HERE.rglob("package.json"):
10+
try:
11+
with settings.open() as f:
12+
return json.load(f)["version"]
13+
except FileNotFoundError:
14+
pass
15+
16+
raise FileNotFoundError(f"Could not find package.json under dir {HERE!s}")
17+
18+
__version__ = _fetchVersion()
19+

0 commit comments

Comments
 (0)