Skip to content

Commit

Permalink
rename project
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Jan 2, 2025
1 parent bffec26 commit b407f7f
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 54 deletions.
6 changes: 3 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.3.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: mbektas@outlook.com
author_email: mbektasgh@outlook.com
author_name: Mehmet Bektas
has_binder: false
has_settings: true
kind: server
labextension_name: '@mbektas/jupyter-notebook-intelligence'
project_short_description: Jupyter Notebook Intelligence extension
python_name: jupyter_notebook_intelligence
project_short_description: Notebook Intelligence extension for JupyterLab
python_name: notebook_intelligence
repository: https://github.com/mbektas/notebook-intelligence
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 server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_notebook_intelligence.*OK"
jupyter server extension list 2>&1 | grep -ie "notebook_intelligence.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@mbektas/jupyter-notebook-intelligence.*OK"
Expand All @@ -48,13 +48,13 @@ jobs:
pip install build
python -m build
pip uninstall -y "jupyter_notebook_intelligence" jupyterlab
pip uninstall -y "notebook_intelligence" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/jupyter_notebook_intelligence*
path: dist/notebook_intelligence*
if-no-files-found: error

test_isolated:
Expand All @@ -77,11 +77,11 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4.0.0,<5" jupyter_notebook_intelligence*.whl
pip install "jupyterlab>=4.0.0,<5" notebook_intelligence*.whl
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_notebook_intelligence.*OK"
jupyter server extension list 2>&1 | grep -ie "notebook_intelligence.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@mbektas/jupyter-notebook-intelligence.*OK"
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: jupyter_notebook_intelligence-releaser-dist-${{ github.run_number }}
name: notebook_intelligence-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
jupyter_notebook_intelligence/labextension
notebook_intelligence/labextension
# Version file is handled by hatchling
jupyter_notebook_intelligence/_version.py
notebook_intelligence/_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
jupyter_notebook_intelligence
notebook_intelligence
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# jupyter_notebook_intelligence
# Notebook Intelligence

