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
11 changes: 7 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

import nox

nox.needs_version = ">=2024.4.15"
nox.needs_version = ">=2025.2.9"
nox.options.default_venv_backend = "uv|virtualenv"

PYPROJECT = nox.project.load_toml()


@nox.session
def lint(session: nox.Session) -> None:
Expand All @@ -33,11 +35,12 @@ def tests(session: nox.Session) -> None:
"""
Run the unit and regular tests.
"""
session.install("-e.[test]")
test_grp = nox.project.dependency_groups(PYPROJECT, "test")
session.install("-e.", *test_grp)
session.run("pytest", *session.posargs, env={"COVERAGE_CORE": "sysmon"})


@nox.session
@nox.session(default=False)
def coverage(session: nox.Session) -> None:
"""
Run tests and compute coverage.
Expand All @@ -64,7 +67,7 @@ def build(session: nox.Session) -> None:
session.run("python", "-m", "build")


@nox.session
@nox.session(tags=["gen"])
def generate_schema(session: nox.Session) -> None:
"""
Generate a schema file.
Expand Down
20 changes: 9 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ dependencies = [
keywords = ["sdist", "packaging", "lint"]

[project.optional-dependencies]
test = [
"pytest >=6",
"pytest-cov >=3",
"pyproject-hooks !=1.1.0",
"validate-pyproject >=0.16",
]
uv = [
"uv",
]
Expand All @@ -57,19 +51,23 @@ check-sdist = "check_sdist.__main__:main"
[project.entry-points."validate_pyproject.tool_schema"]
check-sdist = "check_sdist.schema:get_schema"

[dependency-groups]
test = [
"pytest >=7",
"pytest-cov >=3",
"pyproject-hooks !=1.1.0",
"validate-pyproject >=0.16",
]


[tool.hatch]
version.path = "src/check_sdist/__init__.py"
envs.default.features = ["test"]
envs.hatch-test.features = ["test"]


[tool.uv]
dev-dependencies = ["check-sdist[test]"]


[tool.pytest.ini_options]
minversion = "6.0"
minversion = "7.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = [
Expand Down
Loading