Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt sp-repo-review #377

Merged
merged 11 commits into from
Sep 14, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run Linters
run: |
- name: Run Linters
run: |
hatch run typing:test
hatch run lint:style
pipx run interrogate -v nbformat
Expand Down
37 changes: 34 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ci:
autoupdate_schedule: monthly
autoupdate_commit_msg: "chore: update pre-commit hooks"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -29,14 +30,44 @@ repos:
hooks:
- id: mdformat

- repo: https://github.com/psf/black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
hooks:
- id: prettier
types_or: [yaml, html, json]

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.5"
hooks:
- id: codespell
args: ["-L", "sur,nd"]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.287
hooks:
- id: ruff
args: ["--fix"]
exclude: script
args: ["--fix", "--show-fixes"]

- repo: https://github.com/scientific-python/cookie
rev: "2023.08.23"
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ python:
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.11"
12 changes: 6 additions & 6 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
nbformat = 4

# current minor version
nbformat_minor = <new_minor_version_here>
nbformat_minor = new_minor_version_here

# schema files for (major, minor) version tuples. (None, None) means the current version
nbformat_schema = {
(None, None): 'nbformat.v4.schema.json',
(4, 0): 'nbformat.v4.0.schema.json',
...
(4, <new_minor_version_here>): 'nbformat.v4.<new_minor_version_here>.schema.json'
(None, None): "nbformat.v4.schema.json",
(4, 0): "nbformat.v4.0.schema.json",
# ...
(4, new_minor_version_here): "nbformat.v4.<new_minor_version_here>.schema.json",
}
```

Expand Down Expand Up @@ -59,7 +59,7 @@ git push upstream --tags
rm -rf dist/*
rm -rf build/*
pipx run build .
# Double check the dist/* files have the right verison (no `.dev`) and install the wheel to ensure it's good
# Double check the dist/* files have the right version (no `.dev`) and install the wheel to ensure it's good
pip install dist/*
pipx run twine upload dist/*
```
Expand Down
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

import os
import shutil
from importlib.metadata import version as get_version

import nbformat

HERE = os.path.abspath(os.path.dirname(__file__))

Expand Down Expand Up @@ -73,7 +74,7 @@
# built documents.
#
# The short X.Y version.
version = ".".join(get_version("nbformat").split(".")[:2])
version = ".".join(nbformat.__version__.split(".")[:2])
# The full version, including alpha/beta/rc tags.
release = version

Expand Down