Skip to content

Commit

Permalink
Merge branch 'jupyterlab:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
FoSuCloud authored May 4, 2024
2 parents 464f0ec + 59acb33 commit 2274edb
Show file tree
Hide file tree
Showing 44 changed files with 102 additions and 37 deletions.
1 change: 1 addition & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ jobs:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
2 changes: 1 addition & 1 deletion .github/workflows/license-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Fix License Header
# pin to include https://github.com/apache/skywalking-eyes/pull/168
uses: apache/skywalking-eyes/header@97538682f556b56cc7422ece660d8d7e6c4fb013
uses: apache/skywalking-eyes/header@cd7b195c51fd3d6ad52afceb760719ddc6b3ee91
with:
mode: fix

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reject-staging-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Get modified files in the staging directory
id: modified-files-in-staging
uses: tj-actions/changed-files@v44.0.0
uses: tj-actions/changed-files@v44.3.0
with:
# only checks for modified files in this directory
files: jupyterlab/staging
Expand Down
32 changes: 32 additions & 0 deletions docs/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,38 @@ Usage with JupyterHub
Read the details on our :ref:`JupyterLab on JupyterHub documentation page <jupyterhub>`.


Usage with Jupyverse
--------------------

`Jupyverse <https://github.com/jupyter-server/jupyverse/>`__ is a next-generation Jupyter server based on
`FastAPI <https://fastapi.tiangolo.com/>`__. It can be used instead of
`jupyter-server <https://github.com/jupyter-server/jupyter_server/>`__, the Jupyter server installed by default with JupyterLab.
Note that ``jupyter-server`` extensions won't work with ``jupyverse`` (for which there might be equivalent plugins).

You can install ``jupyverse`` with ``pip``:

.. code:: bash
pip install jupyverse[auth, jupyterlab]
or with ``conda``:

.. code:: bash
conda install -c conda-forge jupyverse fps-auth fps-jupyterlab
or with ``mamba``:

.. code:: bash
mamba install -c conda-forge jupyverse fps-auth fps-jupyterlab
And run it with:

.. code:: bash
jupyverse
Supported browsers
------------------

