Skip to content

Commit

Permalink
Rename the extension jupyterlite_ai (#20)
Browse files Browse the repository at this point in the history
* Rename javascript package

* Rename the python package
  • Loading branch information
brichet authored Dec 3, 2024
1 parent a5a3bd6 commit cb6036f
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ author_name: Jeremy Tuloup
has_binder: false
has_settings: true
kind: frontend
labextension_name: jupyterlab-codestral
labextension_name: @jupyterlite/ai
project_short_description: Codestral AI code completions for JupyterLab
python_name: jupyterlab_codestral
python_name: jupyterlite_ai
repository: https://github.com/jupyterlite/jupyterlab-codestral
test: false

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

test_isolated:
Expand All @@ -74,11 +74,11 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4.0.0,<5" jupyterlab_codestral*.whl
pip install "jupyterlab>=4.0.0,<5" jupyterlite_ai*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-codestral.*OK"
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/ai.*OK"
python -m jupyterlab.browser_check --no-browser-test
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_codestral-releaser-dist-${{ github.run_number }}
name: jupyterlite_ai-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_codestral/labextension
jupyterlite_ai/labextension
# Version file is handled by hatchling
jupyterlab_codestral/_version.py
jupyterlite_ai/_version.py

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
Expand Down
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
jupyterlab_codestral
jupyterlite_ai
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jupyterlab-codestral
# jupyterlite-ai

[![Github Actions Status](https://github.com/jupyterlite/jupyterlab-codestral/workflows/Build/badge.svg)](https://github.com/jupyterlite/jupyterlab-codestral/actions/workflows/build.yml)
[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite.github.io/jupyterlab-codestral/lab/index.html)
Expand Down Expand Up @@ -34,7 +34,7 @@ See the [Usage](#usage) section below for more information on how to provide you
To install the extension, execute:

```bash
pip install jupyterlab-codestral
pip install jupyterlite-ai
```

# Usage
Expand All @@ -56,7 +56,7 @@ pip install jupyterlab-codestral
To remove the extension, execute:

```bash
pip uninstall jupyterlab-codestral
pip uninstall jupyterlite-ai
```

## Contributing
Expand Down Expand Up @@ -100,12 +100,12 @@ jupyter lab build --minimize=False
### Development uninstall

```bash
pip uninstall jupyterlab-codestral
pip uninstall jupyterlite-ai
```

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-codestral` within that folder.
folder is located. Then you can remove the symlink named `@jupyterlite/ai` 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 jupyterlab_codestral
# Making a new release of jupyterlite_ai

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

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": "jupyterlab_codestral",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab_codestral"
"packageName": "jupyterlite_ai",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlite_ai"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# 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_codestral' outside a proper installation.")
warnings.warn("Importing 'jupyterlite_ai' outside a proper installation.")
__version__ = "dev"


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "jupyterlab-codestral"
"dest": "@jupyterlite/ai"
}]
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "jupyterlab-codestral",
"name": "@jupyterlite/ai",
"version": "0.1.0",
"description": "Codestral AI code completions for JupyterLab",
"keywords": [
Expand Down Expand Up @@ -36,7 +36,7 @@
"clean": "jlpm clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf jupyterlab_codestral/labextension jupyterlab_codestral/_version.py",
"clean:labextension": "rimraf jupyterlite_ai/labextension jupyterlite_ai/_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 @@ -100,7 +100,7 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "jupyterlab_codestral/labextension",
"outputDir": "jupyterlite_ai/labextension",
"schemaDir": "schema"
},
"eslintIgnore": [
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_codestral"
name = "jupyterlite_ai"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
Expand Down Expand Up @@ -33,24 +33,24 @@ source = "nodejs"
fields = ["description", "authors", "urls"]

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

[tool.hatch.build.targets.wheel.shared-data]
"jupyterlab_codestral/labextension" = "share/jupyter/labextensions/jupyterlab-codestral"
"install.json" = "share/jupyter/labextensions/jupyterlab-codestral/install.json"
"jupyterlite_ai/labextension" = "share/jupyter/labextensions/@jupyterlite/ai"
"install.json" = "share/jupyter/labextensions/@jupyterlite/ai/install.json"

[tool.hatch.build.hooks.version]
path = "jupyterlab_codestral/_version.py"
path = "jupyterlite_ai/_version.py"

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

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

[tool.jupyter-releaser.options]
version_cmd = "hatch version"
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { AIProvider } from './provider';
import { IAIProvider } from './token';

const chatPlugin: JupyterFrontEndPlugin<void> = {
id: 'jupyterlab-codestral:chat',
id: '@jupyterlite/ai:chat',
description: 'LLM chat extension',
autoStart: true,
optional: [INotebookTracker, ISettingRegistry, IThemeManager],
Expand Down Expand Up @@ -91,7 +91,7 @@ const chatPlugin: JupyterFrontEndPlugin<void> = {
};

const aiProviderPlugin: JupyterFrontEndPlugin<IAIProvider> = {
id: 'jupyterlab-codestral:ai-provider',
id: '@jupyterlite/ai:ai-provider',
autoStart: true,
requires: [ICompletionProviderManager, ISettingRegistry],
provides: IAIProvider,
Expand Down
2 changes: 1 addition & 1 deletion src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export interface IAIProvider {
}

export const IAIProvider = new Token<IAIProvider>(
'jupyterlab-codestral:AIProvider',
'@jupyterlite/ai:AIProvider',
'Provider for chat and completion LLM provider'
);
82 changes: 41 additions & 41 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,47 @@ __metadata:
languageName: node
linkType: hard

"@jupyterlite/ai@workspace:.":
version: 0.0.0-use.local
resolution: "@jupyterlite/ai@workspace:."
dependencies:
"@jupyter/chat": ^0.5.0
"@jupyterlab/application": ^4.2.0
"@jupyterlab/apputils": ^4.3.0
"@jupyterlab/builder": ^4.0.0
"@jupyterlab/completer": ^4.2.0
"@jupyterlab/notebook": ^4.2.0
"@jupyterlab/rendermime": ^4.2.0
"@jupyterlab/settingregistry": ^4.2.0
"@langchain/core": ^0.3.13
"@langchain/mistralai": ^0.1.1
"@lumino/coreutils": ^2.1.2
"@lumino/polling": ^2.1.2
"@lumino/signaling": ^2.1.2
"@types/json-schema": ^7.0.11
"@types/react": ^18.0.26
"@types/react-addons-linked-state-mixin": ^0.14.22
"@typescript-eslint/eslint-plugin": ^6.1.0
"@typescript-eslint/parser": ^6.1.0
css-loader: ^6.7.1
eslint: ^8.36.0
eslint-config-prettier: ^8.8.0
eslint-plugin-prettier: ^5.0.0
npm-run-all: ^4.1.5
prettier: ^3.0.0
rimraf: ^5.0.1
source-map-loader: ^1.0.2
style-loader: ^3.3.1
stylelint: ^15.10.1
stylelint-config-recommended: ^13.0.0
stylelint-config-standard: ^34.0.0
stylelint-csstree-validator: ^3.0.0
stylelint-prettier: ^4.0.0
typescript: ~5.0.2
yjs: ^13.5.0
languageName: unknown
linkType: soft

"@langchain/core@npm:^0.3.13":
version: 0.3.13
resolution: "@langchain/core@npm:0.3.13"
Expand Down Expand Up @@ -4871,47 +4912,6 @@ __metadata:
languageName: node
linkType: hard

"jupyterlab-codestral@workspace:.":
version: 0.0.0-use.local
resolution: "jupyterlab-codestral@workspace:."
dependencies:
"@jupyter/chat": ^0.5.0
"@jupyterlab/application": ^4.2.0
"@jupyterlab/apputils": ^4.3.0
"@jupyterlab/builder": ^4.0.0
"@jupyterlab/completer": ^4.2.0
"@jupyterlab/notebook": ^4.2.0
"@jupyterlab/rendermime": ^4.2.0
"@jupyterlab/settingregistry": ^4.2.0
"@langchain/core": ^0.3.13
"@langchain/mistralai": ^0.1.1
"@lumino/coreutils": ^2.1.2
"@lumino/polling": ^2.1.2
"@lumino/signaling": ^2.1.2
"@types/json-schema": ^7.0.11
"@types/react": ^18.0.26
"@types/react-addons-linked-state-mixin": ^0.14.22
"@typescript-eslint/eslint-plugin": ^6.1.0
"@typescript-eslint/parser": ^6.1.0
css-loader: ^6.7.1
eslint: ^8.36.0
eslint-config-prettier: ^8.8.0
eslint-plugin-prettier: ^5.0.0
npm-run-all: ^4.1.5
prettier: ^3.0.0
rimraf: ^5.0.1
source-map-loader: ^1.0.2
style-loader: ^3.3.1
stylelint: ^15.10.1
stylelint-config-recommended: ^13.0.0
stylelint-config-standard: ^34.0.0
stylelint-csstree-validator: ^3.0.0
stylelint-prettier: ^4.0.0
typescript: ~5.0.2
yjs: ^13.5.0
languageName: unknown
linkType: soft

"keyv@npm:^4.5.3":
version: 4.5.4
resolution: "keyv@npm:4.5.4"
Expand Down

0 comments on commit cb6036f

Please sign in to comment.