Skip to content

Conversation

@AndreyNikitin
Copy link
Collaborator

@AndreyNikitin AndreyNikitin commented Aug 18, 2025

https://bugtracker.codiodev.com/issue/codio-16795/Jupyter-history-of-edits

check jupyter-server-ydoc folder

Summary by CodeRabbit

  • New Features

    • Configurable collaborative storage database path with a new default under .guides; required directory is auto-created.
  • Documentation

    • Updated install examples, API references, and repo links to Codio-branded packages.
    • Added contributor steps for publishing to Test PyPI.
  • Chores

    • Rebranded package names and metadata to Codio across the project.
    • Updated build, release, and development scripts and CI to target Codio variants.
  • Tests

    • Switched test plugins/imports to Codio packages; no functional test changes.

@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Renames the Jupyter collaboration packages and metadata to Codio variants across CI, docs, packaging, scripts, and tests. Adds CustomSQLiteYStore with a default db path and directory creation. Updates the server extension name/registration and defaults to the new store. Aligns metapackages and dependencies with Codio forks.

Changes

Cohort / File(s) Summary
CI workflow updates
.github/workflows/test.yml
Switches all CI/test references from jupyter_server_ydoc to jupyter_server_ydoc_codio, including coverage, grep checks, sdist, and installs.
Documentation updates
README.md, docs/source/conf.py, docs/source/developer/architecture.md, docs/source/index.md, docs/source/developer/python_api.rst
Points docs to Codio org/repo; updates install/package names to Codio variants; architecture and API references renamed to codio modules.
JS package metadata
package.json, packages/collaboration*/package.json, packages/docprovider*/package.json
Updates description/homepage/bugs/repository URLs from jupyterlab to codio; no code changes.
Root packaging and scripts
pyproject.toml, scripts/bump_version.py, scripts/dev_install.py
Replaces dependency and tooling references to Codio subprojects; updates dev install and releaser mappings; metapackage name switched in bump script.
Server extension: codio fork (core code)
projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/__init__.py, .../app.py, .../custom_stores.py, .../pytest_plugin.py, .../stores.py
Renames extension point/module to jupyter_server_ydoc_codio; sets YDocExtension.name accordingly; defaults ystore_class to new CustomSQLiteYStore; adds CustomSQLiteYStore ensuring default .guides dir and db path; aligns pytest plugin imports and extension flag.
Server extension: config & packaging
projects/jupyter-server-ydoc-codio/jupyter-config/jupyter_server_ydoc_codio.json, projects/jupyter-server-ydoc-codio/pyproject.toml, projects/jupyter-server-ydoc-codio/README.md
Enables codio-named server extension; renames project to jupyter-server-ydoc-codio and updates URLs/version path/shared-data key; README title adjusted.
Metapackages: codio variants
projects/jupyter-collaboration-codio/pyproject.toml, projects/jupyter-collaboration-codio/README.md, projects/jupyter-collaboration-ui-codio/pyproject.toml, projects/jupyter-collaboration-ui-codio/README.md, projects/jupyter-docprovider-codio/pyproject.toml
Renames project names to codio variants and swaps dependencies/URLs to Codio repos; readmes updated.
Tests
tests/conftest.py, tests/test_app.py, tests/test_documents.py, tests/test_handlers.py, tests/test_loaders.py
Updates imports/pytest plugin paths to codio modules; adjusts one CLI ystore path in test to codio stores; logic unchanged.
Misc notebooks
projects/jupyter-server-ydoc-codio/Untitled.ipynb, projects/jupyter-server-ydoc-codio/Untitled1.ipynb
Adds example notebooks with simple literal cells; no runtime effect.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant ServerApp
  participant ExtensionLoader as Extension Loader
  participant YExt as YDocExtension (codio)
  participant Store as CustomSQLiteYStore

  User->>ServerApp: Start Jupyter Server
  ServerApp->>ExtensionLoader: Discover/enable jupyter_server_ydoc_codio
  ExtensionLoader->>YExt: Load extension entry points
  YExt->>Store: Initialize ystore_class (default)
  Note right of Store: Ensures ".guides" directory exists<br/>Uses db_path ".guides/.jupyter_ystore.db"
  Store-->>YExt: Ready
  YExt-->>ServerApp: Routes/handlers registered
  ServerApp-->>User: Server ready
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 16795_jupyter_history

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

Binder 👈 Launch a Binder on branch codio/jupyter-collaboration/16795_jupyter_history

@AndreyNikitin
Copy link
Collaborator Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Aug 22, 2025

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 15

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/app.py (1)

69-76: Help text is now inaccurate after switching default YStore.

