2025-01-06 01:26:03 +08:00
|
|
|
# Import built-in modules
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# Import third-party modules
|
|
|
|
|
import nox
|
|
|
|
|
|
|
|
|
|
ROOT = os.path.dirname(__file__)
|
|
|
|
|
|
2025-05-27 11:14:49 +08:00
|
|
|
# Ensure pypi_query_mcp is importable.
|
2025-01-06 01:26:03 +08:00
|
|
|
if ROOT not in sys.path:
|
|
|
|
|
sys.path.append(ROOT)
|
|
|
|
|
|
2025-05-27 11:25:25 +08:00
|
|
|
# Import local modules (after sys.path setup)
|
|
|
|
|
from nox_actions import codetest, lint, release # noqa: E402
|
2025-01-06 01:26:03 +08:00
|
|
|
|
2025-05-27 11:14:49 +08:00
|
|
|
# Configure nox sessions
|
2025-01-06 01:26:03 +08:00
|
|
|
nox.session(lint.lint, name="lint")
|
|
|
|
|
nox.session(lint.lint_fix, name="lint-fix")
|
|
|
|
|
nox.session(codetest.pytest, name="pytest")
|
2025-05-27 11:14:49 +08:00
|
|
|
nox.session(codetest.safety, name="safety")
|
|
|
|
|
nox.session(release.build, name="build")
|