From c777efc533ff419a128a016e31ca9800b374447e Mon Sep 17 00:00:00 2001 From: "krzysztof.sikora" Date: Thu, 2 Apr 2020 11:09:30 +0200 Subject: [PATCH 1/4] Add new test for pagination variables --- tests/src/session.spec.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/src/session.spec.ts b/tests/src/session.spec.ts index e59066b8..dec872eb 100644 --- a/tests/src/session.spec.ts +++ b/tests/src/session.spec.ts @@ -211,7 +211,7 @@ describe('protocol', () => { }); }); - const getVariables = async () => { + const getVariables = async (start?: number, count?: number) => { const stackFramesReply = await debugSession.sendRequest('stackTrace', { threadId }); @@ -222,7 +222,9 @@ describe('protocol', () => { const scopes = scopesReply.body.scopes; const variablesReference = scopes[0].variablesReference; const variablesReply = await debugSession.sendRequest('variables', { - variablesReference + variablesReference, + start, + count }); return variablesReply.body.variables; }; @@ -238,6 +240,16 @@ describe('protocol', () => { }); }); + describe('#variablesPagination', () => { + it('should return only one the variable (int) by pagination pointers start and count', async () => { + await debugSession.sendRequest('continue', { threadId }); + const variables = await getVariables(1, 1); + const integers = variables.filter(variable => variable.type === 'int'); + expect(integers).to.exist; + expect(integers.length).to.equals(1); + }); + }); + describe('#continue', () => { it('should proceed to the next breakpoint', async () => { let events: string[] = []; From 6a4058e4b60e884c14744ed2d0811ebb16138267 Mon Sep 17 00:00:00 2001 From: "Afshin T. Darian" Date: Wed, 22 Apr 2020 01:31:39 +0100 Subject: [PATCH 2/4] Upgrade to xeus-python 0.7.1 --- .github/workflows/tests.yml | 2 +- .github/workflows/wheel.yml | 2 +- README.md | 6 +++--- binder/environment.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 322eb3bf..0c57cf4b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: conda init bash conda info -a - name: Create the conda environment - run: conda create -n jupyterlab-debugger --yes --quiet -c conda-forge nodejs jupyterlab=2 xeus-python=0.6.12 ptvsd python=$PYTHON_VERSION + run: conda create -n jupyterlab-debugger --yes --quiet -c conda-forge nodejs jupyterlab=2 xeus-python=0.7.1 ptvsd python=$PYTHON_VERSION env: PYTHON_VERSION: '3.8' diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 2de724b5..0245fe3a 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -24,7 +24,7 @@ jobs: python-version: '3.8' - name: Install the dependencies - run: python -m pip install xeus-python==0.6.8 "jupyterlab>=2,<3" "notebook>=6,<7" ptvsd + run: python -m pip install xeus-python==0.7.1 "jupyterlab>=2,<3" "notebook>=6,<7" ptvsd - name: Build and install the extension run: | diff --git a/README.md b/README.md index cc2b7cbc..fe213806 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A JupyterLab debugger UI extension. This extension is under active development. ## Prerequisites - JupyterLab 2.0+ -- xeus-python 0.6.7+ +- xeus-python 0.7.1+ - notebook 6+ ## Installation @@ -21,7 +21,7 @@ A kernel with support for debugging is required to be able to use the debugger. It is generally recommended to create a new `conda` environment to install the dependencies: ```bash -conda create -n jupyterlab-debugger -c conda-forge xeus-python=0.6.12 notebook=6 jupyterlab=2 ptvsd +conda create -n jupyterlab-debugger -c conda-forge xeus-python=0.7.1 notebook=6 jupyterlab=2 ptvsd conda activate jupyterlab-debugger ``` @@ -35,7 +35,7 @@ jupyter labextension install @jupyterlab/debugger ```bash # Create a new conda environment -conda create -n jupyterlab-debugger -c conda-forge nodejs xeus-python=0.6.12 ptvsd jupyterlab=2 +conda create -n jupyterlab-debugger -c conda-forge nodejs xeus-python=0.7.1 ptvsd jupyterlab=2 # Activate the conda environment conda activate jupyterlab-debugger diff --git a/binder/environment.yml b/binder/environment.yml index 03f66f08..e92d5668 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -7,4 +7,4 @@ dependencies: - nodejs - notebook=6 - ptvsd -- xeus-python=0.6.12 +- xeus-python=0.7.1 From b6492195b588b89c245e2411d2de0d8832744717 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 24 Apr 2020 15:02:19 +0200 Subject: [PATCH 3/4] Alias xpython for the wheel tests on CI --- .github/workflows/wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 0245fe3a..d87b8683 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -40,4 +40,5 @@ jobs: - name: Run the tests run: | export XEUS_LOG=1 + alias xpython="python -m xpython_launcher" jlpm run test From 9150a7f61a9c7d82073fc232ca20d0f04fe3de6d Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 24 Apr 2020 17:42:13 +0200 Subject: [PATCH 4/4] Remove the xpython wheel CI tests for now --- .github/workflows/wheel.yml | 44 ------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/wheel.yml diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml deleted file mode 100644 index d87b8683..00000000 --- a/.github/workflows/wheel.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Tests - Xeus-Python Wheel - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Install node - uses: actions/setup-node@v1 - with: - node-version: '10.x' - - - name: Install Python - uses: actions/setup-python@v1 - with: - python-version: '3.8' - - - name: Install the dependencies - run: python -m pip install xeus-python==0.7.1 "jupyterlab>=2,<3" "notebook>=6,<7" ptvsd - - - name: Build and install the extension - run: | - jlpm && jlpm run build - jupyter labextension link . - - - name: Install libgbm1 to fix puppeteer - run: sudo apt-get install libgbm1 - - - name: Browser check - run: python -m jupyterlab.browser_check - - - name: Run the tests - run: | - export XEUS_LOG=1 - alias xpython="python -m xpython_launcher" - jlpm run test