Skip to content

Commit 112a322

Browse files
committed
maintenance cleanup
1 parent b14def0 commit 112a322

File tree

7 files changed

+51
-59
lines changed

7 files changed

+51
-59
lines changed

.flake8

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

.github/workflows/build.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818

1919
defaults:
2020
run:
21-
shell: bash -e {0}
21+
shell: bash -eux {0}
2222

2323
jobs:
2424
build:
@@ -108,22 +108,20 @@ jobs:
108108
jupyter notebook --version
109109
jupyter notebook --help
110110
111-
pre-commit:
111+
link_check:
112112
runs-on: ubuntu-latest
113113
timeout-minutes: 10
114114
steps:
115115
- uses: actions/checkout@v2
116-
- name: Base Setup
117-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
118-
- name: Install Jupyterlab
119-
run: pip install -e .
120-
- uses: pre-commit/[email protected]
116+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
117+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
121118
with:
122-
extra_args: --all-files --hook-stage=manual
123-
- name: Help message if pre-commit fail
124-
if: ${{ failure() }}
125-
run: |
126-
echo "or you can run by hand on staged files with"
127-
echo " pre-commit run"
128-
echo "or after-the-fact on already committed files with"
129-
echo " pre-commit run --all-files --hook-stage=manual"
119+
ignore-links: "https://playwright.dev/docs/test-cli/"
120+
121+
pre_commit:
122+
runs-on: ubuntu-latest
123+
timeout-minutes: 10
124+
steps:
125+
- uses: actions/checkout@v2
126+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
127+
- uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1

.github/workflows/check-release.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ jobs:
1616
check_release:
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 30
19-
strategy:
20-
matrix:
21-
group: [check_release, link_check]
22-
fail-fast: false
2319
steps:
2420
- name: Checkout
2521
uses: actions/checkout@v2
@@ -29,18 +25,12 @@ jobs:
2925
run: |
3026
pip install -e .
3127
- name: Check Release
32-
if: ${{ matrix.group == 'check_release' }}
33-
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
28+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
3429
with:
3530
token: ${{ secrets.GITHUB_TOKEN }}
36-
version_spec: next
37-
- name: Check Links
38-
if: ${{ matrix.group == 'link_check' }}
39-
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
4031

4132
- name: Upload Distributions
4233
uses: actions/upload-artifact@v2
43-
if: ${{ matrix.group == 'check_release' }}
4434
with:
4535
name: notebook-jupyter-releaser-dist-${{ github.run_number }}
4636
path: .jupyter_releaser_checkout/dist

.pre-commit-config.yaml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
ci:
2-
# skip any check that needs internet access
3-
skip: [prettier, integrity]
4-
51
repos:
62
- repo: https://github.com/pre-commit/pre-commit-hooks
73
rev: v4.3.0
@@ -40,15 +36,24 @@ repos:
4036
args: [--max-line-length=200]
4137
stages: [manual]
4238

43-
- repo: https://github.com/pycqa/flake8
44-
rev: 5.0.4
39+
- repo: https://github.com/abravalheri/validate-pyproject
40+
rev: v0.10.1
41+
hooks:
42+
- id: validate-pyproject
43+
stages: [manual]
44+
45+
- repo: https://github.com/executablebooks/mdformat
46+
rev: 0.7.16
4547
hooks:
46-
- id: flake8
48+
- id: mdformat
49+
50+
- repo: https://github.com/john-hen/Flake8-pyproject
51+
rev: 1.0.1
52+
hooks:
53+
- id: Flake8-pyproject
54+
alias: flake8
4755
additional_dependencies:
48-
[
49-
"flake8-bugbear==22.6.22",
50-
"flake8-implicit-str-concat==0.2.0",
51-
]
56+
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
5257
stages: [manual]
5358

5459
- repo: https://github.com/sirosen/check-jsonschema
@@ -67,7 +72,8 @@ repos:
6772
name: prettier
6873
entry: 'npm run prettier:files'
6974
language: node
70-
types_or: [json, markdown, ts, tsx, javascript, jsx, css]
75+
types_or: [json, ts, tsx, javascript, jsx, css]
76+
stages: [manual]
7177
- id: integrity
7278
name: integrity
7379
entry: 'npm run integrity --force'
File renamed without changes.

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,7 @@
7676
"version-cmd": [
7777
"jlpm run release:bump --force --skip-commit"
7878
],
79-
"ignore-links": [
80-
"https://playwright.dev/docs/test-cli/"
81-
]
82-
},
83-
"skip": [
84-
"check-links",
85-
"check-manifest"
86-
]
79+
"post-version-spec": "dev"
80+
}
8781
}
8882
}

pyproject.toml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.5", "jupyterlab>=4.0.0a30,<5"]
2+
requires = ["hatchling>=1.11", "jupyterlab>=4.0.0a30,<5"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -66,6 +66,7 @@ dev = [
6666

6767
[tool.hatch.version]
6868
path = "notebook/_version.py"
69+
validate-bump = false
6970

7071
[tool.hatch.build.targets.wheel.shared-data]
7172
"notebook/labextension" = "share/jupyter/labextensions/@jupyter-notebook/lab-extension"
@@ -125,3 +126,18 @@ filterwarnings = [
125126
"ignore:make_current is deprecated; start the event loop first",
126127
"ignore:clear_current is deprecated"
127128
]
129+
130+
[tool.flake8]
131+
ignore = "E501, W503, E402"
132+
builtins = "c, get_config"
133+
exclude = [
134+
".cache",
135+
".github",
136+
"docs",
137+
]
138+
enable-extensions = "G"
139+
extend-ignore = [
140+
"G001", "G002", "G004", "G200", "G201", "G202",
141+
# black adds spaces around ':'
142+
"E203",
143+
]

0 commit comments

Comments
 (0)