Skip to content

Commit

Permalink
Rename to jupyterlab-launchpad (#59)
Browse files Browse the repository at this point in the history
* Rename to `jupyterlab-launchpad`

* Migrate from the database before rename

* Remane in hidden files

* Rename folder

* Rename few more occurrences in the workflows

* Bump version to 1.0.0
  • Loading branch information
krassowski authored Jun 25, 2024
1 parent 41a3e0c commit 581d1ee
Show file tree
Hide file tree
Showing 28 changed files with 99 additions and 93 deletions.
6 changes: 3 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ file_extension: ''
has_binder: true
has_settings: true
kind: frontend
labextension_name: jupyterlab-new-launcher
labextension_name: jupyterlab-launchpad
mimetype: ''
mimetype_name: ''
project_short_description: A redesigned JupyterLab launcher
python_name: jupyterlab_new_launcher
repository: https://github.com/nebari-dev/jupyterlab-new-launcher
python_name: jupyterlab_launchpad
repository: https://github.com/nebari-dev/jupyterlab-launchpad
test: true
viewer_name: ''

14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
python -m pip install .[test]
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-new-launcher.*OK"
jupyter labextension list 2>&1 | grep -ie "jupyterlab-launchpad.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
Expand All @@ -50,13 +50,13 @@ jobs:
pip install build
python -m build
pip uninstall -y "jupyterlab_new_launcher" jupyterlab
pip uninstall -y "jupyterlab_launchpad" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/jupyterlab_new_launcher*
path: dist/jupyterlab_launchpad*
if-no-files-found: error

test_isolated:
Expand All @@ -79,11 +79,11 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4.0.0,<5" jupyterlab_new_launcher*.whl
pip install "jupyterlab>=4.0.0,<5" jupyterlab_launchpad*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-new-launcher.*OK"
jupyter labextension list 2>&1 | grep -ie "jupyterlab-launchpad.*OK"
python -m jupyterlab.browser_check --no-browser-test
integration-tests:
Expand All @@ -109,7 +109,7 @@ jobs:
- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_new_launcher*.whl
python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_launchpad*.whl
- name: Install dependencies
working-directory: ui-tests
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: jupyterlab_new_launcher-playwright-tests
name: jupyterlab_launchpad-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
- name: Upload Distributions
uses: actions/upload-artifact@v4
with:
name: jupyterlab_new_launcher-releaser-dist-${{ github.run_number }}
name: jupyterlab_launchpad-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
jupyterlab_new_launcher/labextension
jupyterlab_launchpad/labextension
# Version file is handled by hatchling
jupyterlab_new_launcher/_version.py
jupyterlab_launchpad/_version.py
.jupyter

# Integration tests
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# jupyterlab-new-launcher
# jupyterlab-launchpad

[![Github Actions Status](https://github.com/nebari-dev/jupyterlab-new-launcher/workflows/Build/badge.svg)](https://github.com/nebari-dev/jupyterlab-new-launcher/actions/workflows/build.yml)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/nebari-dev/jupyterlab-new-launcher/main?urlpath=lab)
[![Github Actions Status](https://github.com/nebari-dev/jupyterlab-launchpad/workflows/Build/badge.svg)](https://github.com/nebari-dev/jupyterlab-launchpad/actions/workflows/build.yml)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/nebari-dev/jupyterlab-launchpad/main?urlpath=lab)

A redesigned JupyterLab launcher

Expand All @@ -11,8 +11,8 @@ Kernel selection dialog:

![new dialog][dialog]

[launcher]: https://raw.githubusercontent.com/nebari-dev/jupyterlab-new-launcher/main/docs/images/launcher.png
[dialog]: https://raw.githubusercontent.com/nebari-dev/jupyterlab-new-launcher/main/docs/images/dialog.png
[launcher]: https://raw.githubusercontent.com/nebari-dev/jupyterlab-launchpad/main/docs/images/launcher.png
[dialog]: https://raw.githubusercontent.com/nebari-dev/jupyterlab-launchpad/main/docs/images/dialog.png

## Requirements

Expand All @@ -23,15 +23,15 @@ Kernel selection dialog:
To install the extension, execute:

```bash
pip install jupyterlab-new-launcher
pip install jupyterlab-launchpad
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall jupyterlab-new-launcher
pip uninstall jupyterlab-launchpad
```

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

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

```bash
pip uninstall jupyterlab_new_launcher
pip uninstall jupyterlab_launchpad
```

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 `jupyterlab-new-launcher` within that folder.
folder is located. Then you can remove the symlink named `jupyterlab-launchpad` within that folder.

### Testing 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 jupyterlab_new_launcher
# Making a new release of jupyterlab_launchpad

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 jupyterlab_new_launcher
# a mybinder.org-ready environment for demoing jupyterlab_launchpad
# this environment may also be used locally on Linux/MacOS/Windows, e.g.
#
# conda env update --file binder/environment.yml
# conda activate jupyterlab-new-launcher-demo
# conda activate jupyterlab-launchpad-demo
#
name: jupyterlab-new-launcher-demo
name: jupyterlab-launchpad-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 jupyterlab_new_launcher
""" perform a development install of jupyterlab_launchpad
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 jupyterlab_new_launcher is ready to run with:\n")
print("JupyterLab with jupyterlab_launchpad is ready to run with:\n")
print("\tjupyter lab\n")
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": "jupyterlab_new_launcher",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab_new_launcher"
"packageName": "jupyterlab_launchpad",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab_launchpad"
}
2 changes: 1 addition & 1 deletion jupyter-config/server-config/jupyterlab_new_launcher.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ServerApp": {
"jpserver_extensions": {
"jupyterlab_new_launcher": true
"jupyterlab_launchpad": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
# in editable mode with pip. It is highly recommended to install
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
import warnings
warnings.warn("Importing 'jupyterlab_new_launcher' outside a proper installation.")
warnings.warn("Importing 'jupyterlab_launchpad' outside a proper installation.")
__version__ = "dev"
from .handlers import setup_handlers


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "jupyterlab-new-launcher"
"dest": "jupyterlab-launchpad"
}]


def _jupyter_server_extension_points():
return [{"module": "jupyterlab_new_launcher"}]
return [{"module": "jupyterlab_launchpad"}]


def _load_jupyter_server_extension(server_app):
Expand All @@ -30,5 +30,5 @@ def _load_jupyter_server_extension(server_app):
JupyterLab application instance
"""
setup_handlers(server_app.web_app, server_app)
name = "jupyterlab_new_launcher"
name = "jupyterlab_launchpad"
server_app.log.info(f"Registered {name} server extension")
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
from pathlib import Path
import shutil

from jupyter_server.base.handlers import APIHandler
from jupyter_server.utils import url_path_join
Expand All @@ -9,7 +10,12 @@
class DatabaseHandler(APIHandler):

def initialize(self, name: str, settings_dir: str):
self.path = Path(settings_dir) / "jupyterlab-new-launcher" / f"{name}.json"
self.path = Path(settings_dir) / "jupyterlab-launchpad" / f"{name}.json"
old_path = Path(settings_dir) / "jupyterlab-new-launcher" / f"{name}.json"
if not self.path.exists() and old_path.exists():
# migrate database from prior to rename
shutil.copy(old_path, self.path)
old_path.unlink()

# The following decorator should be present on all verb methods (head, get, post,
# patch, put, delete, options) to ensure only authorized user can request the
Expand Down Expand Up @@ -38,7 +44,7 @@ def setup_handlers(web_app, server_app):
host_pattern = ".*$"

base_url = web_app.settings["base_url"]
api_url = url_path_join(base_url, "jupyterlab-new-launcher");
api_url = url_path_join(base_url, "jupyterlab-launchpad");
db_url = url_path_join(api_url, "database")
kwargs = {"settings_dir": web_app.settings["lab_config"]["user_settings_dir"]}
handlers = [
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "jupyterlab-new-launcher",
"version": "0.5.1",
"name": "jupyterlab-launchpad",
"version": "1.0.0",
"description": "A redesigned JupyterLab launcher",
"keywords": [
"jupyter",
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/nebari-dev/jupyterlab-new-launcher",
"homepage": "https://github.com/nebari-dev/jupyterlab-launchpad",
"bugs": {
"url": "https://github.com/nebari-dev/jupyterlab-new-launcher/issues"
"url": "https://github.com/nebari-dev/jupyterlab-launchpad/issues"
},
"license": "BSD-3-Clause",
"author": {
Expand All @@ -28,7 +28,7 @@
"style": "style/index.css",
"repository": {
"type": "git",
"url": "https://github.com/nebari-dev/jupyterlab-new-launcher.git"
"url": "https://github.com/nebari-dev/jupyterlab-launchpad.git"
},
"scripts": {
"build": "jlpm build:lib && jlpm build:labextension:dev",
Expand All @@ -40,7 +40,7 @@
"clean": "jlpm clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf jupyterlab_new_launcher/labextension jupyterlab_new_launcher/_version.py",
"clean:labextension": "rimraf jupyterlab_launchpad/labextension jupyterlab_launchpad/_version.py",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
Expand Down Expand Up @@ -99,7 +99,7 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "jupyterlab_new_launcher/labextension",
"outputDir": "jupyterlab_launchpad/labextension",
"schemaDir": "schema",
"disabledExtensions": [
"@jupyterlab/launcher-extension",
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0
build-backend = "hatchling.build"

[project]
name = "jupyterlab-new-launcher"
name = "jupyterlab-launchpad"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
Expand Down Expand Up @@ -34,25 +34,25 @@ source = "nodejs"
fields = ["description", "authors", "urls"]

[tool.hatch.build.targets.sdist]
artifacts = ["jupyterlab_new_launcher/labextension"]
artifacts = ["jupyterlab_launchpad/labextension"]
exclude = [".github", "binder"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyterlab_new_launcher/labextension" = "share/jupyter/labextensions/jupyterlab-new-launcher"
"install.json" = "share/jupyter/labextensions/jupyterlab-new-launcher/install.json"
"jupyterlab_launchpad/labextension" = "share/jupyter/labextensions/jupyterlab-launchpad"
"install.json" = "share/jupyter/labextensions/jupyterlab-launchpad/install.json"
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"

[tool.hatch.build.hooks.version]
path = "jupyterlab_new_launcher/_version.py"
path = "jupyterlab_launchpad/_version.py"

[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"jupyterlab_new_launcher/labextension/static/style.js",
"jupyterlab_new_launcher/labextension/package.json",
"jupyterlab_launchpad/labextension/static/style.js",
"jupyterlab_launchpad/labextension/package.json",
]
skip-if-exists = ["jupyterlab_new_launcher/labextension/static/style.js"]
skip-if-exists = ["jupyterlab_launchpad/labextension/static/style.js"]

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
Expand All @@ -62,7 +62,7 @@ npm = ["jlpm"]
build_cmd = "install:extension"
npm = ["jlpm"]
source_dir = "src"
build_dir = "jupyterlab_new_launcher/labextension"
build_dir = "jupyterlab_launchpad/labextension"

[tool.jupyter-releaser.options]
version_cmd = "hatch version"
Expand Down
8 changes: 4 additions & 4 deletions schema/plugin.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"jupyter.lab.setting-icon": "ui-components:launcher",
"jupyter.lab.setting-icon-label": "New Launcher",
"jupyter.lab.setting-icon-label": "Launchpad",
"jupyter.lab.toolbars": {
"FileBrowser": [
{
"name": "new-launcher",
"name": "launchpad",
"command": "launcher:create",
"rank": 1
}
Expand All @@ -30,8 +30,8 @@
"selector": "body"
}
],
"title": "New Launcher",
"description": "jupyterlab-new-launcher settings.",
"title": "Launchpad",
"description": "jupyterlab-launchpad settings.",
"type": "object",
"properties": {
"hiddenColumns": {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/jupyterlab_new_launcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Example of [Jest](https://jestjs.io/docs/getting-started) unit tests
*/

describe('jupyterlab-new-launcher', () => {
describe('jupyterlab-launchpad', () => {
it('should be tested', () => {
expect(1 + 1).toEqual(2);
});
Expand Down
Loading

0 comments on commit 581d1ee

Please sign in to comment.