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

Replace 'tests' extra with 'test' dependency group (PEP 753) #227

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.0
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
Expand All @@ -27,7 +27,7 @@ repos:
exclude: tests/data/expected_output.py

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.3
rev: 0.29.4
hooks:
- id: check-github-workflows
- id: check-renovate
Expand Down Expand Up @@ -56,12 +56,12 @@ repos:
# ]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.4
rev: 2.4.3
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.20.2
rev: v0.21
hooks:
- id: validate-pyproject

Expand Down
22 changes: 13 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ dependencies = [
"python-slugify",
"termcolor>=2.1",
]
optional-dependencies.tests = [
"freezegun",
"pytest",
"pytest-cov",
"respx>=0.11",
]
urls.Changelog = "https://github.com/hugovk/norwegianblue/releases"
urls.Homepage = "https://github.com/hugovk/norwegianblue"
urls.Source = "https://github.com/hugovk/norwegianblue"
Expand Down Expand Up @@ -96,13 +90,23 @@ lint.flake8-import-conventions.banned-from = [ "datetime" ]
lint.isort.known-first-party = [ "norwegianblue" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]

[tool.pyproject-fmt]
max_supported_python = "3.13"

[tool.pytest.ini_options]
addopts = "--color=yes"
filterwarnings = [
# Python <= 3.11
"ignore:sys.monitoring isn't available, using default core:coverage.exceptions.CoverageWarning",
]
testpaths = [ "tests" ]

[tool.tox.env_run_base]
dependency_groups = [
"test",
]

[dependency-groups]
test = [
"freezegun",
"pytest",
"pytest-cov",
"respx>=0.11",
]
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ env_list =
py{py3, 313, 312, 311, 310, 39}

[testenv]
extras =
tests
set_env =
COVERAGE_CORE = sysmon
commands =
Expand Down
Loading