Expand Down
2 changes: 1 addition & 1 deletion galata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@jupyterlab/services": "^7.2.0-rc.0",
"@jupyterlab/settingregistry": "^4.2.0-rc.0",
"@lumino/coreutils": "^2.1.2",
"@playwright/test": "^1.32.2",
"@playwright/test": "^1.43.1",
"@stdlib/stats": "~0.0.13",
"fs-extra": "^10.1.0",
"json5": "^2.2.3",
Expand Down
15 changes: 10 additions & 5 deletions galata/src/helpers/notebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1126,11 +1126,16 @@ export class NotebookHelper {
const gutter = gutters.nth(line);
for (let i = 0; i < 3; i++) {
await gutter.click({ position: { x: 5, y: 5 } });
await Utils.waitForCondition(
async () => ((await gutter.textContent())?.length ?? 0) > 0,
500
);
if ((await gutter.textContent())?.length) {
let break_ = true;
try {
await Utils.waitForCondition(
async () => ((await gutter.textContent())?.length ?? 0) > 0,
1000
);
} catch (reason) {
break_ = false;
}
if (break_) {
break;
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion galata/test/documentation/workspaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { positionMouseOver } from './utils';

test.use({
viewport: { height: 720, width: 1280 },
mockState: false
mockState: false,
tmpPath: 'workspaces-sidebar'
});

test.describe('Workspaces sidebar', () => {
Expand Down
6 changes: 4 additions & 2 deletions galata/test/galata/fixture.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ test.describe('terminals', () => {

test.describe('tmpPath', () => {
test('should return an unique test folder', ({ tmpPath }) => {
expect(tmpPath).toEqual(
'test-galata-fixture-tmpPath-should-return-an-unique-test-folder-galata'
// Use regex as Playwright is preventing the unique test name to be too long
// by replacing the name center part with a hash of 5 characters.
expect(tmpPath).toMatch(
/test-galata-fixture-tmpPat-\w{5}-eturn-an-unique-test-folder-galata/
);
});
});
4 changes: 4 additions & 0 deletions galata/test/jupyterlab/debugger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ test.describe('Debugger Tests', () => {
test('Start debug session', async ({ page, tmpPath }) => {
await openNotebook(page, tmpPath, 'code_notebook.ipynb');

await page.getByText('Python 3 (ipykernel) | Idle').waitFor();
await page.debugger.switchOn();
await page.waitForCondition(() => page.debugger.isOpen());

Expand Down Expand Up @@ -80,6 +81,7 @@ test.describe('Debugger Tests', () => {

await openNotebook(page, tmpPath, notebookName);

await page.getByText('Python 3 (ipykernel) | Idle').waitFor();
await page.debugger.switchOn();
await page.waitForCondition(() => page.debugger.isOpen());

Expand Down Expand Up @@ -136,6 +138,8 @@ test.describe('Debugger Tests', () => {
await select.selectOption(await option.textContent());
await page.click('div.jp-Dialog-content >> button:has-text("Select")');

await page.getByText('Python 3 (ipykernel) | Idle').waitFor();

// activate the script tab
await page.click('.jp-FileEditor');
await page.debugger.switchOn();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions galata/test/jupyterlab/windowed-notebook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,20 @@ test('should update window height on resize', async ({ page, tmpPath }) => {

test('should not update height when hiding', async ({ page, tmpPath }) => {
await page.notebook.openByPath(`${tmpPath}/${fileName}`);
const notebook = await page.notebook.getNotebookInPanelLocator();
let initialHeight = 0;
let previousHeight = 0;
let counter = 0;

// Wait to ensure the rendering logic is stable.
await page.waitForTimeout(200);
do {
previousHeight = initialHeight;
await page.waitForTimeout(200);

const notebook = await page.notebook.getNotebookInPanelLocator();
const initialHeight = await getInnerHeight(notebook!);
initialHeight = await getInnerHeight(notebook!);
} while (previousHeight !== initialHeight && counter++ < 10);

expect(initialHeight).toBeGreaterThan(0);
expect.soft(initialHeight).toBeGreaterThan(0);

// Add a new launcher covering the notebook.
await page.menu.clickMenuItem('File>New Launcher');
Expand Down
2 changes: 1 addition & 1 deletion galata/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"rootDir": "src",
"module": "commonjs",
"types": ["node"],
"lib": ["DOM", "DOM.iterable", "es2019.array"]
"lib": ["DOM", "DOM.iterable", "es2019.array", "esnext"]
},
"include": ["src/**/*"],
"references": [
Expand Down
10 changes: 7 additions & 3 deletions packages/ui-components/src/components/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,9 @@ export function ToolbarButtonComponent(
}
};

const title = getTooltip();
const disabled = props.enabled === false;

return (
<Button
appearance="stealth"
Expand All @@ -851,14 +854,15 @@ export function ToolbarButtonComponent(
? props.className + ' jp-ToolbarButtonComponent'
: 'jp-ToolbarButtonComponent'
}
aria-disabled={disabled}
aria-label={props.label || title}
aria-pressed={props.pressed}
aria-disabled={props.enabled === false}
{...props.dataset}
disabled={props.enabled === false}
disabled={disabled}
onClick={handleClick}
onMouseDown={handleMouseDown}
onKeyDown={handleKeyDown}
title={getTooltip()}
title={title}
minimal
>
{(props.icon || props.iconClass) && (
Expand Down
46 changes: 28 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3494,7 +3494,7 @@ __metadata:
"@jupyterlab/services": ^7.2.0-rc.0
"@jupyterlab/settingregistry": ^4.2.0-rc.0
"@lumino/coreutils": ^2.1.2
"@playwright/test": ^1.32.2
"@playwright/test": ^1.43.1
"@stdlib/stats": ~0.0.13
fs-extra: ^10.1.0
json5: ^2.2.3
Expand Down Expand Up @@ -5863,19 +5863,14 @@ __metadata:
languageName: node
linkType: hard

"@playwright/test@npm:^1.32.2":
version: 1.32.2
resolution: "@playwright/test@npm:1.32.2"
"@playwright/test@npm:^1.43.1":
version: 1.43.1
resolution: "@playwright/test@npm:1.43.1"
dependencies:
"@types/node": "*"
fsevents: 2.3.2
playwright-core: 1.32.2
dependenciesMeta:
fsevents:
optional: true
playwright: 1.43.1
bin:
playwright: cli.js
checksum: 3e4a9286c2a63c12b55368c3b94e8817fee15146e09e5be549be21d6938b6bcd26a32b0dc295100a3b24f1f0839fdb65be680e7a11a39014f485f36551c6844a
checksum: f9db387b488a03125e5dc22dd7ffed9c661d1f2428188912a35a2235b3bd9d826b390e7600d04998639994f5a96695b9dc9034ca9cb59e261d2fdee93a60df3f
languageName: node
linkType: hard

Expand Down Expand Up @@ -10982,13 +10977,13 @@ __metadata:
linkType: hard

"ejs@npm:^3.1.7":
version: 3.1.8
resolution: "ejs@npm:3.1.8"
version: 3.1.10
resolution: "ejs@npm:3.1.10"
dependencies:
jake: ^10.8.5
bin:
ejs: bin/cli.js
checksum: 1d40d198ad52e315ccf37e577bdec06e24eefdc4e3c27aafa47751a03a0c7f0ec4310254c9277a5f14763c3cd4bbacce27497332b2d87c74232b9b1defef8efc
checksum: ce90637e9c7538663ae023b8a7a380b2ef7cc4096de70be85abf5a3b9641912dde65353211d05e24d56b1f242d71185c6d00e02cb8860701d571786d92c71f05
languageName: node
linkType: hard

Expand Down Expand Up @@ -17363,12 +17358,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.32.2":
version: 1.32.2
resolution: "playwright-core@npm:1.32.2"
"playwright-core@npm:1.43.1":
version: 1.43.1
resolution: "playwright-core@npm:1.43.1"
bin:
playwright-core: cli.js
checksum: 7c96b3a4a4bce2ee22c3cd680c9b0bb9e4bf07ee4b51d1e9a7f47a6489c7b0b960d4b550e530b8f41d1ffeadd26c7c6bb626ae8689dfd90dce1cb8e35ae78ff7
languageName: node
linkType: hard

"playwright@npm:1.43.1":
version: 1.43.1
resolution: "playwright@npm:1.43.1"
dependencies:
fsevents: 2.3.2
playwright-core: 1.43.1
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: ff000cbf280e5d558fe70fd3edf14910a2e86ec68b04e28327176268345be7b3f88a5d22d78e8dae677dd633dce6cd493237df199773b55312f2ae1ab85d711f
checksum: de9db021f93018a18275bbb5af09ebf1804aa0534f47578b35b440064abc774509740205802824afc94a99fc84dd55ffe9e215718ad3ecc691b251ab3882b096
languageName: node
linkType: hard

Expand Down

0 comments on commit 2274edb

Please sign in to comment.