Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to @jupyterlab npm namespace #16

Merged
merged 1 commit into from
Dec 28, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
python -m pip install .[test]

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

- name: Package the extension
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:


jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlab-benchmarks/ui-profiler.*OK"
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/ui-profiler.*OK"
python -m jupyterlab.browser_check --no-chrome-test

integration-tests:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pip uninstall jupyterlab-ui-profiler

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 `@jupyterlab-benchmarks/ui-profiler` within that folder.
folder is located. Then you can remove the symlink named `@jupyterlab/ui-profiler` within that folder.

### Testing the extension

Expand Down
4 changes: 2 additions & 2 deletions jupyterlab_ui_profiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "@jupyterlab-benchmarks/ui-profiler"
"dest": "@jupyterlab/ui-profiler"
}]


Expand All @@ -30,7 +30,7 @@ def _load_jupyter_server_extension(server_app):
# Allow self-profiling in Chrome.
"Document-Policy": "js-profiling"
})
name = "@jupyterlab-benchmarks/ui-profiler"
name = "@jupyterlab/ui-profiler"
server_app.log.info(f"Registered {name} server extension")


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": "@jupyterlab-benchmarks/ui-profiler",
"name": "@jupyterlab/ui-profiler",
"version": "0.1.4",
"description": "JupyterLab extension for profiling UI performance",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ artifacts = ["jupyterlab_ui_profiler/labextension"]
exclude = [".github", "binder"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyterlab_ui_profiler/labextension" = "share/jupyter/labextensions/@jupyterlab-benchmarks/ui-profiler"
"install.json" = "share/jupyter/labextensions/@jupyterlab-benchmarks/ui-profiler/install.json"
"jupyterlab_ui_profiler/labextension" = "share/jupyter/labextensions/@jupyterlab/ui-profiler"
"install.json" = "share/jupyter/labextensions/@jupyterlab/ui-profiler/install.json"
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"
"jupyter-config/nb-config" = "etc/jupyter/jupyter_notebook_config.d"

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/jupyterlab-ui-profiler.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('@jupyterlab-benchmarks/ui-profiler', () => {
describe('@jupyterlab/ui-profiler', () => {
it('should be tested', () => {
expect(1 + 1).toEqual(2);
});
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ namespace CommandIDs {
}

/**
* Initialization data for the @jupyterlab-benchmarks/ui-profiler extension.
* Initialization data for the @jupyterlab/ui-profiler extension.
*/
const plugin: JupyterFrontEndPlugin<void> = {
id: '@jupyterlab-benchmarks/ui-profiler:plugin',
id: '@jupyterlab/ui-profiler:plugin',
autoStart: true,
requires: [IFileBrowserFactory],
optional: [ILauncher, ILayoutRestorer],
Expand Down
3 changes: 2 additions & 1 deletion src/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ export function renderProfile(props: {
typeof timing.resource === 'undefined' && timing.name === 'Profiler';
const isOurProfilerCode =
timing.resource &&
timing.resource.includes('@jupyterlab-benchmarks/ui-profiler');
(timing.resource.includes('@jupyterlab-benchmarks/ui-profiler') ||
timing.resource.includes('@jupyterlab/ui-profiler'));
return !isNativeProfilerCall && !isOurProfilerCode;
}
);
Expand Down
4 changes: 2 additions & 2 deletions ui-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jupyterlab-benchmarks/ui-profiler-ui-tests",
"name": "@jupyterlab/ui-profiler-ui-tests",
"version": "1.0.0",
"description": "JupyterLab @jupyterlab-benchmarks/ui-profiler Integration Tests",
"description": "JupyterLab @jupyterlab/ui-profiler Integration Tests",
"private": true,
"scripts": {
"start": "jupyter lab --config jupyter_server_test_config.py",
Expand Down