feat: Modernize and open-source - #18
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prepares notebook-metrics for an initial open-source release by renaming package surfaces (Python + npm), modernizing dependencies/CI, and tightening the core metrics emission/dispatch flows with expanded unit + UI test coverage.
Changes:
- Rename package identifiers from
notebook_link_metrics/@notebook-link/metricstonotebook_metrics/notebook-metricsacross code, config, docs, and CI. - Rework the
JupyterErrormetric to be emitted from notebook execution failures (viaNotebookActions.executed) and harden dispatching by catching collector failures. - Add/expand Jest + Playwright integration coverage, including a test-only server extension to capture backend events.
Reviewed changes
Copilot reviewed 32 out of 40 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates frontend dependency lockfile to newer JupyterLab/related packages. |
| ui-tests/tests/notebook_metrics.spec.ts | Adds Playwright coverage for backend-captured command, execution error, and runtime error emissions. |
| ui-tests/tests/notebook_link_metrics.spec.ts | Removes legacy placeholder UI test for the old package name. |
| ui-tests/README.md | Updates UI test instructions and recommends disabling auto-open of HTML report. |
| ui-tests/playwright.config.js | Improves webServer shutdown handling and adjusts stdout/stderr capture. |
| ui-tests/package.json | Renames UI tests package, bumps Galata/Playwright, and sets Node engine to >=24. |
| ui-tests/metrics-override.yml | Adds a test override to enable/allow the built-in schemas during UI tests. |
| ui-tests/jupyter_server_test_config.py | Configures Jupyter server for UI tests, enabling notebook_metrics + capture extension and setting override env var. |
| ui-tests/event_capture_extension.py | Adds a test-only server extension to capture emitted metrics via a REST API. |
| tsconfig.json | Switches TS moduleResolution to bundler and enables skipLibCheck. |
| src/plugins.ts | Updates plugin IDs/name usage, removes rendermime dependency, merges excluded config sources, and catches collector failures. |
| src/metrics.ts | Renames exported plugin ID constants to notebook-metrics:* and updates imports to type-only where appropriate. |
| src/emissions/jupyter-error.ts | Changes JupyterError emission source from rendermime interception to notebook execution failures. |
| src/tests/notebook_metrics.spec.ts | Adds substantial Jest coverage for emissions + dispatcher filtering/override behavior and collector failure handling. |
| src/tests/notebook_link_metrics.spec.ts | Removes legacy placeholder Jest test for the old package name. |
| schema/dispatcher.json | Updates settings schema title/description to the new project naming. |
| RELEASE.md | Rewrites release documentation for the new package names and Jupyter Releaser-driven flow. |
| README.md | Updates public docs for new naming, install/uninstall, requirements, and test workflows. |
| pyproject.toml | Renames PyPI project to notebook-metrics and updates build artifact paths to notebook_metrics. |
| package.json | Renames npm package, updates license to BSD-3-Clause, bumps JupyterLab deps, and sets Node engine to >=24. |
| ONBOARDING.md | Adds detailed onboarding guide covering mental model, configuration precedence, and integration paths. |
| notebook_metrics/tests/test_pass.py | Adds Python tests for schema registration and backend listener collection behavior. |
| notebook_metrics/tests/init.py | Adds test package marker/docstring for notebook_metrics tests. |
| notebook_metrics/emissions/runtime-error.yml | Adds runtime-error event schema YAML under new package layout. |
| notebook_metrics/emissions/jupyter-error.yml | Updates schema title/description to reflect notebook execution error semantics. |
| notebook_metrics/emissions/current-changed.yml | Adds current-changed event schema YAML under new package layout. |
| notebook_metrics/emissions/command-executed.yml | Adds command-executed event schema YAML under new package layout. |
| notebook_metrics/init.py | Updates declared JS/Python package names and keeps schema registration + override injection. |
| notebook_link_metrics/tests/test_pass.py | Removes obsolete test file under old Python package name. |
| notebook_link_metrics/tests/init.py | Removes obsolete test package marker under old Python package name. |
| LICENSE | Replaces “UNLICENSED” with BSD-3-Clause license text. |
| jupyter-config/server-config/notebook_metrics.json | Updates server extension enablement name to notebook_metrics. |
| jest.config.js | Updates Jest ESM transform allowlist and ignores generated labextension output under notebook_metrics. |
| install.json | Updates installation metadata to new PyPI project name notebook-metrics. |
| conftest.py | Updates pytest Jupyter server extension enablement name to notebook_metrics. |
| .prettierignore | Updates ignore path from notebook_link_metrics to notebook_metrics. |
| .gitignore | Updates ignored labextension/version paths to notebook_metrics and adds junit.xml + .vscode. |
| .github/workflows/build.yml | Updates CI for renamed artifacts/packages and Playwright artifact naming. |
| .copier-answers.yml | Updates copier metadata to new labextension/python package names. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR gets
notebook-metricsmuch closer to first open-source release shape.It renames the package surfaces from
notebook_link_metricstonotebook_metrics/notebook-metrics, cleans up release and onboardingmaterial, and hardens the implementation and tests around the core metrics
flows.
Highlights
notebook_metrics/notebook-metricsand align install metadata, schemas, and server config.release documentation, dependency modernization, and CI updates for build and
integration coverage.
JupyterErrorbackend from rendermime interception to notebookexecution failures while preserving the existing schema URL and payload shape.
dispatch subsequent events.
and Playwright coverage for command, notebook-execution, and runtime-error
emissions.
>=24and moveTypeScript off the deprecated
moduleResolution: "node"setting.