Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 118 additions & 118 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,83 +15,83 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Test the extension
run: |
set -eux
jlpm run test

- name: Build the extension
run: |
set -eux
python -m pip install .[test]

pytest -vv -r ap --cov jupyter_server_documents
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_server_documents.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyter/server-documents.*OK"
python -m jupyterlab.browser_check

- name: Package the extension
run: |
set -eux

pip install build
python -m build
pip uninstall -y "jupyter_server_documents" jupyterlab

- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/jupyter_server_documents*
if-no-files-found: error
- name: Checkout
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Test the extension
run: |
set -eux
jlpm run test

- name: Build the extension
run: |
set -eux
python -m pip install .[test]

pytest -vv -r ap --cov jupyter_server_documents
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_server_documents.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyter-ai-contrib/server-documents.*OK"
python -m jupyterlab.browser_check

- name: Package the extension
run: |
set -eux

pip install build
python -m build
pip uninstall -y "jupyter_server_documents" jupyterlab

- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/jupyter_server_documents*
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.0.0,<5" jupyter_server_documents*.whl


jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_server_documents.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyter/server-documents.*OK"
python -m jupyterlab.browser_check --no-browser-test
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.0.0,<5" jupyter_server_documents*.whl


jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyter_server_documents.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyter-ai-contrib/server-documents.*OK"
python -m jupyterlab.browser_check --no-browser-test

integration-tests:
name: Integration tests
Expand All @@ -102,53 +102,53 @@ jobs:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Download extension package
uses: actions/download-artifact@v4
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0,<5" jupyter_server_documents*.whl

- name: Install dependencies
working-directory: ui-tests
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

- name: Install browser
run: jlpm playwright install chromium
working-directory: ui-tests

- name: Execute integration tests
working-directory: ui-tests
run: |
jlpm playwright test

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v4
with:
name: jupyter_server_documents-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
- name: Checkout
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Download extension package
uses: actions/download-artifact@v4
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0,<5" jupyter_server_documents*.whl

- name: Install dependencies
working-directory: ui-tests
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

- name: Install browser
run: jlpm playwright install chromium
working-directory: ui-tests

- name: Execute integration tests
working-directory: ui-tests
run: |
jlpm playwright test

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v4
with:
name: jupyter_server_documents-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report

check_links:
name: Check Links
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Jupyter Server Documents

This extension is composed of a Python package named `jupyter_server_documents`
for the server extension and a NPM package named `@jupyter/server-documents`
for the server extension and a NPM package named `@jupyter-ai-contrib/server-documents`
for the frontend extension.

## Overview
Expand Down Expand Up @@ -179,7 +179,7 @@ jlpm dev:uninstall
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 `@jupyter/server-documents` within that
located. Then you can remove the symlink named `@jupyter-ai-contrib/server-documents` within that
folder.

### Testing the extension
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server_documents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "@jupyter/server-documents"
"dest": "@jupyter-ai-contrib/server-documents"
}]


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupyter/server-documents",
"name": "@jupyter-ai-contrib/server-documents",
"version": "0.1.0-a6",
"description": "A JupyterLab extension that provides RTC capabilities.",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ artifacts = ["jupyter_server_documents/labextension"]
exclude = [".github", "binder"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyter_server_documents/labextension" = "share/jupyter/labextensions/@jupyter/server-documents"
"install.json" = "share/jupyter/labextensions/@jupyter/server-documents/install.json"
"jupyter_server_documents/labextension" = "share/jupyter/labextensions/@jupyter-ai-contrib/server-documents"
"install.json" = "share/jupyter/labextensions/@jupyter-ai-contrib/server-documents/install.json"
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"

[tool.hatch.build.hooks.version]
Expand Down
4 changes: 2 additions & 2 deletions schema/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"jupyter.lab.shortcuts": [],
"title": "@jupyter/server-documents",
"description": "@jupyter/server-documents settings.",
"title": "@jupyter-ai-contrib/server-documents",
"description": "@jupyter-ai-contrib/server-documents settings.",
"type": "object",
"properties": {},
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/jupyter_rtc_core.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('@jupyter/server-documents', () => {
describe('@jupyter-ai-contrib/server-documents', () => {
it('should be tested', () => {
expect(1 + 1).toEqual(2);
});
Expand Down
2 changes: 1 addition & 1 deletion src/codemirror-binding/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ybinding } from './ybinding';
* CodeMirror shared model binding provider.
*/
export const codemirrorYjsPlugin: JupyterFrontEndPlugin<void> = {
id: '@jupyter/server-documents:ybinding',
id: '@jupyter-ai-contrib/server-documents:ybinding',
description:
'Register the CodeMirror extension factory binding the editor and the shared model.',
autoStart: true,
Expand Down
2 changes: 1 addition & 1 deletion src/disablesave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const NOTIFICATION_INTERVAL = 20;
* Plugin to disable save commands
*/
export const disableSavePlugin: JupyterFrontEndPlugin<void> = {
id: 'disable-save:plugin',
id: '@jupyter-ai-contrib/server-documents:disable-save-plugin',
description:
'Disables save commands and removes their keyboard shortcuts since documents are autosaved',
autoStart: true,
Expand Down
10 changes: 5 additions & 5 deletions src/docprovider/filebrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TWO_SESSIONS_WARNING =

export const rtcContentProvider: JupyterFrontEndPlugin<ICollaborativeContentProvider> =
{
id: '@jupyter/server-documents:rtc-content-provider',
id: '@jupyter-ai-contrib/server-documents:rtc-content-provider',
description: 'The RTC content provider',
provides: ICollaborativeContentProvider,
requires: [ITranslator],
Expand Down Expand Up @@ -86,7 +86,7 @@ export const rtcContentProvider: JupyterFrontEndPlugin<ICollaborativeContentProv
* Plugin to register the shared model factory for the content type 'file'.
*/
export const yfile: JupyterFrontEndPlugin<void> = {
id: '@jupyter/server-documents:yfile',
id: '@jupyter-ai-contrib/server-documents:yfile',
description:
"Plugin to register the shared model factory for the content type 'file'",
autoStart: true,
Expand All @@ -111,7 +111,7 @@ export const yfile: JupyterFrontEndPlugin<void> = {
* Plugin to register the shared model factory for the content type 'notebook'.
*/
export const ynotebook: JupyterFrontEndPlugin<void> = {
id: '@jupyter/server-documents:ynotebook',
id: '@jupyter-ai-contrib/server-documents:ynotebook',
description:
"Plugin to register the shared model factory for the content type 'notebook'",
autoStart: true,
Expand Down Expand Up @@ -167,7 +167,7 @@ export const ynotebook: JupyterFrontEndPlugin<void> = {
* was reset. It then clears the content.
*/
export const ychat: JupyterFrontEndPlugin<void> = {
id: '@jupyter/server-documents:ychat',
id: '@jupyter-ai-contrib/server-documents:ychat',
description:
'Plugin to register a custom YChat factory and handle document resets.',
autoStart: true,
Expand Down Expand Up @@ -232,7 +232,7 @@ export const ychat: JupyterFrontEndPlugin<void> = {
* The default collaborative drive provider.
*/
export const logger: JupyterFrontEndPlugin<void> = {
id: '@jupyter/server-documents:rtc-drive-logger',
id: '@jupyter-ai-contrib/server-documents:rtc-drive-logger',
description: 'A logging plugin for debugging purposes.',
autoStart: true,
optional: [ILoggerRegistry, IEditorTracker, INotebookTracker, ITranslator],
Expand Down
Loading
Loading