Default is CustomSQLiteYStore storing in ".guides/.jupyter_ystore.db", but the help mentions the old default and path.

-    help="""The YStore class to use for storing Y updates. Defaults to an SQLiteYStore,
-        which stores Y updates in a '.jupyter_ystore.db' SQLite database in the current
-        directory.""",
+    help="""The YStore class to use for storing Y updates. Defaults to CustomSQLiteYStore,
+        which stores Y updates in a '.guides/.jupyter_ystore.db' SQLite database (creating
+        the '.guides' directory if needed).""",
🧹 Nitpick comments (21)
projects/jupyter-server-ydoc-codio/README.md (1)

1-1: Document notable differences from upstream (default DB path, extension name)

Nice, but the fork’s behavioral differences aren’t called out. If this fork switches the default ystore path or extension id (as hinted in the PR description), add a short “Differences from upstream” section to reduce surprises for operators.

Apply this diff to add a concise section:

 # codio fork of jupyter-server-ydoc

 jupyter-server extension integrating collaborative shared models.

 The collaborative shared models are used for both:
 - real time collaboration, and
 - server-side execution of notebooks
+
+## Differences from upstream
+
+- Server extension id: `jupyter_server_ydoc_codio`.
+- Default YStore backend: `CustomSQLiteYStore`.
+- Default database location: `.guides/.jupyter_ystore.db` (directory is created if missing).
+
+See projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio for details.
projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/stores.py (1)

19-19: Remove or clarify the vague inline comment

The “# change the default state?” note is ambiguous and will rot. Either convert it into an actionable TODO with the concrete decision and a tracker reference, or drop it. The base class in this file should likely stay aligned with upstream; custom defaults belong in your CustomSQLiteYStore subclass.

Apply one of the following:

Option A — make it actionable:

-    # change the default state?
+    # TODO(codio-16795): Keep upstream defaults in this base class. Codio-specific
+    # defaults (e.g., db_path, TTL) are defined in CustomSQLiteYStore.

Option B — remove it:

-    # change the default state?
projects/jupyter-collaboration-ui/README.md (1)

1-1: Title capitalization and upstream link (optional polish)

Consider “Codio fork of Jupyter Collaboration UI” and add a one-liner linking to the upstream README for quick diffing. Not required, but helps readers.

-# Codio fork of jupyter-collaboration-ui
+# Codio fork of Jupyter Collaboration UI
+
+Upstream: https://github.com/jupyterlab/jupyter-collaboration/tree/main/packages/collaboration-ui
scripts/dev_install.py (2)

29-31: Use equality instead of single-item membership for clarity.

if py_package in ["jupyter-server-ydoc-codio"]: is equivalent to equality. Switching to == is clearer and avoids constructing a list per iteration.

-        if py_package in ["jupyter-server-ydoc-codio"]:
+        if py_package == "jupyter-server-ydoc-codio":
             execute(f"jupyter server extension enable {real_package_name}")

25-26: Prefer invoking pip via the current interpreter.

Use python -m pip to avoid environment mismatches when the script runs under a different Python than the active pip.

-        execute(f"pip uninstall {real_package_name} -y")
-        execute(f"pip install -e {python_package_prefix}/{py_package}[test]")
+        execute(f"python -m pip uninstall {real_package_name} -y")
+        execute(f"python -m pip install -e {python_package_prefix}/{py_package}[test]")
docs/source/index.md (1)

19-26: Install commands updated to codio variant—looks good; consider recommending python -m pip.

The mamba command is fine. For pip, suggesting python -m pip install ... reduces environment ambiguity.

-pip install jupyter-collaboration-codio
+python -m pip install jupyter-collaboration-codio
docs/source/developer/architecture.md (1)

7-13: Make the rename explicit in the heading and tighten wording

Present the rename inline in the package bullet to avoid a dangling line and make scanning easier.

Apply:

-- **jupyter_server_ydoc**:
-  renamed to jupyter_server_ydoc_codio
-  A Jupyter Server extension providing core collaborative models. It manages YDocument data structures tied to notebook files and exposes WebSocket endpoints for real-time updates. It integrates CRDTs into Jupyter’s file management and kernel system.
+- **jupyter_server_ydoc_codio** (renamed from `jupyter_server_ydoc`):
+  A Jupyter Server extension providing core collaborative models. It manages YDocument data structures tied to notebook files and exposes WebSocket endpoints for real-time updates. It integrates CRDTs into Jupyter’s file management and kernel system.

Follow-up: If the Codio fork changes the default storage (CustomSQLiteYStore, new db_dir/db_path traits), consider briefly noting that here or linking to the configuration section so readers don’t assume upstream defaults. I can help draft that snippet.

