-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "2d47bfe2-d91d-4f72-9426-1885c4edb5a9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"x = np.arange(0, 2, 0.1)\n", | ||
"y = np.exp(x)\n", | ||
"plt.plot(x,y)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "b5b285e4", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# one comment" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "e3ab7a01", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "2d47bfe2-d91d-4f72-9426-1885c4edb5a9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"x = np.arange(0, 2, 0.1)\n", | ||
"y = np.exp(x)\n", | ||
"plt.plot(x,y)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "b5b285e4", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# comment" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "e3ab7a01", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "eabfe4e0-d646-4d09-95a4-09ee3d030db6", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"\n", | ||
"def gaussian(x, a, b, c):\n", | ||
" #calculate a gaussian\n", | ||
" return a * np.exp(-b * (x-c)**2)\n", | ||
"\n", | ||
"def sinus ():\n", | ||
" # Here you can see a sinus function\n", | ||
" # Let's keep on adding lines\n", | ||
" # And lines\n", | ||
" nx = 100\n", | ||
" x = np.linspace(-5.0, 5.0, nx)\n", | ||
" y = np.sin(x)\n", | ||
" return x, y\n", | ||
"\n", | ||
"def noisy_gaussian():\n", | ||
" # gaussian array y in interval -5 <= x <= 5\n", | ||
" nx = 100\n", | ||
" x = np.linspace(-5.0, 5.0, nx)\n", | ||
" y = gaussian(x, a=2.0, b=0.5, c=1.5)\n", | ||
" noise = np.random.normal(0.0, 0.2, nx)\n", | ||
" y += noise\n", | ||
" return x, y" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "2d47bfe2-d91d-4f72-9426-1885c4edb5a9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"%matplotlib inline\n", | ||
"%this is a comment\n", | ||
"\n", | ||
"def gaussian(x, a, b, c):\n", | ||
" return a * np.exp(-b * (x-c)**2)\n", | ||
"\n", | ||
"def noisy_gaussian():\n", | ||
" # gaussian array y in interval -5 <= x <= 5\n", | ||
" nx = 100\n", | ||
" x = np.linspace(-5.0, 5.0, nx)\n", | ||
" y = gaussian(x, a=2.0, b=0.5, c=1.5)\n", | ||
" noise = np.random.normal(0.0, 0.2, nx)\n", | ||
" y += noise\n", | ||
" return x, y" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "eabfe4e0-d646-4d09-95a4-09ee3d030db6", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"x = np.arange(0, 2, 0.1)\n", | ||
"y = np.exp(x)\n", | ||
"plt.plot(x,y)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "eabfe4e0-d646-4d09-95a4-09ee3d030db6", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"x = np.arange(0, 2, 0.1)\n", | ||
"y = np.exp(x)\n", | ||
"plt.plot(x,y)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test.beforeEach( async ({ page }) => { | ||
|
||
await page.goto('http://localhost:41000/diff'); | ||
await page.locator('#diff-remote').fill('data/diff_test1/left.ipynb'); | ||
await page.locator('#diff-base').fill('data/diff_test1/center.ipynb'); | ||
await page.getByRole('button', { name: 'Diff files' }).click(); | ||
}) | ||
|
||
/* added cells between left and right editors */ | ||
test.describe('diff test1', () => { | ||
test('take a snapshot at opening', async ({ page }) => { | ||
expect(await page.locator('#main').screenshot()).toMatchSnapshot(); | ||
Check failure on line 14 in ui-tests/tests/nbdime-diff-test1.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.10)tests/nbdime-diff-test1.spec.ts:13:7 › diff test1 › take a snapshot at opening
Check failure on line 14 in ui-tests/tests/nbdime-diff-test1.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.11)tests/nbdime-diff-test1.spec.ts:13:7 › diff test1 › take a snapshot at opening
Check failure on line 14 in ui-tests/tests/nbdime-diff-test1.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.9)tests/nbdime-diff-test1.spec.ts:13:7 › diff test1 › take a snapshot at opening
Check failure on line 14 in ui-tests/tests/nbdime-diff-test1.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.8)tests/nbdime-diff-test1.spec.ts:13:7 › diff test1 › take a snapshot at opening
|
||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test.beforeEach( async ({ page }) => { | ||
|
||
await page.goto('http://localhost:41000/diff'); | ||
await page.locator('#diff-remote').fill('data/diff_test2/left.ipynb'); | ||
await page.locator('#diff-base').fill('data/diff_test2/center.ipynb'); | ||
await page.getByRole('button', { name: 'Diff files' }).click(); | ||
}) | ||
|
||
/* deleted cells between left and right editors */ | ||
test.describe('diff test2', () => { | ||
test('take a snapshot at opening', async ({ page }) => { | ||
expect(await page.locator('#main').screenshot()).toMatchSnapshot(); | ||
Check failure on line 14 in ui-tests/tests/nbdime-diff-test2.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.10)tests/nbdime-diff-test2.spec.ts:13:7 › diff test2 › take a snapshot at opening
Check failure on line 14 in ui-tests/tests/nbdime-diff-test2.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.11)tests/nbdime-diff-test2.spec.ts:13:7 › diff test2 › take a snapshot at opening
Check failure on line 14 in ui-tests/tests/nbdime-diff-test2.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.9)tests/nbdime-diff-test2.spec.ts:13:7 › diff test2 › take a snapshot at opening
Check failure on line 14 in ui-tests/tests/nbdime-diff-test2.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.8)tests/nbdime-diff-test2.spec.ts:13:7 › diff test2 › take a snapshot at opening
|
||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test.beforeEach( async ({ page }) => { | ||
|
||
await page.goto('http://localhost:41000/diff'); | ||
await page.locator('#diff-remote').fill('data/diff_test3/left.ipynb'); | ||
await page.locator('#diff-base').fill('data/diff_test3/center.ipynb'); | ||
await page.getByRole('button', { name: 'Diff files' }).click(); | ||
}) | ||
|
||
|
||
/* notebooks with spacers */ | ||
test.describe('diff test3', () => { | ||
test('take a snapshot at opening', async ({ page }) => { | ||
expect(await page.locator('#main').screenshot()).toMatchSnapshot(); | ||
Check failure on line 15 in ui-tests/tests/nbdime-diff-test3.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.10)tests/nbdime-diff-test3.spec.ts:14:7 › diff test3 › take a snapshot at opening
Check failure on line 15 in ui-tests/tests/nbdime-diff-test3.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.11)tests/nbdime-diff-test3.spec.ts:14:7 › diff test3 › take a snapshot at opening
Check failure on line 15 in ui-tests/tests/nbdime-diff-test3.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.9)tests/nbdime-diff-test3.spec.ts:14:7 › diff test3 › take a snapshot at opening
Check failure on line 15 in ui-tests/tests/nbdime-diff-test3.spec.ts GitHub Actions / ui-test (ubuntu-22.04, 3.8)tests/nbdime-diff-test3.spec.ts:14:7 › diff test3 › take a snapshot at opening
|
||
}); | ||
}); |