Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 72 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.10"]
include:
- os: windows-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "pypy-3.8"
- os: macos-latest
python-version: "3.8"

env:
OS: ${{ matrix.os }}
Expand All @@ -72,17 +79,34 @@ jobs:
- name: Check types
run: mypy jupyter_client --exclude '\/tests|kernelspecapp|ioloop|runapp' --install-types --non-interactive

- name: Run the tests with coverage
run: pytest --cov jupyter_client -v jupyter_client
- name: Run the tests
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }}
run: |
args="-vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered --cov-fail-under 70"
python -m pytest $args || python -m pytest $args --lf
- name: Run the tests on pypy and windows
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(matrix.os, 'windows') }}
run: |
python -m pytest -vv || python -m pytest -vv --lf

- name: Code coverage
run: codecov

docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Build the docs
run: |
pip install -r requirements-doc.txt
pip install .
cd docs
make html

- name: Code coverage
run: codecov
make html SPHINXOPTS="-W"

test_miniumum_verisons:
name: Test Minimum Versions
Expand Down Expand Up @@ -116,3 +140,43 @@ jobs:
- name: Run the tests
run: |
pytest -vv jupyter_client || pytest -vv jupyter_client --lf

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Build SDist
run: |
pip install build
python -m build --sdist
- uses: actions/upload-artifact@v2
with:
name: "sdist"
path: dist/*.tar.gz

test_sdist:
runs-on: ubuntu-latest
needs: [make_sdist]
name: Install from SDist and Test
timeout-minutes: 20
steps:
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Download sdist
uses: actions/download-artifact@v2
- name: Install From SDist
run: |
set -ex
cd sdist
mkdir test
tar --strip-components=1 -zxvf *.tar.gz -C ./test
cd test
pip install .[test]
- name: Run Test
run: |
cd sdist/test
pytest -vv || pytest -vv --lf
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,15 @@ GitHub](https://github.com/jupyter/jupyter_client/milestones/5.1)

## 5.0

#### 5.0.1
### 5.0.1

[5.0.1 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/5.0.1)

- Update internal protocol version number to 5.1, which should have
been done in 5.0.0.

#### 5.0.0
### 5.0.0

[5.0.0 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/5.0)
Expand Down Expand Up @@ -590,7 +590,7 @@ Backward-incompatible changes:

## 4.4

#### 4.4.0
### 4.4.0

[4.4 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/4.4)
Expand All @@ -603,7 +603,7 @@ GitHub](https://github.com/jupyter/jupyter_client/milestones/4.4)

## 4.3

#### 4.3.0
### 4.3.0

[4.3 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/4.3)
Expand All @@ -614,21 +614,21 @@ GitHub](https://github.com/jupyter/jupyter_client/milestones/4.3)

## 4.2

#### 4.2.2
### 4.2.2

[4.2.2 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/4.2.2)

- Another fix for the `start_new_kernel` issue in 4.2.1 affecting slow-starting kernels.

#### 4.2.1
### 4.2.1

[4.2.1 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/4.2.1)

- Fix regression in 4.2 causing `start_new_kernel` to fail while waiting for kernels to become available.

#### 4.2.0
### 4.2.0

[4.2.0 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/4.2)
Expand All @@ -645,7 +645,7 @@ GitHub](https://github.com/jupyter/jupyter_client/milestones/4.2)

## 4.1

#### 4.1.0
### 4.1.0

[4.1.0 on
GitHub](https://github.com/jupyter/jupyter_client/milestones/4.1)
Expand Down
2 changes: 1 addition & 1 deletion docs/provisioning.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _provisioning
.. _provisioning:

Customizing the kernel's runtime environment
============================================
Expand Down
2 changes: 1 addition & 1 deletion docs/wrapperkernels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ You can override a number of other methods to improve the functionality of your
kernel. All of these methods should return a dictionary as described in the
relevant section of the :doc:`messaging spec <messaging>`.

.. class:: MyKernel
.. class:: MyCustomKernel

.. method:: do_complete(code, cursor_pos)

Expand Down
2 changes: 2 additions & 0 deletions jupyter_client/tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Distributed under the terms of the Modified BSD License.
import hmac
import os
import platform
import uuid
from datetime import datetime
from unittest import mock
Expand Down Expand Up @@ -164,6 +165,7 @@ def test_args(self):
self.assertEqual(s.session, u)
self.assertEqual(s.username, "carrot")

@pytest.mark.skipif(platform.python_implementation() == 'PyPy', reason='Test fails on PyPy')
def test_tracking(self):
"""test tracking messages"""
a, b = self.create_bound_pair(zmq.PAIR, zmq.PAIR)
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ tag_template = "v{new_version}"

[[tool.tbump.file]]
src = "jupyter_client/_version.py"

[tool.pytest.ini_options]
addopts = "-raXs --durations 10 --color=yes --doctest-modules"
testpaths = [
"jupyter_client/tests/"
]
timeout = 300
# Restore this setting to debug failures
# timeout_method = "thread"
1 change: 1 addition & 0 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ipykernel
myst-parser
sphinx>=1.3.6
sphinx_rtd_theme
Expand Down