Skip to content

Commit

Permalink
Merge pull request #58 from visdesignlab/kg/rename-persist
Browse files Browse the repository at this point in the history
  • Loading branch information
kirangadhave authored Jun 25, 2023
2 parents f99d97e + f3241b2 commit 264ad73
Show file tree
Hide file tree
Showing 31 changed files with 2,400 additions and 1,038 deletions.
13 changes: 9 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ _commit: v4.0.6
_src_path: https://github.com/jupyterlab/extension-template
author_email: kirangadhave2@gmail.com
author_name: Kiran Gadhave
data_format: string
file_extension: ''
has_binder: true
has_settings: true
kind: frontend
labextension_name: interactivede
project_short_description: A JupyterLab extension.
python_name: interactivede
repository: https://github.com/kirangadhave/interactivede
labextension_name: persist_ext
mimetype: ''
mimetype_name: ''
project_short_description: PersIst is a JupyterLab extension to enable persistent interactive visualizations in JupyterLab notebooks.
python_name: persist_ext
repository: https://github.com/visdesignlab/persist
test: false
viewer_name: ''

14 changes: 5 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: main
branches: [main]
pull_request:
branches: '*'
branches: [ '*' ]

jobs:
build:
Expand All @@ -31,8 +31,6 @@ jobs:
set -eux
python -m pip install .[test]
# jupyter labextension list
# jupyter labextension list 2>&1 | grep -ie "interactivede.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
Expand All @@ -41,13 +39,13 @@ jobs:
pip install build
python -m build
pip uninstall -y "interactivede" jupyterlab
pip uninstall -y "persist_ext" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: extension-artifacts
path: dist/interactivede*
path: dist/persist_ext*
if-no-files-found: error

test_isolated:
Expand All @@ -72,11 +70,9 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4.0.0,<5" interactivede*.whl
pip install "jupyterlab>=4.0.0,<5" persist_ext*.whl
# jupyter labextension list
# jupyter labextension list 2>&1 | grep -ie "interactivede.*OK"
python -m jupyterlab.browser_check --no-browser-test
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ jobs:
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v3
with:
name: interactivede-releaser-dist-${{ github.run_number }}
name: persist_ext-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ node_modules/
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
interactivede/labextension
persist_ext/labextension
# Version file is handled by hatchling
interactivede/_version.py
persist_ext/_version.py

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
Expand Down
4 changes: 3 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
[ -n "$CI" ] && exit 0

npx --no -- commitlint --edit "$1"
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

jlpm lint
[ -n "$CI" ] && exit 0

jlpm lint
3 changes: 2 additions & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

[ -n "$CI" ] && exit 0

exec < /dev/tty && npx cz --hook || true < /dev/null
exec < /dev/tty && npx cz --hook || true < /dev/null
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
**/lib
**/package.json
!/package.json
interactivede
persist_ext
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
interactivede-venv
persist-ext-venv
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"eslint.workingDirectories": ["interactivede"],
"eslint.workingDirectories": ["persist_ext"],
"typescript.tsdk": "node_modules/typescript/lib"
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# interactivede
# persist_ext

[![Github Actions Status](https://github.com/kirangadhave/interactivede/workflows/Build/badge.svg)](https://github.com/kirangadhave/interactivede/actions/workflows/build.yml)[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kirangadhave/interactivede/main?urlpath=lab)
A JupyterLab extension.
[![Github Actions Status](https://github.com/visdesignlab/persist/workflows/Build/badge.svg)](https://github.com/visdesignlab/persist/actions/workflows/build.yml)[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/visdesignlab/persist/main?urlpath=lab)
PersIst is a JupyterLab extension to enable persistent interactive visualizations in JupyterLab notebooks.

## Requirements

Expand All @@ -12,15 +12,15 @@ A JupyterLab extension.
To install the extension, execute:

```bash
pip install interactivede
pip install persist_ext
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall interactivede
pip uninstall persist_ext
```

## Contributing
Expand All @@ -35,7 +35,7 @@ The `jlpm` command is JupyterLab's pinned version of

```bash
# Clone the repo to your local environment
# Change directory to the interactivede directory
# Change directory to the persist_ext directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
Expand Down Expand Up @@ -64,12 +64,12 @@ jupyter lab build --minimize=False
### Development uninstall

```bash
pip uninstall interactivede
pip uninstall persist_ext
```

In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
folder is located. Then you can remove the symlink named `interactivede` within that folder.
folder is located. Then you can remove the symlink named `persist_ext` within that folder.

### Packaging the extension

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Making a new release of interactivede
# Making a new release of persist_ext

The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).

Expand Down
6 changes: 3 additions & 3 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# a mybinder.org-ready environment for demoing interactivede
# a mybinder.org-ready environment for demoing persist_ext
# this environment may also be used locally on Linux/MacOS/Windows, e.g.
#
# conda env update --file binder/environment.yml
# conda activate interactivede-demo
# conda activate persist-ext-demo
#
name: interactivede-demo
name: persist-ext-demo

channels:
- conda-forge
Expand Down
4 changes: 2 additions & 2 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
""" perform a development install of interactivede
""" perform a development install of persist_ext
On Binder, this will run _after_ the environment has been fully created from
the environment.yml in this directory.
Expand Down Expand Up @@ -43,5 +43,5 @@ _("jupyter", "server", "extension", "list")
_("jupyter", "labextension", "list")


print("JupyterLab with interactivede is ready to run with:\n")
print("JupyterLab with persist_ext is ready to run with:\n")
print("\tjupyter lab\n")
5 changes: 2 additions & 3 deletions bootstrap-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ echo ""
# Setup python environment
banner
echo "Setting up python 3.8 venv"
pyenv install -s 3.8 interactivede-venv
pyenv virtualenv 3.8 interactivede-venv
pyenv local interactivede-venv
pyenv virtualenv 3.8 persist-ext-venv
pyenv local persist-ext-venv
pip install --upgrade pip

echo ""
Expand Down
8 changes: 5 additions & 3 deletions examples/basic_ext_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Loaded InteractiveDE extension version 1.0.1a1\n",
"Loaded PersIst extension version 0.0.0\n",
"Extension enabled for altair\n"
]
}
Expand All @@ -48,10 +48,12 @@
"from vega_datasets import data\n",
"import numpy as np\n",
"import pandas as pd\n",
" \n",
"import persist_ext as PR # Our library\n",
"\n",
"import interactivede.ide as IDE # Our library\n",
"PR.enable('altair')\n",
"\n",
"IDE.enable('altair') # Call this to enable integration with altair"
"# IDE.enable('altair') # Call this to enable integration with altair"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions install.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageManager": "python",
"packageName": "interactivede",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package interactivede"
"packageName": "persist_ext",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package persist_ext"
}
Loading

0 comments on commit 264ad73

Please sign in to comment.