Skip to content

Commit 295053b

Browse files
authored
Maintenance cleanup (#856)
1 parent ddf7028 commit 295053b

File tree

10 files changed

+143
-148
lines changed

10 files changed

+143
-148
lines changed

.flake8

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/check-release.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,32 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
# Run "pre-commit run --all-files --hook-stage=manual"
1413
pre-commit:
15-
name: Run pre-commit hook
1614
runs-on: ubuntu-latest
17-
timeout-minutes: 5
1815
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v2
21-
- name: Set up Python
22-
uses: actions/setup-python@v3
23-
- name: Run pre-commit
24-
uses: pre-commit/[email protected]
16+
- uses: actions/checkout@v2
17+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
18+
- uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1
19+
20+
check_release:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
25+
- uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
2526
with:
26-
extra_args: --all-files --hook-stage=manual
27-
- name: Help message if pre-commit fail
28-
if: ${{ failure() }}
29-
run: |
30-
echo "You can install pre-commit hooks to automatically run formatting"
31-
echo "on each commit with:"
32-
echo " pre-commit install"
33-
echo "or you can run by hand on staged files with"
34-
echo " pre-commit run"
35-
echo "or after-the-fact on already committed files with"
36-
echo " pre-commit run --all-files --hook-stage=manual"
27+
token: ${{ secrets.GITHUB_TOKEN }}
3728

38-
build-n-test-n-coverage:
39-
name: Build, test and code coverage
29+
check-links:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
34+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
35+
36+
test:
4037
runs-on: ${{ matrix.os }}
41-
timeout-minutes: 15
38+
timeout-minutes: 20
4239

4340
strategy:
4441
fail-fast: false
@@ -50,53 +47,35 @@ jobs:
5047
python-version: "3.9"
5148
- os: ubuntu-latest
5249
python-version: "pypy-3.8"
50+
- os: ubuntu-latest
51+
python-version: "3.11-dev"
5352
- os: macos-latest
5453
python-version: "3.8"
55-
56-
env:
57-
OS: ${{ matrix.os }}
58-
5954
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v2
62-
63-
- name: Base Setup
64-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
65-
66-
- name: Install dependencies
67-
run: |
68-
pip install -e .[test]
69-
pip freeze
70-
55+
- uses: actions/checkout@v2
56+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
7157
- name: Run the tests
7258
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }}
7359
run: |
74-
args="-vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered"
75-
python -m pytest $args --cov-fail-under 70 || python -m pytest $args --lf
60+
hatch run cov:test || hatch run test:test --lf
7661
- name: Run the tests on pypy and windows
7762
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(matrix.os, 'windows') }}
7863
run: |
7964
# Ignore warnings on Windows and PyPI
65+
pip install -e ".[test]"
8066
python -m pytest -vv -W ignore || python -m pytest -vv -W ignore --lf
8167
8268
- name: Code coverage
83-
run: codecov
69+
run: |
70+
pip install codecov
71+
codecov
8472
8573
docs:
8674
runs-on: ubuntu-latest
87-
timeout-minutes: 10
8875
steps:
89-
- name: Checkout
90-
uses: actions/checkout@v2
91-
92-
- name: Base Setup
93-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
94-
95-
- name: Build the docs
96-
run: |
97-
pip install ".[doc]"
98-
cd docs
99-
make html SPHINXOPTS="-W"
76+
- uses: actions/checkout@v2
77+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
78+
- run: hatch run docs:build
10079

10180
test_miniumum_verisons:
10281
name: Test Minimum Versions
@@ -152,3 +131,20 @@ jobs:
152131
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1
153132
with:
154133
test_command: pytest -vv || pytest -vv --lf
134+
135+
tests_check: # This job does nothing and is only used for the branch protection
136+
if: always()
137+
needs:
138+
- test
139+
- docs
140+
- check-links
141+
- test_miniumum_verisons
142+
- pre-commit
143+
- test_prereleases
144+
- test_sdist
145+
runs-on: ubuntu-latest
146+
steps:
147+
- name: Decide whether the needed jobs succeeded or failed
148+
uses: re-actors/alls-green@release/v1
149+
with:
150+
jobs: ${{ toJSON(needs) }}

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ repos:
2626
- id: black
2727
args: ["--line-length", "100"]
2828

29-
- repo: https://github.com/pre-commit/mirrors-prettier
30-
rev: v3.0.0-alpha.1
29+
- repo: https://github.com/abravalheri/validate-pyproject
30+
rev: v0.10.1
3131
hooks:
32-
- id: prettier
32+
- id: validate-pyproject
33+
stages: [manual]
34+
35+
- repo: https://github.com/executablebooks/mdformat
36+
rev: 0.7.16
37+
hooks:
38+
- id: mdformat
3339

