Skip to content

Commit 8bfb432

Browse files
authored
Update R kernel, ensure loading content from URL in R kernel works (#229)
* Pin minimum xeus-r version to 0.8.0 * Add a test * Use prefix-hosted over mamba-hosted emscripten-forge
1 parent 0ef83d7 commit 8bfb432

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

lite/xeus-environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: xeus-kernel
22
channels:
3-
- https://repo.mamba.pm/emscripten-forge
3+
- https://repo.prefix.dev/emscripten-forge-dev
44
- https://repo.prefix.dev/conda-forge
55
dependencies:
6-
- xeus-r
6+
- xeus-r>=0.8.0
77
# -r-tidyverse is not available yet due to upper pin on r-base, and
88
# older r-base versions are not available on emscripten-forge, so we
99
# install some of the tidyverse packages individually (except for

ui-tests/tests/jupytereverywhere.spec.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,30 @@ test('Should switch to R kernel and run R code', async ({ page }) => {
491491
expect(await output.screenshot()).toMatchSnapshot('r-output.png');
492492
});
493493

494+
test.describe('Kernel networking', () => {
495+
const remote_url =
496+
'https://raw.githubusercontent.com/JupyterEverywhere/jupyterlite-extension/refs/heads/main/ui-tests/test-files/b-dataset.csv';
497+
498+
test('R kernel should be able to fetch from a remote URL', async ({ page }) => {
499+
await page.goto('lab/index.html?kernel=r');
500+
await page.waitForSelector('.jp-NotebookPanel');
501+
502+
const code = `read.csv("${remote_url}")`;
503+
const cell = page.locator('.jp-Cell').last();
504+
await cell.getByRole('textbox').fill(code);
505+
506+
await runCommand(page, 'notebook:run-cell');
507+
508+
const output = cell.locator('.jp-Cell-outputArea');
509+
await expect(output).toBeVisible({
510+
timeout: 20000 // shouldn't take too long to run but just to be safe
511+
});
512+
513+
const text = await output.textContent();
514+
expect(text).toContain('col1');
515+
});
516+
});
517+
494518
test.describe('Leave confirmation', () => {
495519
test('Leave confirmation snapshot', async ({ page }) => {
496520
await mockTokenRoute(page);

0 commit comments

Comments
 (0)