[![Github Actions Status](https://github.com/mbektas/notebook-intelligence/workflows/Build/badge.svg)](https://github.com/mbektas/notebook-intelligence/actions/workflows/build.yml)

Jupyter Notebook Intelligence extension
Notebook Intelligence extension for JupyterLab

This extension is composed of a Python package named `jupyter_notebook_intelligence`
for the server extension and a NPM package named `@mbektas/jupyter-notebook-intelligence`
This extension is composed of a Python package named `notebook_intelligence`
for the server extension and a NPM package named `@mbektas/notebook-intelligence`
for the frontend extension.

## Requirements
Expand All @@ -17,15 +17,15 @@ for the frontend extension.
To install the extension, execute:

```bash
pip install jupyter_notebook_intelligence
pip install notebook_intelligence
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall jupyter_notebook_intelligence
pip uninstall notebook_intelligence
```

## Troubleshoot
Expand Down Expand Up @@ -56,13 +56,13 @@ The `jlpm` command is JupyterLab's pinned version of

```bash
# Clone the repo to your local environment
# Change directory to the jupyter_notebook_intelligence directory
# Change directory to the notebook_intelligence directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable jupyter_notebook_intelligence
jupyter server extension enable notebook_intelligence
# Rebuild extension Typescript source after making changes
jlpm build
```
Expand All @@ -88,8 +88,8 @@ jupyter lab build --minimize=False

```bash
# Server extension must be manually disabled in develop mode
jupyter server extension disable jupyter_notebook_intelligence
pip uninstall jupyter_notebook_intelligence
jupyter server extension disable notebook_intelligence
pip uninstall notebook_intelligence
```

In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
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 jupyter_notebook_intelligence
# Making a new release of notebook_intelligence

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": "jupyter_notebook_intelligence",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyter_notebook_intelligence"
"packageName": "notebook_intelligence",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package notebook_intelligence"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ServerApp": {
"jpserver_extensions": {
"jupyter_notebook_intelligence": true
"notebook_intelligence": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 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 'jupyter_notebook_intelligence' outside a proper installation.")
warnings.warn("Importing 'notebook_intelligence' outside a proper installation.")
__version__ = "dev"
from .handlers import initialize_extensions, setup_handlers
from .extension import NotebookIntelligenceExtension, Host, ChatParticipant, ChatRequest, ChatResponse
Expand All @@ -22,7 +22,7 @@ def _jupyter_labextension_paths():

def _jupyter_server_extension_points():
return [{
"module": "jupyter_notebook_intelligence"
"module": "notebook_intelligence"
}]


Expand All @@ -36,5 +36,5 @@ def _load_jupyter_server_extension(server_app):
"""
initialize_extensions()
setup_handlers(server_app.web_app)
name = "jupyter_notebook_intelligence"
name = "notebook_intelligence"
server_app.log.info(f"Registered {name} server extension")
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import traitlets
from traitlets.config import Configurable

# from jupyter_notebook_intelligence.agents import AgentManager
# from jupyter_notebook_intelligence.github_copilot import GithubCopilotChatAgent
# from notebook_intelligence.agents import AgentManager
# from notebook_intelligence.github_copilot import GithubCopilotChatAgent


class ContextType(Enum):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "@mbektas/jupyter-notebook-intelligence",
"version": "0.1.0",
"description": "Jupyter Notebook Intelligence extension",
"keywords": [
"description": "Notebook Intelligence extension for JupyterLab",
"keywords": [
"AI",
"notebook",
"intelligence",
"jupyter",
"jupyterlab",
"jupyterlab-extension"
Expand All @@ -11,10 +14,10 @@
"bugs": {
"url": "https://github.com/mbektas/notebook-intelligence/issues"
},
"license": "BSD-3-Clause",
"license": "GPL-3.0",
"author": {
"name": "Mehmet Bektas",
"email": "mbektas@outlook.com"
"email": "mbektasgh@outlook.com"
},
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
Expand All @@ -39,7 +42,7 @@
"clean": "jlpm clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf jupyter_notebook_intelligence/labextension jupyter_notebook_intelligence/_version.py",
"clean:labextension": "rimraf notebook_intelligence/labextension notebook_intelligence/_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 @@ -109,12 +112,12 @@
"pip"
],
"base": {
"name": "jupyter_notebook_intelligence"
"name": "notebook_intelligence"
}
}
},
"extension": true,
"outputDir": "jupyter_notebook_intelligence/labextension",
"outputDir": "notebook_intelligence/labextension",
"schemaDir": "schema"
},
"eslintIgnore": [
Expand Down
16 changes: 8 additions & 8 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 = "jupyter_notebook_intelligence"
name = "notebook_intelligence"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
Expand Down Expand Up @@ -35,25 +35,25 @@ source = "nodejs"
fields = ["description", "authors", "urls", "keywords"]

[tool.hatch.build.targets.sdist]
artifacts = ["jupyter_notebook_intelligence/labextension"]
artifacts = ["notebook_intelligence/labextension"]
exclude = [".github", "binder", "src", "style"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyter_notebook_intelligence/labextension" = "share/jupyter/labextensions/@mbektas/jupyter-notebook-intelligence"
"notebook_intelligence/labextension" = "share/jupyter/labextensions/@mbektas/jupyter-notebook-intelligence"
"install.json" = "share/jupyter/labextensions/@mbektas/jupyter-notebook-intelligence/install.json"
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"

[tool.hatch.build.hooks.version]
path = "jupyter_notebook_intelligence/_version.py"
path = "notebook_intelligence/_version.py"

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

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

[tool.jupyter-releaser.options]
version_cmd = "hatch version"
Expand Down
2 changes: 1 addition & 1 deletion src/chat-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function SidebarComponent(props: any) {
})
.catch(reason => {
console.error(
`The jupyter_notebook_intelligence server extension appears to be missing.\n${reason}`
`The notebook_intelligence server extension appears to be missing.\n${reason}`
);
});
}, []);
Expand Down
6 changes: 3 additions & 3 deletions src/github-copilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class GitHubCopilot {
})
.catch(reason => {
console.error(
`The jupyter_notebook_intelligence server extension appears to be missing.\n${reason}`
`The notebook_intelligence server extension appears to be missing.\n${reason}`
);
reject(reason);
});
Expand All @@ -95,7 +95,7 @@ export class GitHubCopilot {
})
.catch(reason => {
console.error(
`The jupyter_notebook_intelligence server extension appears to be missing.\n${reason}`
`The notebook_intelligence server extension appears to be missing.\n${reason}`
);
reject(reason);
});
Expand All @@ -113,7 +113,7 @@ export class GitHubCopilot {
})
.catch(reason => {
console.error(
`The jupyter_notebook_intelligence server extension appears to be missing.\n${reason}`
`The notebook_intelligence server extension appears to be missing.\n${reason}`
);
reject(reason);
});
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class GitHubInlineCompletionProvider implements IInlineCompletionProvider<IInlin
})
.catch(reason => {
console.error(
`The jupyter_notebook_intelligence server extension appears to be missing.\n${reason}`
`The notebook_intelligence server extension appears to be missing.\n${reason}`
);
});
});
Expand All @@ -134,16 +134,16 @@ class GitHubInlineCompletionProvider implements IInlineCompletionProvider<IInlin
}

get identifier(): string {
return '@mbektas/jupyter-notebook-intelligence';
return '@mbektas/notebook-intelligence';
}
}

/**
* Initialization data for the @mbektas/jupyter-notebook-intelligence extension.
*/
const plugin: JupyterFrontEndPlugin<void> = {
id: '@mbektas/jupyter-notebook-intelligence:plugin',
description: 'Jupyter Notebook Intelligence extension',
id: '@mbektas/notebook-intelligence:plugin',
description: 'Notebook Intelligence',
autoStart: true,
requires: [ICompletionProviderManager, IDocumentManager, IDefaultFileBrowser],
optional: [ISettingRegistry, IStatusBar],
Expand Down

0 comments on commit b407f7f

Please sign in to comment.