README.md (2)

35-38: Clarify the section title and target (TestPyPI)

Small wording tweak improves clarity.

-## Codio
-
-Publish jupyter-server-ydoc-codio manually
+## Codio: Publishing jupyter-server-ydoc-codio (TestPyPI)
+
+Manual publish of `jupyter-server-ydoc-codio` to TestPyPI

47-50: Prevent stale artifacts before building

Clear the dist directory to avoid uploading old files.

 to build

-python -m build
+rm -rf dist/*
+python -m build

.github/workflows/test.yml (1)

137-137: Grep assertion is fine; consider a more robust match

The pattern is case-insensitive and simple. If this ever flakes on noisy output, matching the whole line can reduce false positives.

-jupyter server extension list 2>&1 | grep -ie "jupyter_server_ydoc_codio.*OK"
+jupyter server extension list 2>&1 | grep -Eie '^\s*jupyter_server_ydoc_codio\b.*OK\b'
packages/docprovider/package.json (1)

24-28: Optional: include README in npm package tarball for better discoverability.

You already ship style/schema assets. Including README.md can help downstream consumers.

   "files": [
     "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
     "schema/*.json",
     "style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
     "style/index.js"
+    ,"README.md"
   ],
packages/collaboration-extension/package.json (1)

56-72: Dependency ranges unchanged; keep an eye on JupyterLab 4.4 compatibility.

No action required now. If you later rebrand package scopes, verify sharedPackages config and any hard-coded @jupyter paths across the mono-repo.

packages/collaboration/package.json (1)

32-40: Minor: add a test script placeholder to encourage local runs.

Not required, but adding "test": "jest" (or your chosen runner) helps uniformity across packages.

   "scripts": {
     "build": "tsc -b",
     "build:prod": "jlpm run build",
     "clean": "rimraf lib tsconfig.tsbuildinfo",
     "clean:lib": "jlpm run clean:all",
     "clean:all": "rimraf lib tsconfig.tsbuildinfo node_modules",
     "install:extension": "jlpm run build",
-    "watch": "tsc -b --watch"
+    "watch": "tsc -b --watch",
+    "test": "jest"
   },
projects/jupyter-server-ydoc-codio/pyproject.toml (1)

30-38: Constrain the pycrdt dependency to a compatible version range

We confirmed that in projects/jupyter-server-ydoc-codio/pyproject.toml the pycrdt requirement is currently unpinned, while all other CRDT-related packages (e.g. pycrdt-websocket>=0.15.0,<0.16.0) enforce tight version bounds. To prevent accidental major‐version upgrades from breaking the collaboration layer, please update the dependency to a bounded range that aligns with your tested environment.

• File: projects/jupyter-server-ydoc-codio/pyproject.toml
– Line 33: "pycrdt" is unpinned.

Suggested change:

-    "pycrdt",
+    "pycrdt>=0.10,<1.0",

Please verify that this range includes the version used by your CI or lock file to avoid resolver conflicts.

scripts/bump_version.py (2)

112-116: Normalize requirement names to the canonical hyphenated form in the metapackage.

The generated keys use underscores (directory names), which pip normalizes, but using the distribution’s canonical/hyphenated name improves readability and avoids confusion.

-    for key in sorted(project_pins):
-        if key != metapackage.replace("-", "_"):
-            next_major = f"{parse_version(project_pins[key]).major + 1}"
-            dependencies.add_line(key + ">=" + project_pins[key] + ",<" + next_major)
+    for key in sorted(project_pins):
+        if key != metapackage.replace("-", "_"):
+            canonical = key.replace("_", "-")
+            next_major = f"{parse_version(project_pins[key]).major + 1}"
+            dependencies.add_line(f"{canonical}>={project_pins[key]},<{next_major}")

9-11: Optional: Prefer 'packaging' over 'pkg_resources' for version/requirement parsing.

packaging is lighter-weight and recommended; pkg_resources import is slower. Non-blocking if this script is rarely run.

-from pkg_resources import parse_version, Requirement
+from packaging.version import Version as parse_version
+from packaging.requirements import Requirement
projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/app.py (3)

107-114: Name/type mismatch: ystore_class variable holds a factory (partial), not a class.

Minor readability/type issue: you annotate it as type[BaseYStore] then assign a partial; later you pass both the factory (to WS handler) and the raw class (Timeline handler). Rename to ystore_factory locally to avoid confusion and keep types aligned.

-        # Set configurable parameters to YStore class
-        ystore_class: type[BaseYStore] = partial(self.ystore_class, config=self.config)  # type:ignore[assignment]
+        # Create a YStore factory bound to this extension's config
+        ystore_factory = partial(self.ystore_class, config=self.config)
@@
-            ystore_class=ystore_class,
+            ystore_class=ystore_factory,
@@
-                        "ystore_class": ystore_class,
+                        "ystore_class": ystore_factory,

Optional follow-up: If TimelineHandler expects a class and not a factory, keep passing self.ystore_class there; otherwise pass the same factory for consistency.

Also applies to: 141-145


217-226: Make shutdown robust: cancel pending tasks on timeout.

asyncio.wait with a timeout can leave tasks running. Use wait_for + gather and cancel on timeout to avoid dangling tasks during server shutdown.

-    async def stop_extension(self):
-        # Cancel tasks and clean up
-        await asyncio.wait(
-            [
-                asyncio.create_task(self.ywebsocket_server.clean()),
-                asyncio.create_task(self.file_loaders.clear()),
-            ],
-            timeout=3,
-        )
+    async def stop_extension(self):
+        # Cancel tasks and clean up
+        tasks = [
+            asyncio.create_task(self.ywebsocket_server.clean()),
+            asyncio.create_task(self.file_loaders.clear()),
+        ]
+        try:
+            await asyncio.wait_for(asyncio.gather(*tasks, return_exceptions=True), timeout=3)
+        except asyncio.TimeoutError:
+            for t in tasks:
+                t.cancel()
+            # Optionally log cancellation here

194-198: Dead branch: redundant else assigning room_id to itself.

Harmless but noisy; consider removing for clarity.

-        elif path is not None or content_type is not None or file_format is not None:
-            raise ValueError(error_msg)
-        else:
-            room_id = room_id
+        elif path is not None or content_type is not None or file_format is not None:
+            raise ValueError(error_msg)
projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/custom_stores.py (1)

9-16: Make db_dir configurable or derive it from db_path to avoid divergence.

db_dir is a plain class attr while db_path is a configurable trait. If users override db_path, db_dir becomes misleading. Either drop db_dir entirely and derive directories from db_path, or promote db_dir to a configurable Unicode trait and compute db_path from it.

I can send a follow-up patch to compute db_path from db_dir via a default factory if you prefer that shape.

projects/jupyter-collaboration/pyproject.toml (1)

35-35: Use canonical hyphenated distribution name for consistency.

PEP 503 normalizes hyphens/underscores, so this works, but the root pyproject uses “jupyter-server-ydoc-codio”. Consider aligning to hyphens for consistency across the repo.

-    "jupyter_server_ydoc_codio>=2.1.0,<3",
+    "jupyter-server-ydoc-codio>=2.1.0,<3",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 499f8ff and 181b0b0.

📒 Files selected for processing (29)
  • .github/workflows/test.yml (5 hunks)
  • README.md (1 hunks)
  • docs/source/conf.py (1 hunks)
  • docs/source/developer/architecture.md (1 hunks)
  • docs/source/index.md (1 hunks)
  • packages/collaboration-extension/package.json (1 hunks)
  • packages/collaboration/package.json (1 hunks)
  • packages/collaborative-drive/package.json (1 hunks)
  • packages/docprovider-extension/package.json (1 hunks)
  • packages/docprovider/package.json (1 hunks)
  • projects/jupyter-collaboration-ui/README.md (1 hunks)
  • projects/jupyter-collaboration-ui/pyproject.toml (1 hunks)
  • projects/jupyter-collaboration/README.md (1 hunks)
  • projects/jupyter-collaboration/pyproject.toml (1 hunks)
  • projects/jupyter-docprovider/pyproject.toml (1 hunks)
  • projects/jupyter-server-ydoc-codio/README.md (1 hunks)
  • projects/jupyter-server-ydoc-codio/Untitled.ipynb (1 hunks)
  • projects/jupyter-server-ydoc-codio/Untitled1.ipynb (1 hunks)
  • projects/jupyter-server-ydoc-codio/jupyter-config/jupyter_server_ydoc_codio.json (1 hunks)
  • projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/__init__.py (1 hunks)
  • projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/app.py (3 hunks)
  • projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/custom_stores.py (1 hunks)
  • projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/pytest_plugin.py (2 hunks)
  • projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/stores.py (1 hunks)
  • projects/jupyter-server-ydoc-codio/pyproject.toml (3 hunks)
  • pyproject.toml (4 hunks)
  • scripts/bump_version.py (1 hunks)
  • scripts/dev_install.py (2 hunks)
  • tests/conftest.py (1 hunks)
🧰 Additional context used
🪛 Flake8 (7.2.0)
projects/jupyter-server-ydoc-codio/Untitled.ipynb

[error] 1-1: undefined name 'qwef'

(F821)


[error] 1-1: undefined name 'qwef1245'

(F821)

projects/jupyter-server-ydoc-codio/Untitled1.ipynb

[error] 1-1: undefined name 'qwef'

(F821)


[error] 1-1: undefined name 'asfd'

(F821)


[error] 1-1: undefined name 'asdfth'

(F821)


[error] 1-1: undefined name 'nlkjn'

(F821)


[error] 1-1: undefined name 'uitro'

(F821)

🪛 Ruff (0.12.2)
projects/jupyter-server-ydoc-codio/Untitled.ipynb

2-2: Undefined name qwef

(F821)


5-5: Undefined name qwef1245

(F821)

projects/jupyter-server-ydoc-codio/Untitled1.ipynb

2-2: Undefined name qwef

(F821)


8-8: Undefined name asfd

(F821)


11-11: Undefined name asdfth

(F821)


17-17: Undefined name nlkjn

(F821)


20-20: Undefined name uitro

(F821)

🔇 Additional comments (25)
projects/jupyter-collaboration/README.md (1)

6-6: Meta-package links verified and consistent

The jupyter-server-ydoc-codio entry and all other items in the meta-package list correspond to existing directories with README.md files under projects/. A parallel “codio” variant isn’t required for jupyter-docprovider, since no such variant exists.

Optional nitpick: convert the list items into markdown links for quicker navigation, for example:

packages/collaborative-drive/package.json (1)

4-12: Monorepo package metadata: add repository.directory & confirm publish intent

We’ve verified that every package in this monorepo—including packages/collaborative-drive—uses an @jupyter scope and is publicly publishable (private: false, publishConfig.access: "public"). To ensure seamless npm workflows and avoid unintended publishes, please:

• In packages/collaborative-drive/package.json, add the directory field under repository so tools like npm and yarn workspaces resolve correctly:

  "repository": {
    "type": "git",
    "url": "https://github.com/codio/jupyter-collaboration.git",
+   "directory": "packages/collaborative-drive"
  },

• Confirm whether this forked package is meant for public npm consumption under the @jupyter scope:

  • If not intended for npm, mark it private:
    - "publishConfig": {
    -   "access": "public"
    - },
    + "private": true,
  • If intended for public release, consider using a Codio-specific scope (e.g. @codio/collaborative-drive) to prevent confusion with the upstream JupyterLab namespace.

Let me know which publishing strategy you’d like, and we can merge accordingly.

scripts/dev_install.py (1)

18-19: Verify Jupyter server extension registration

The jupyter-server-ydoc-codio entry is correct and its directory exists at projects/jupyter-server-ydoc-codio/. To ensure the package exposes the proper server extension entry point, please install it in editable mode and confirm it’s discoverable:

pip install -e projects/jupyter-server-ydoc-codio
jupyter server extension list | grep -E 'jupyter_server_ydoc_codio'

• File: scripts/dev_install.py, lines 18–19
LGTM once the extension appears in the list.

docs/source/index.md (1)

14-14: Verify the Python package name in prose matches the actual import/distribution.

Text references jupyter_collaboration_codio. Ensure the published PyPI/conda names and the Python import/package names are consistent across docs and code to prevent user confusion.

I can run a web check for the published names or adjust the copy once the naming is finalized.

docs/source/developer/architecture.md (1)

12-12: Good reference update

The meta-package reference now points to the Codio backend. Looks consistent with the rename.

projects/jupyter-server-ydoc-codio/jupyter-config/jupyter_server_ydoc_codio.json (1)

4-4: Extension configuration packaged successfully

Verified that jupyter_server_ydoc_codio.json is included in the sdist under jupyter-config/jupyter_server_ydoc_codio.json (jupyter_server_ydoc_codio-2.1.0.tar.gz). No further action needed.

.github/workflows/test.yml (3)

115-116: Coverage target rename is correct

Switching --cov to jupyter_server_ydoc_codio aligns with the new module namespace.


127-127: Windows pytest invocation updated correctly

The coverage target and ImportWarning suppression are consistent with the Linux step.


245-245: OK: extension check for the new module name

This check correctly validates that the Codio forked server extension is enabled.

packages/docprovider-extension/package.json (1)

36-38: Sanity check shared outputDir and clean paths.

Unchanged but related: outputDir/clean paths reference projects/jupyter-docprovider/… which matches this package. If any project directory was renamed in the fork, make sure these paths still exist in CI.

Also applies to: 90-130

packages/docprovider/package.json (1)

4-5: Codio fork metadata applied consistently — OK.

description, homepage, bugs.url, and repository.url updated to Codio. No code changes.

Also applies to: 7-7, 11-11

projects/jupyter-collaboration-ui/pyproject.toml (1)

38-42: Repository/Source/Issues moved to Codio — LGTM.

URLs now point to codio/jupyter-collaboration.

Two follow-ups to confirm intent:

  • Documentation and Changelog still reference upstream ReadTheDocs. If you plan a Codio-hosted docs site, update these too; otherwise keep as-is.
  • If the package name or labextension scope changes in the future, remember to align the wheel shared-data paths pointing to @jupyter/collaboration-extension.
packages/collaboration-extension/package.json (2)

4-4: Codio fork metadata applied — OK.

description, homepage, bugs.url, repository.url updated.

Also applies to: 10-10, 12-12, 16-16


48-49: Confirm labextension outputDir and clean path alignment with UI project.

The outputDir and clean:labextension target projects/jupyter-collaboration-ui/… Ensure CI/workflows still collect artifacts from this path post-fork.

Also applies to: 92-92

packages/collaboration/package.json (1)

4-5: Codio fork metadata applied — OK.

description, homepage, bugs.url, repository.url updated.

Also applies to: 7-7, 11-11

projects/jupyter-server-ydoc-codio/pyproject.toml (2)

62-63: Version file verified

The file projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/_version.py exists and contains a properly formatted __version__ = "2.1.0" assignment. No further action is required.


68-69: No changes required: the JSON is correctly mapped and contains the expected extension entry.

Verification results:

  • The file projects/jupyter-server-ydoc-codio/jupyter-config/jupyter_server_ydoc_codio.json exists and matches the key in pyproject.toml.
  • Its contents include the "jpserver_extensions": { "jupyter_server_ydoc_codio": true } entry under ServerApp, so the server extension will be enabled as intended.

The original suggestion to point at an in-package JSON is based on an incorrect assumption about where the config lives—no refactoring is needed here.

Likely an incorrect or invalid review comment.

projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/__init__.py (1)

10-12: LGTM: extension point updated to codio module.

The extension identifier matches the codio package and app class.

tests/conftest.py (1)

7-7: Ensure pytest plugin import path is resolvable

pytest_plugins now includes jupyter_server_ydoc_codio.pytest_plugin. We’ve verified that:

  • The plugin lives at
    projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/pytest_plugin.py
    and its parent directory contains an __init__.py, so the module path is valid.

However, for pytest to actually discover and import it, you must ensure the subproject is on PYTHONPATH. Please verify one of the following in your test setup:

  • Install the subproject in editable mode before running pytest:
    pip install -e projects/jupyter-server-ydoc-codio
  • Add the subproject root to pytest’s search path, for example by creating or updating a pytest.ini at the repo root:
    [pytest]
    python_paths =
        projects/jupyter-server-ydoc-codio
projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/pytest_plugin.py (1)

13-15: Codio fork imports look correct.

Imports now target the codio variant. API surface (FileLoader, DocumentRoom, SQLiteYStore) appears unchanged; no functional differences here.

pyproject.toml (4)

13-13: Dependency rename to codio variant — OK.


30-30: Test extra updated to codio variant — OK.


49-49: Build package path updated — OK.


65-65: Jupyter Releaser mapping updated — OK.

projects/jupyter-collaboration/pyproject.toml (1)

41-41: URLs updated to codio org — OK.

Also applies to: 44-45

@AndreyNikitin
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Aug 26, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
README.md (1)

35-62: Harden the Codio publish steps: add language tags, safer installs, metadata check, and dependency resolution

  • Add language to fenced blocks (fixes MD040).
  • Use module-invocation and upgrade for build tools.
  • Recommend env vars and run twine check before upload.
  • Use PyPI as a secondary index when installing from TestPyPI.

Apply this diff:

@@
-## Codio
+## Codio
@@
-Publish jupyter-server-ydoc-codio manually
+Publish jupyter-server-ydoc-codio manually
@@
-```
-pip install twine build
-```
+```bash
+python -m pip install --upgrade build twine
+```
@@
-```
+```bash
 cd projects/jupyter-server-ydoc-codio
-```
+```
@@
-bump version at `projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/_version.py`
+bump version at `projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/_version.py`
@@
-to build
-```
-python -m build
-```
+to build
+```bash
+python -m build
+```
@@
-to upload to test pypi. need to get API key from pypi site.
-```
-twine upload --repository testpypi dist/* --verbose
-```
+to upload to TestPyPI. Set credentials via environment variables and validate metadata first.
+```bash
+export TWINE_USERNAME="__token__"
+export TWINE_PASSWORD="pypi-<your-token>"
+python -m twine check dist/*
+python -m twine upload --repository testpypi dist/* --verbose
+```
@@
-to install from testpypi
-```
-python -m pip install -i https://test.pypi.org/simple/ jupyter-server-ydoc-codio
-```
+to install from TestPyPI (resolve most deps from PyPI)
+```bash
+python -m pip install -i https://test.pypi.org/simple/ \
+  --extra-index-url https://pypi.org/simple \
+  jupyter-server-ydoc-codio
+```
🧹 Nitpick comments (5)
tests/test_loaders.py (2)

14-26: Avoid shadowing Python built-ins id and map in tests

Using identifiers that shadow built-ins can confuse readers and tooling. Recommend renaming id → file_id and map → loader_map.

Apply this diff:

@@
-    id = "file-4567"
+    file_id = "file-4567"
     path = "myfile.txt"
     paths = {}
-    paths[id] = path
+    paths[file_id] = path
@@
-    loader = FileLoader(
-        id,
+    loader = FileLoader(
+        file_id,
         FakeFileIDManager(paths),
         cm,
         poll_interval=0.1,
     )
@@
-    id = "file-4567"
+    file_id = "file-4567"
     path = "myfile.txt"
     paths = {}
-    paths[id] = path
+    paths[file_id] = path
@@
-    loader = FileLoader(
-        id,
+    loader = FileLoader(
+        file_id,
         FakeFileIDManager(paths),
         cm,
     )
@@
-    id = "file-4567"
+    file_id = "file-4567"
     path = "myfile.txt"
     paths = {}
-    paths[id] = path
+    paths[file_id] = path
@@
-    map = FileLoaderMapping(
+    loader_map = FileLoaderMapping(
         {"contents_manager": cm, "file_id_manager": FakeFileIDManager(paths)},
         file_poll_interval=1.0,
     )
 
-    loader = map[id]
+    loader = loader_map[file_id]
@@
-    await map.clear()
+    await loader_map.clear()

Also applies to: 47-58, 78-92, 86-93


36-44: Reduce timing flakiness in watcher tests

The sleeps (0.15s) vs poll_interval (0.1s) margins are tight and may be flaky on CI. Prefer awaiting a condition with a bounded timeout.

Example change (minimal pattern):

-    await asyncio.sleep(0.15)
+    # wait up to 2s for the trigger to flip
+    async def wait_until(cond, timeout=2.0, step=0.05):
+        deadline = asyncio.get_event_loop().time() + timeout
+        while not cond() and asyncio.get_event_loop().time() < deadline:
+            await asyncio.sleep(step)
+    await wait_until(lambda: triggered)

Also applies to: 66-76, 100-109

projects/jupyter-collaboration-ui-codio/pyproject.toml (1)

9-9: Name change looks fine; verify import-package vs dist-name strategy to avoid collisions.

The project dist name is now "jupyter-collaboration-ui-codio", while the module path (see [tool.hatch.version].path) still points to "jupyter_collaboration_ui". If the upstream package can be installed alongside this fork, both would ship the same import package and collide at runtime. If mutual exclusivity is intended, please document it; otherwise, consider renaming the Python package (module dir) to jupyter_collaboration_ui_codio and updating the version path accordingly.

Would you like me to scan the repo to list all imports and entry points that would need updates if you rename the module directory?

projects/jupyter-docprovider-codio/pyproject.toml (1)

9-9: Dist name changed; confirm Python import package collisions are acceptable or rename module.

Similar to the UI package, the dist name is "jupyter-docprovider-codio" while the module path is "jupyter_docprovider". If upstream can co-exist, this will shadow/override imports. If that’s undesired, consider renaming the module dir to jupyter_docprovider_codio and adjusting any imports/entry points accordingly; otherwise, document that the Codio fork replaces upstream.

projects/jupyter-collaboration-codio/pyproject.toml (1)

33-35: Dependency names normalize fine; prefer hyphenated names for clarity and tooling compatibility.

Using underscores works due to PEP 503 normalization, but most tooling/docs use hyphens for distribution names. Optional, but helps avoid confusion and grep mismatches.

Apply this minimal diff if you prefer hyphenated names:

-    "jupyter_collaboration_ui_codio>=2.1.0,<3",
-    "jupyter_docprovider_codio>=2.1.0,<3",
-    "jupyter_server_ydoc_codio>=2.1.0,<3",
+    "jupyter-collaboration-ui-codio>=2.1.0,<3",
+    "jupyter-docprovider-codio>=2.1.0,<3",
+    "jupyter-server-ydoc-codio>=2.1.0,<3",

Also, please verify these exact dists and versions are produced by this repo before releasing the metapackage.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 181b0b0 and 2297d5a.

📒 Files selected for processing (14)
  • README.md (1 hunks)
  • docs/source/conf.py (2 hunks)
  • docs/source/developer/python_api.rst (1 hunks)
  • package.json (1 hunks)
  • projects/jupyter-collaboration-codio/README.md (1 hunks)
  • projects/jupyter-collaboration-codio/pyproject.toml (2 hunks)
  • projects/jupyter-collaboration-ui-codio/README.md (1 hunks)
  • projects/jupyter-collaboration-ui-codio/pyproject.toml (2 hunks)
  • projects/jupyter-docprovider-codio/pyproject.toml (2 hunks)
  • projects/jupyter-server-ydoc-codio/pyproject.toml (3 hunks)
  • tests/test_app.py (2 hunks)
  • tests/test_documents.py (1 hunks)
  • tests/test_handlers.py (1 hunks)
  • tests/test_loaders.py (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • projects/jupyter-collaboration-ui-codio/README.md
  • docs/source/developer/python_api.rst
  • projects/jupyter-collaboration-codio/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/source/conf.py
  • projects/jupyter-server-ydoc-codio/pyproject.toml
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

39-39: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


43-43: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


50-50: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


55-55: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


60-60: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🪛 GitHub Actions: Tests
README.md

[error] 1-1: pre-commit end-of-file-fixer failed. README.md was modified by the hook.

🔇 Additional comments (10)
tests/test_app.py (1)

59-60: Module path for TempFileYStore is valid and importable
I’ve verified that projects/jupyter-server-ydoc-codio/jupyter_server_ydoc_codio/stores.py defines class TempFileYStore and that tests import it directly via

from jupyter_server_ydoc_codio.stores import TempFileYStore

The dynamic import path jupyter_server_ydoc_codio.stores.TempFileYStore therefore resolves correctly in the codebase and should remain stable across editable installs, wheels, and sdists. No further changes are needed here.

tests/test_loaders.py (1)

9-11: Import path switch to codio loaders and fakes LGTM

The imports align with the codio variant. No functional changes here.

tests/test_handlers.py (1)

12-12: Import path switch to codio Websocket is consistent

This aligns with the rest of the test suite. No further changes needed in this file.

README.md (1)

35-62: Ensure README.md ends with a newline and your working directory is clean, then re-run CI

Please manually verify the following before re-running the pipeline:

• Verify the file ends with a trailing newline. For example:

tail -n1 README.md

should print a blank line (no non-whitespace characters).

• Confirm there are no unstaged changes to README.md:

git diff -- README.md

should produce no output.

• Ignore or add these untracked files to .gitignore if they’re not intended for commit:
• biome.json
• coderabbit.markdownlint-cli2.jsonc
• markdownlint-cli2-results.json

Once README.md ends with a newline and git diff is clean, re-run the CI pipeline.

projects/jupyter-collaboration-ui-codio/pyproject.toml (1)

38-41: URLs updated to Codio — LGTM.

Repository/Source/Issues now point to codio/jupyter-collaboration and look consistent with the fork.

package.json (2)

5-5: Description updated — LGTM.

Clear signal this is a Codio fork.


11-18: Repo/Homepage/Bugs switched to Codio — LGTM; confirm dev workflow scripts still work.

Since the root points to Codio URLs, please confirm scripts/dev_install.py (referenced by the dev script) still installs the Codio-named Python packages and extensions correctly (e.g., metapackage jupyter-collaboration-codio and its deps).

projects/jupyter-docprovider-codio/pyproject.toml (1)

38-41: URLs updated to Codio — LGTM.

Repository/Source/Issues now consistently reference codio/jupyter-collaboration.

projects/jupyter-collaboration-codio/pyproject.toml (2)

9-9: Metapackage rename — LGTM.

The metapackage clearly separates the Codio track from upstream.


41-45: Codio URLs in metapackage — LGTM; confirm docs URL alignment.

Repo/Source/Issues point to Codio; Documentation/Changelog still point to upstream ReadTheDocs, which may be intentional. If Codio plans separate docs, update here in a follow-up.

destitutus
destitutus previously approved these changes Oct 15, 2025
destitutus
destitutus previously approved these changes Nov 17, 2025
destitutus
destitutus previously approved these changes Nov 27, 2025
@AndreyNikitin AndreyNikitin merged commit 5c82bb4 into main Dec 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants