Skip to content

Commit a085ca2

Browse files
committed
chore: fix session name references
1 parent c139a8b commit a085ca2

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

{{cookiecutter.project_name}}/noxfile.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
MIN_PYTHON_VERSION_SLUG: int = int("{{cookiecutter.min_python_version}}".lstrip("3."))
1414
MAX_PYTHON_VERSION_SLUG: int = int("{{cookiecutter.max_python_version}}".lstrip("3."))
1515

16-
# Python versions to test against. As of April {{cookiecutter.copyright_year}}, generally {{cookiecutter.min_python_version}}-{{cookiecutter.max_python_version}} are actively supported.
17-
# See: https://devguide.python.org/versions/ and https://endoflife.date/python
1816
PYTHON_VERSIONS: List[str] = [
1917
f"3.{VERSION_SLUG}" for VERSION_SLUG in range(MIN_PYTHON_VERSION_SLUG, MAX_PYTHON_VERSION_SLUG + 1)
2018
]
@@ -25,10 +23,6 @@
2523
PACKAGE_NAME: str = "{{cookiecutter.package_name}}"
2624

2725

28-
# --- GRANULAR TASK AUTOMATION SESSIONS ---
29-
# These sessions perform specific types of checks or builds.
30-
# Their names align with modular CI workflow files.
31-
3226
@nox.session(python=DEFAULT_PYTHON_VERSION, name="format-python")
3327
def format_python(session: Session) -> None:
3428
"""Run Python code formatter (Ruff format)."""
@@ -173,7 +167,7 @@ def build_container(session: Session) -> None:
173167
def publish_python(session: Session) -> None:
174168
"""Publish sdist and wheel packages to PyPI via uv publish.
175169
176-
Requires packages to be built first (`nox -s build_python` or `nox -s build`).
170+
Requires packages to be built first (`nox -s build-python` or `nox -s build`).
177171
Requires TWINE_USERNAME/TWINE_PASSWORD or TWINE_API_KEY environment variables set (usually in CI).
178172
"""
179173
session.log("Checking built packages with Twine.")
@@ -266,36 +260,33 @@ def build(session: Session) -> None:
266260
session.notify("build_rust") # Build Rust crate first if Rust is enabled
267261
{% endif %}
268262
# Then build the Python package (uv build)
269-
session.notify("build_python") # Build Python sdist/wheel
263+
session.notify("build-python") # Build Python sdist/wheel
270264

271265

272266
@nox.session(python=DEFAULT_PYTHON_VERSION) # Run the orchestrator on the default Python version
273267
def publish(session: Session) -> None:
274268
"""Orchestrates publishing all project artifacts (Python packages, potentially Rust)."""
275269
session.log(f"Queueing publish sessions for py{session.python} if applicable.")
276-
session.notify("publish_python") # Publish Python sdist/wheel
270+
session.notify("publish-python") # Publish Python sdist/wheel
277271
# Note: publish_rust session might be notified here if needed.
278272

279273

280274
@nox.session(python=PYTHON_VERSIONS)
281275
def check(session: Session) -> None:
282276
"""Run primary quality checks (format, lint, typecheck, security)."""
283277
session.log(f"Queueing core check sessions for py{session.python} if applicable.")
284-
# Notify granular sessions. Their python version is controlled by their decorators.
285-
# Sessions without explicit python versions or limited run on DEFAULT_PYTHON_VERSION.
286-
session.notify("format_python")
287-
session.notify("lint_python")
288-
session.notify("typecheck_python")
289-
session.notify("security_python")
290-
session.notify("security_deps")
278+
session.notify("format-python")
279+
session.notify("lint-python")
280+
session.notify("typecheck")
281+
session.notify("security-python")
291282

292283

293284
@nox.session(python=PYTHON_VERSIONS, name="full-check")
294285
def full_check(session: Session) -> None:
295286
"""Run all core quality checks and tests."""
296287
session.log(f"Queueing all check and test sessions for py{session.python} if applicable.")
297288
session.notify("check")
298-
session.notify("test_python")
289+
session.notify("tests-python")
299290

300291

301292
@nox.session(python=DEFAULT_PYTHON_VERSION)

0 commit comments

Comments
 (0)