3440
- repo: https://github.com/PyCQA/doc8
3541
rev: v1.0.0
@@ -38,10 +44,11 @@ repos:
3844
args: [--max-line-length=200]
3945
stages: [manual]
4046

41-
- repo: https://github.com/pycqa/flake8
42-
rev: 5.0.4
47+
- repo: https://github.com/john-hen/Flake8-pyproject
48+
rev: 1.0.1
4349
hooks:
44-
- id: flake8
50+
- id: Flake8-pyproject
51+
alias: flake8
4552
additional_dependencies:
4653
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
4754
stages: [manual]

readthedocs.yml renamed to .readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ python:
66
install:
77
# install jupyter-client itself
88
- method: pip
9-
path: ".[doc]"
9+
path: ".[docs]"

CHANGELOG.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@
4949

5050
### Maintenance and upkeep improvements
5151

52-
- [pre-commit.ci] pre-commit autoupdate [#824](https://github.com/jupyter/jupyter_client/pull/824) ([@pre-commit-ci](https://github.com/pre-commit-ci))
53-
- [pre-commit.ci] pre-commit autoupdate [#821](https://github.com/jupyter/jupyter_client/pull/821) ([@pre-commit-ci](https://github.com/pre-commit-ci))
54-
- [pre-commit.ci] pre-commit autoupdate [#820](https://github.com/jupyter/jupyter_client/pull/820) ([@pre-commit-ci](https://github.com/pre-commit-ci))
55-
- [pre-commit.ci] pre-commit autoupdate [#818](https://github.com/jupyter/jupyter_client/pull/818) ([@pre-commit-ci](https://github.com/pre-commit-ci))
56-
- [pre-commit.ci] pre-commit autoupdate [#816](https://github.com/jupyter/jupyter_client/pull/816) ([@pre-commit-ci](https://github.com/pre-commit-ci))
57-
- [pre-commit.ci] pre-commit autoupdate [#815](https://github.com/jupyter/jupyter_client/pull/815) ([@pre-commit-ci](https://github.com/pre-commit-ci))
58-
- [pre-commit.ci] pre-commit autoupdate [#812](https://github.com/jupyter/jupyter_client/pull/812) ([@pre-commit-ci](https://github.com/pre-commit-ci))
59-
- [pre-commit.ci] pre-commit autoupdate [#810](https://github.com/jupyter/jupyter_client/pull/810) ([@pre-commit-ci](https://github.com/pre-commit-ci))
60-
- [pre-commit.ci] pre-commit autoupdate [#809](https://github.com/jupyter/jupyter_client/pull/809) ([@pre-commit-ci](https://github.com/pre-commit-ci))
61-
- [pre-commit.ci] pre-commit autoupdate [#807](https://github.com/jupyter/jupyter_client/pull/807) ([@pre-commit-ci](https://github.com/pre-commit-ci))
52+
- \[pre-commit.ci\] pre-commit autoupdate [#824](https://github.com/jupyter/jupyter_client/pull/824) ([@pre-commit-ci](https://github.com/pre-commit-ci))
53+
- \[pre-commit.ci\] pre-commit autoupdate [#821](https://github.com/jupyter/jupyter_client/pull/821) ([@pre-commit-ci](https://github.com/pre-commit-ci))
54+
- \[pre-commit.ci\] pre-commit autoupdate [#820](https://github.com/jupyter/jupyter_client/pull/820) ([@pre-commit-ci](https://github.com/pre-commit-ci))
55+
- \[pre-commit.ci\] pre-commit autoupdate [#818](https://github.com/jupyter/jupyter_client/pull/818) ([@pre-commit-ci](https://github.com/pre-commit-ci))
56+
- \[pre-commit.ci\] pre-commit autoupdate [#816](https://github.com/jupyter/jupyter_client/pull/816) ([@pre-commit-ci](https://github.com/pre-commit-ci))
57+
- \[pre-commit.ci\] pre-commit autoupdate [#815](https://github.com/jupyter/jupyter_client/pull/815) ([@pre-commit-ci](https://github.com/pre-commit-ci))
58+
- \[pre-commit.ci\] pre-commit autoupdate [#812](https://github.com/jupyter/jupyter_client/pull/812) ([@pre-commit-ci](https://github.com/pre-commit-ci))
59+
- \[pre-commit.ci\] pre-commit autoupdate [#810](https://github.com/jupyter/jupyter_client/pull/810) ([@pre-commit-ci](https://github.com/pre-commit-ci))
60+
- \[pre-commit.ci\] pre-commit autoupdate [#809](https://github.com/jupyter/jupyter_client/pull/809) ([@pre-commit-ci](https://github.com/pre-commit-ci))
61+
- \[pre-commit.ci\] pre-commit autoupdate [#807](https://github.com/jupyter/jupyter_client/pull/807) ([@pre-commit-ci](https://github.com/pre-commit-ci))
6262

6363
### Contributors to this release
6464

@@ -77,7 +77,7 @@
7777
### Maintenance and upkeep improvements
7878

7979
- Fix sphinx 5.0 support [#804](https://github.com/jupyter/jupyter_client/pull/804) ([@blink1073](https://github.com/blink1073))
80-
- [pre-commit.ci] pre-commit autoupdate [#799](https://github.com/jupyter/jupyter_client/pull/799) ([@pre-commit-ci](https://github.com/pre-commit-ci))
80+
- \[pre-commit.ci\] pre-commit autoupdate [#799](https://github.com/jupyter/jupyter_client/pull/799) ([@pre-commit-ci](https://github.com/pre-commit-ci))
8181

8282
### Contributors to this release
8383

@@ -109,9 +109,9 @@
109109

110110
### Maintenance and upkeep improvements
111111

112-
- [pre-commit.ci] pre-commit autoupdate [#792](https://github.com/jupyter/jupyter_client/pull/792) ([@pre-commit-ci](https://github.com/pre-commit-ci))
112+
- \[pre-commit.ci\] pre-commit autoupdate [#792](https://github.com/jupyter/jupyter_client/pull/792) ([@pre-commit-ci](https://github.com/pre-commit-ci))
113113
- Use hatch backend [#789](https://github.com/jupyter/jupyter_client/pull/789) ([@blink1073](https://github.com/blink1073))
114-
- [pre-commit.ci] pre-commit autoupdate [#788](https://github.com/jupyter/jupyter_client/pull/788) ([@pre-commit-ci](https://github.com/pre-commit-ci))
114+
- \[pre-commit.ci\] pre-commit autoupdate [#788](https://github.com/jupyter/jupyter_client/pull/788) ([@pre-commit-ci](https://github.com/pre-commit-ci))
115115
- Use flit build backend [#781](https://github.com/jupyter/jupyter_client/pull/781) ([@blink1073](https://github.com/blink1073))
116116

117117
### Contributors to this release
@@ -132,7 +132,7 @@
132132
### Maintenance and upkeep improvements
133133

134134
- Allow bot PRs to be automatically labeled [#784](https://github.com/jupyter/jupyter_client/pull/784) ([@blink1073](https://github.com/blink1073))
135-
- [pre-commit.ci] pre-commit autoupdate [#783](https://github.com/jupyter/jupyter_client/pull/783) ([@pre-commit-ci](https://github.com/pre-commit-ci))
135+
- \[pre-commit.ci\] pre-commit autoupdate [#783](https://github.com/jupyter/jupyter_client/pull/783) ([@pre-commit-ci](https://github.com/pre-commit-ci))
136136

137137
### Contributors to this release
138138

@@ -150,8 +150,8 @@
150150

151151
### Maintenance and upkeep improvements
152152

153-
- [pre-commit.ci] pre-commit autoupdate [#773](https://github.com/jupyter/jupyter_client/pull/773) ([@pre-commit-ci](https://github.com/pre-commit-ci))
154-
- [pre-commit.ci] pre-commit autoupdate [#770](https://github.com/jupyter/jupyter_client/pull/770) ([@pre-commit-ci](https://github.com/pre-commit-ci))
153+
- \[pre-commit.ci\] pre-commit autoupdate [#773](https://github.com/jupyter/jupyter_client/pull/773) ([@pre-commit-ci](https://github.com/pre-commit-ci))
154+
- \[pre-commit.ci\] pre-commit autoupdate [#770](https://github.com/jupyter/jupyter_client/pull/770) ([@pre-commit-ci](https://github.com/pre-commit-ci))
155155
- Improve mypy config [#769](https://github.com/jupyter/jupyter_client/pull/769) ([@blink1073](https://github.com/blink1073))
156156
- Clean up pre-commit [#768](https://github.com/jupyter/jupyter_client/pull/768) ([@blink1073](https://github.com/blink1073))
157157

@@ -168,7 +168,7 @@
168168
### Maintenance and upkeep improvements
169169

170170
- Include py.typed file [#766](https://github.com/jupyter/jupyter_client/pull/766) ([@blink1073](https://github.com/blink1073))
171-
- [pre-commit.ci] pre-commit autoupdate [#765](https://github.com/jupyter/jupyter_client/pull/765) ([@pre-commit-ci](https://github.com/pre-commit-ci))
171+
- \[pre-commit.ci\] pre-commit autoupdate [#765](https://github.com/jupyter/jupyter_client/pull/765) ([@pre-commit-ci](https://github.com/pre-commit-ci))
172172
- More Cleanup [#764](https://github.com/jupyter/jupyter_client/pull/764) ([@blink1073](https://github.com/blink1073))
173173

174174
### Contributors to this release
@@ -246,7 +246,7 @@
246246

247247
### Documentation improvements
248248

249-
- [DOC] improve kernel provisioner doc [#730](https://github.com/jupyter/jupyter_client/pull/730) ([@abzymeinsjtu](https://github.com/abzymeinsjtu))
249+
- \[DOC\] improve kernel provisioner doc [#730](https://github.com/jupyter/jupyter_client/pull/730) ([@abzymeinsjtu](https://github.com/abzymeinsjtu))
250250
- add changelog for message spec [#525](https://github.com/jupyter/jupyter_client/pull/525) ([@minrk](https://github.com/minrk))
251251

252252
### Contributors to this release
@@ -490,7 +490,7 @@ pull-requests](https://github.com/jupyter/jupyter_client/milestone/27?closed=1)
490490
- Drop Travis CI, add GitHub Actions [#586](https://github.com/jupyter/jupyter_client/pull/586)
491491
- Adapt KernelManager.\_kernel_spec_manager_changed to observe
492492
[#588](https://github.com/jupyter/jupyter_client/pull/588)
493-
- Allow use \~/ in the kernel\'s command or its arguments
493+
- Allow use ~/ in the kernel's command or its arguments
494494
[#589](https://github.com/jupyter/jupyter_client/pull/589)
495495
- Change wait_for_ready logic [#592](https://github.com/jupyter/jupyter_client/pull/592)
496496
- Fix test_session with msgpack v1 [#594](https://github.com/jupyter/jupyter_client/pull/594)
@@ -550,12 +550,12 @@ should soon have releases to additionally support async patterns.
550550
## 6.0.0
551551

552552
The git history had to be reworked heavily in merging 5.x and master, so
553-
a link to all the changes at once in github had been left out as it\'s
553+
a link to all the changes at once in github had been left out as it's
554554
just confusing.
555555

556556
An exciting change in this release is some async support (huge thanks to
557-
\@davidbrochart for doing most of the work)! See linked PR below for
558-
more details, we\'re working on integrating this into nbclient as well
557+
@davidbrochart for doing most of the work)! See linked PR below for
558+
more details, we're working on integrating this into nbclient as well
559559
in the near future.
560560

561561
New Features:
@@ -765,7 +765,9 @@ New features:
765765
- Introduce `jupyter run` command
766766
for running scripts with a kernel, for instance:
767767

768-
jupyter run --kernel python3 myscript.py
768+
```
769+
jupyter run --kernel python3 myscript.py
770+
```
769771

770772
- New method
771773
`.BlockingKernelClient.execute_interactive` for running code and capturing or redisplaying its

COPYING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ change to one of the Jupyter repositories.
5656
With this in mind, the following banner should be used in any source code file
5757
to indicate the copyright and license terms:
5858

59-
# Copyright (c) Jupyter Development Team.
60-
# Distributed under the terms of the Modified BSD License.
59+
```
60+
# Copyright (c) Jupyter Development Team.
61+
# Distributed under the terms of the Modified BSD License.
62+
```

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
[![Build Status](https://github.com/jupyter/jupyter_client/workflows/CI/badge.svg)](https://github.com/jupyter/jupyter_client/actions)
44
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
55

6-
`jupyter_client` contains the reference implementation of the [Jupyter protocol][].
6+
`jupyter_client` contains the reference implementation of the [Jupyter protocol].
77
It also provides client and kernel management APIs for working with kernels.
88

99
It also provides the `jupyter kernelspec` entrypoint
1010
for installing kernelspecs for use with Jupyter frontends.
1111

12-
[jupyter protocol]: https://jupyter-client.readthedocs.io/en/latest/messaging.html
13-
1412
## Development Setup
1513

1614
The [Jupyter Contributor Guides](https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html) provide extensive information on contributing code or documentation to Jupyter projects. The limited instructions below for setting up a development environment are for your convenience.
@@ -79,3 +77,5 @@ yourself after that.
7977

8078
Some of the hooks only run on CI by default, but you can invoke them by
8179
running with the `--hook-stage manual` argument.
80+
81+
[jupyter protocol]: https://jupyter-client.readthedocs.io/en/latest/messaging.html

0 commit comments

Comments
 (0)