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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Run Linters
run: |
hatch run typing:test
hatch run lint:style
hatch run lint:build
pipx run interrogate -v jupyter_releaser
pipx run doc8 --max-line-length=200

Expand Down
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ repos:
types_or: [yaml, html, json]
exclude: '.pre-commit-config.yaml'

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.6.1"
hooks:
- id: mypy
files: "^jupyter_releaser"
exclude: "jupyter_releaser/tests"
stages: [manual]
args: ["--install-types", "--non-interactive"]
additional_dependencies:
["toml", "requests", "ghapi", "packaging","pkginfo", "fastapi", "click", "github_activity", "mdformat"]

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
hooks:
Expand Down
2 changes: 1 addition & 1 deletion jupyter_releaser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import requests
import toml
from ghapi import core # type:ignore[import-untyped]
from importlib_resources import files
from importlib_resources import files # type:ignore[import-not-found]
from jsonschema import Draft4Validator as Validator
from packaging.version import Version
from packaging.version import parse as parse_version
Expand Down
33 changes: 10 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,17 @@ dependencies = ["coverage[toml]", "pytest-cov"]
test = "python -m pytest -vv --cov jupyter_releaser --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"

[tool.hatch.envs.typing]
features = ["test"]
dependencies = ["mypy~=1.6"]
[tool.hatch.envs.typing.scripts]
test = "mypy --install-types --non-interactive {args}"

[tool.hatch.envs.lint]
dependencies = [
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff==0.1.3"
]
detached = true
dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts]
style = [
"ruff {args:.}",
"ruff format {args:.}",
"mdformat --check {args:docs *.md}"
]
fmt = [
"ruff --fix {args:.}",
"ruff format {args:.}",
"mdformat {args:docs *.md}"
]
build = "pre-commit run --all-files ruff"

[tool.hatch.envs.typing]
dependencies = [ "pre-commit"]
detached = true
[tool.hatch.envs.typing.scripts]
test = "pre-commit run --all-files --hook-stage manual mypy"

[tool.jupyter-releaser.hooks]
after-populate-release = "bash ./.github/scripts/bump_tag.sh"
Expand All @@ -124,7 +111,7 @@ minversion = "6.0"
xfail_strict = true
log_cli_level = "info"
addopts = [
"-raXs", "--durations=10", "--color=yes", "--doctest-modules",
"-ra", "--durations=10", "--color=yes", "--doctest-modules",
"--showlocals", "--strict-markers", "--strict-config",
"-p", "no:pastebin", "-p", "no:nose"
]
Expand Down Expand Up @@ -224,4 +211,4 @@ fail-under=100
exclude = ["jupyter_releaser/tests"]

[tool.repo-review]
ignore = ["PY004", "PY007","PP301", "PC140", "PP308", "GH102", "PY005"]
ignore = ["PY004", "PY007","PP301", "GH102", "PY005"]