Skip to content

Commit 9aad71b

Browse files
authored
Maintenance cleanup (#51)
1 parent ebf0a83 commit 9aad71b

File tree

6 files changed

+49
-73
lines changed

6 files changed

+49
-73
lines changed

.flake8

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

.github/workflows/check-release.yml

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

.github/workflows/test.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,12 @@ on:
88
- cron: "0 8 * * *"
99

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

3618
test:
3719
runs-on: ${{ matrix.os }}
@@ -46,6 +28,8 @@ jobs:
4628
python-version: "3.9"
4729
- os: ubuntu-latest
4830
python-version: "pypy-3.8"
31+
- os: ubuntu-latest
32+
python-version: "3.11-dev"
4933
- os: macos-latest
5034
python-version: "3.8"
5135
steps:
@@ -55,22 +39,23 @@ jobs:
5539
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
5640
- name: Install the Python dependencies
5741
run: |
58-
pip install -e ".[test]" codecov
42+
pip install -e ".[test]"
5943
- name: List installed packages
6044
run: |
6145
pip freeze
6246
pip check
6347
- name: Run the tests with Coverage
6448
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }}
6549
run: |
66-
python -m pytest -vv --cov jupyter_server_terminals --cov-branch --cov-report term-missing:skip-covered
50+
pytest -vv --cov jupyter_server_terminals --cov-branch --cov-report term-missing:skip-covered || pytest -vv --lf
6751
- name: Run the tests on pypy and Windows
6852
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(runner.os, 'Windows') }}
6953
run: |
70-
python -m pytest -vv
54+
pytest -vv || pytest -vv --lf
7155
- name: Coverage
7256
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }}
7357
run: |
58+
pip install codecov
7459
codecov
7560
7661
test_minimum_versions:
@@ -129,6 +114,21 @@ jobs:
129114
with:
130115
extra_test: 'jupyter server extension list 2>&1 | grep -ie "jupyter_server_terminals.*OK"'
131116

117+
check_release:
118+
runs-on: ubuntu-latest
119+
steps:
120+
- name: Checkout
121+
uses: actions/checkout@v2
122+
- name: Base Setup
123+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
124+
- name: Install Dependencies
125+
run: |
126+
pip install -e .
127+
- name: Check Release
128+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
129+
with:
130+
token: ${{ secrets.GITHUB_TOKEN }}
131+
132132
check_links:
133133
runs-on: ubuntu-latest
134134
timeout-minutes: 10

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ repos:
5252
args: [--max-line-length=200]
5353
stages: [manual]
5454

55-
- repo: https://github.com/pycqa/flake8
56-
rev: 5.0.4
55+
- repo: https://github.com/john-hen/Flake8-pyproject
56+
rev: 1.0.1
5757
hooks:
58-
- id: flake8
58+
- id: Flake8-pyproject
59+
alias: flake8
5960
additional_dependencies:
6061
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
6162
stages: [manual]
File renamed without changes.

pyproject.toml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "jupyter_server_terminals"
7+
readme = "README.md"
78
dynamic = ["version"]
89
license = { file = "LICENSE" }
910
description = "A Jupyter Server Extension Providing Terminals."
@@ -29,10 +30,6 @@ dependencies = [
2930
name = "Jupyter Development Team"
3031
3132

32-
[project.readme]
33-
file = "README.md"
34-
content-type = "text/markdown"
35-
3633
[project.urls]
3734
Homepage = "https://jupyter.org"
3835

@@ -86,6 +83,23 @@ warn_redundant_casts = true
8683
warn_return_any = true
8784
warn_unused_ignores = true
8885

89-
90-
[tool.jupyter-releaser]
91-
skip = ["check-links"]
86+
[tool.flake8]
87+
ignore = "E501, W503, E402"
88+
builtins = "c, get_config"
89+
exclude = [
90+
".cache",
91+
".github",
92+
"docs",
93+
"setup.py",
94+
]
95+
enable-extensions = "G"
96+
extend-ignore = [
97+
"G001", "G002", "G004", "G200", "G201", "G202",
98+
# black adds spaces around ':'
99+
"E203",
100+
]
101+
per-file-ignores = [
102+
# B011: Do not call assert False since python -O removes these calls
103+
# F841 local variable 'foo' is assigned to but never used
104+
"tests/*: B011", "F841",
105+
]

0 commit comments

Comments
 (0)