-
Notifications
You must be signed in to change notification settings - Fork 160
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
Support JupyterLab 4.0, port to Lumino 2 #673
Merged
Merged
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
43b0608
Update dependencies for jupyterlab 4.
HaudinFlorence 79414bb
EditorWrapper migrated to CM6 and started mergeview
HaudinFlorence 6f65fd4
Update mergeview.ts and other files.
HaudinFlorence 1f80d1d
Update dependencies.
HaudinFlorence 9cce097
Fixed build
JohanMabille f6d431b
Migrate highlighting to CM6.
HaudinFlorence 78cd4fd
Migrate padding to CM6.
HaudinFlorence d461c0f
Keep on migrating padding (one effect by editor using decoration sets…
HaudinFlorence 6d97463
Migrate gutter markers.
HaudinFlorence 8156966
Keep on migrating gutter markers
HaudinFlorence 7bd87c9
Restore the missing syntax highlighting
HaudinFlorence 660f8ef
Update alignViews in mergeview.ts to correct padding issues (only the…
HaudinFlorence ec92d93
Fix spacers algorithm
fcollonval 414eb76
Fix last spacer
fcollonval 6005c0d
Add first ui-tests
HaudinFlorence 711fa95
Fix following rebase.
HaudinFlorence ecc4478
Add comments about changes or configurations.
HaudinFlorence c721222
Update packages/labextension/src/actions.ts
HaudinFlorence 63c9c24
Take review comments into account.
HaudinFlorence f3e4821
Fix trailing comma and indentation issues.
HaudinFlorence 872a71c
Remove broken examples
vidartf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Update Playwright Snapshots | ||
|
||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-snapshots: | ||
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update playwright snapshots') }} | ||
runs-on: ${{ matrix.os }} | ||
concurrency: ci-${{ github.ref }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-22.04] | ||
|
||
steps: | ||
- name: React to the triggering comment | ||
run: | | ||
hub api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Configure git to use https | ||
run: git config --global hub.protocol https | ||
|
||
- name: Checkout the branch from the PR that triggered the job | ||
run: hub pr checkout ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
with: | ||
python_version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: python -m pip install -U "jupyterlab>=4.0.0,<5" | ||
|
||
- name: Install extension | ||
run: | | ||
python -m pip install . | ||
|
||
- name: Build extension | ||
run: | | ||
npm run build | ||
|
||
- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Playwright knows how to start JupyterLab server | ||
start_server_script: 'null' | ||
test_folder: ui-tests | ||
npm_client: npm | ||
|
||
- name: Comment back on the PR | ||
run: | | ||
hub api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --raw-field 'body=Playwright ${{ matrix.os }} snapshots updated.' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ui-tests/data/merge_test1 | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"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", | ||
" 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 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"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", | ||
"% more more comments\n", | ||
"\n", | ||
"def gaussian(x, a, b, c):\n", | ||
" return a * np.exp(-b * (x-c)**2)\n", | ||
" % here a comment\n", | ||
" % second line of comment\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 | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the files in this examples folder meant to be used for? How does it differ from the files in the ui-tests folder, and the nbdime/tests/files folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could reduce the number of examples in the dedicated folders.They were used during the migration process to check various diff and merge configurations.
The diff in
ui-tests/diff_test1
andui-tests/diff_test2
are variants of example1 (center.ipynb with addition/deletions of additionnal cells) andui-tests/diff_test3
is a variant ofexample8
(withleft.ipynb
andcenter.ipynb
notebooks).The merge in
ui-tests/merge_test1
andui-tests/merge_test2
are variant of example1 andui-tests/merge_test3
is a variant ofexample3
.nbdime/tests/files folder
has nothing in common withui-tests
andexamples
.