Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Dec 11, 2024
1 parent 1c6a775 commit a79a6cf
Show file tree
Hide file tree
Showing 17 changed files with 910 additions and 1,163 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
jlpm dev
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-suggestions.*OK"
jupyter labextension list 2>&1 | grep -ie "suggestions.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-suggestions.*OK"
jupyter labextension list 2>&1 | grep -ie "suggestions.*OK"
python -m jupyterlab.browser_check --no-browser-test
check_links:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,6 @@ dmypy.json

# Yarn cache
.yarn/

python/jupyter_suggestions_rtc/jupyter_suggestions_rtc/labextension
python/jupyter_suggestions_rtc/jupyter_suggestions_rtc/_version.py
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupyter/jupyter-suggestions-root",
"name": "@jupyter/suggestions-root",
"version": "0.1.0",
"private": true,
"description": "A JupyterLab extension for suggesting changes.",
Expand Down
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupyter/jupyter-suggestions-base",
"name": "@jupyter/suggestions-base",
"version": "0.1.0",
"description": "Base components of jupyter-suggestions extension",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "@jupyter/jupyter-suggestions-core"
"dest": "@jupyter/suggestions-core"
}]
6 changes: 3 additions & 3 deletions python/jupyter_suggestions_core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupyter/jupyter-suggestions-core",
"name": "@jupyter/suggestions-core",
"version": "0.1.0",
"description": "Jupyter Suggestions core extension",
"keywords": [
Expand Down Expand Up @@ -44,7 +44,7 @@
"watch:labextension": "jupyter labextension watch ."
},
"dependencies": {
"@jupyter/jupyter-suggestions-base": "^0.1.0",
"@jupyter/suggestions-base": "^0.1.0",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/notebook": "^4.0.0",
"@jupyterlab/settingregistry": "^4.0.0",
Expand Down Expand Up @@ -80,7 +80,7 @@
"extension": true,
"outputDir": "jupyter_suggestions_core/labextension",
"sharedPackages": {
"@jupyter/jupyter-suggestions-base": {
"@jupyter/suggestions-base": {
"singleton": true,
"bundled": true
}
Expand Down
4 changes: 2 additions & 2 deletions python/jupyter_suggestions_core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ artifacts = ["jupyter_suggestions_core/labextension"]
exclude = [".github", "binder", "node_modules"]

[tool.hatch.build.targets.wheel.shared-data]
"install.json" = "share/jupyter/labextensions/@jupyter/jupyter-suggestions-core/install.json"
"jupyter_suggestions_core/labextension" = "share/jupyter/labextensions/@jupyter/jupyter-suggestions-core"
"install.json" = "share/jupyter/labextensions/@jupyter/suggestions-core/install.json"
"jupyter_suggestions_core/labextension" = "share/jupyter/labextensions/@jupyter/suggestions-core"

[tool.hatch.build.hooks.version]
path = "jupyter_suggestions_core/_version.py"
Expand Down
4 changes: 2 additions & 2 deletions python/jupyter_suggestions_core/schema/commands.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "@jupyter/jupyter-suggestions-core",
"description": "@jupyter/jupyter-suggestions-core settings.",
"title": "@jupyter/suggestions-core",
"description": "@jupyter/suggestions-core settings.",
"type": "object",
"additionalProperties": false,
"jupyter.lab.toolbars": {
Expand Down
4 changes: 2 additions & 2 deletions python/jupyter_suggestions_core/src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SuggestionsManagerRegistry,
SuggestionsModel,
SuggestionsPanelWidget
} from '@jupyter/jupyter-suggestions-base';
} from '@jupyter/suggestions-base';
import {
ILayoutRestorer,
JupyterFrontEnd,
Expand All @@ -24,7 +24,7 @@ import {
import { SuggestionsSettingComponent } from './settingrenderer';
import type { FieldProps } from '@rjsf/utils';

const NAME_SPACE = '@jupyter/jupyter-suggestions-core';
const NAME_SPACE = '@jupyter/suggestions-core';

export const suggestionsModelPlugin: JupyterFrontEndPlugin<ISuggestionsModel> =
{
Expand Down
2 changes: 0 additions & 2 deletions python/jupyter_suggestions_rtc/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "@jupyter/jupyter-suggestions-rtc"
"dest": "@jupyter/suggestions-rtc"
}]
10 changes: 5 additions & 5 deletions python/jupyter_suggestions_rtc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupyter/jupyter-suggestions-rtc",
"name": "@jupyter/suggestions-rtc",
"version": "0.1.0",
"description": "jupyter-suggestions with jupyter-collaboration backend",
"keywords": [
Expand Down Expand Up @@ -44,9 +44,9 @@
"watch:labextension": "jupyter labextension watch ."
},
"dependencies": {
"@jupyter/collaborative-drive": "^3.1.0-rc.0",
"@jupyter/docprovider": "^3.1.0-rc.0",
"@jupyter/jupyter-suggestions-base": "^0.1.0",
"@jupyter/collaborative-drive": "^3.1.0",
"@jupyter/docprovider": "^3.1.0",
"@jupyter/suggestions-base": "^0.1.0",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/notebook": "^4.0.0"
},
Expand Down Expand Up @@ -78,7 +78,7 @@
"extension": true,
"outputDir": "jupyter_suggestions_rtc/labextension",
"sharedPackages": {
"@jupyter/jupyter-suggestions-base": {
"@jupyter/suggestions-base": {
"singleton": true,
"bundled": false
},
Expand Down
6 changes: 3 additions & 3 deletions python/jupyter_suggestions_rtc/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = ["jupyter-collaboration>=3.1.0rc0"]
dependencies = ["jupyter-collaboration>=3.1.0"]
dynamic = ["version", "description", "authors", "urls", "keywords"]
license = { file = "LICENSE" }
name = "jupyter_suggestions_rtc"
Expand All @@ -40,8 +40,8 @@ artifacts = ["jupyter_suggestions_rtc/labextension"]
exclude = [".github", "binder", "node_modules"]

[tool.hatch.build.targets.wheel.shared-data]
"install.json" = "share/jupyter/labextensions/@jupyter/jupyter-suggestions-rtc/install.json"
"jupyter_suggestions_rtc/labextension" = "share/jupyter/labextensions/@jupyter/jupyter-suggestions-rtc"
"install.json" = "share/jupyter/labextensions/@jupyter/suggestions-rtc/install.json"
"jupyter_suggestions_rtc/labextension" = "share/jupyter/labextensions/@jupyter/suggestions-rtc"

[tool.hatch.build.hooks.version]
path = "jupyter_suggestions_rtc/_version.py"
Expand Down
19 changes: 8 additions & 11 deletions python/jupyter_suggestions_rtc/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { ICollaborativeDrive } from '@jupyter/collaborative-drive';
import {
IForkChangedEvent,
IForkManager,
requestAPI
requestDocSession
} from '@jupyter/docprovider';
import {
BaseSuggestionsManager,
IAllSuggestionData,
IDict,
ISuggestionData,
ISuggestionsManager
} from '@jupyter/jupyter-suggestions-base';
} from '@jupyter/suggestions-base';
import { YNotebook } from '@jupyter/ydoc';
import {
Cell,
Expand Down Expand Up @@ -60,19 +60,16 @@ export class RtcSuggestionsManager
async getAllSuggestions(
notebook: NotebookPanel
): Promise<IAllSuggestionData | undefined> {
if (!this._serverSession) {
const res = await requestAPI<{ sessionId: string }>(
URLExt.join('api/collaboration/session/'),
{
method: 'GET'
}
);
this._serverSession = res.sessionId;
}
const rootDocId = notebook.context.model.sharedModel.getState(
'document_id'
) as string;

const [format, type] = rootDocId.split(':');
const path = notebook.context.localPath;
if (!this._serverSession) {
const docSession = await requestDocSession(format, type, path);
this._serverSession = docSession.sessionId;
}
if (this._suggestionsMap.has(path)) {
return this._suggestionsMap.get(path);
} else {
Expand Down
4 changes: 2 additions & 2 deletions python/jupyter_suggestions_rtc/src/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ISuggestionsManagerRegistry,
ISuggestionsManagerRegistryToken
} from '@jupyter/jupyter-suggestions-base';
} from '@jupyter/suggestions-base';
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
Expand All @@ -12,7 +12,7 @@ import { RtcSuggestionsManager } from './manager';
import { IForkManager, IForkManagerToken } from '@jupyter/docprovider';
import { ICollaborativeDrive } from '@jupyter/collaborative-drive';

const NAME_SPACE = '@jupyter/jupyter-suggestions-rtc';
const NAME_SPACE = '@jupyter/suggestions-rtc';

export const suggestionsManagerPlugin: JupyterFrontEndPlugin<void> = {
id: `${NAME_SPACE}:manager`,
Expand Down
2 changes: 1 addition & 1 deletion tsconfigbase.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"strict": true,
"strictNullChecks": true,
"target": "ES2018",
"lib": ["es2022.intl", "dom"]
"lib": ["es2022.intl", "ES2018", "dom"]
}
}
Loading

0 comments on commit a79a6cf

Please sign in to comment.