Skip to content

Commit

Permalink
chore: Bump Nox (#2865)
Browse files Browse the repository at this point in the history
* chore: Require uv be used with Nox (#2866)

* chore: Require uv be used with Nox

* Use uv more broadly

* Move `UV_CONSTRAINT` to the top

* Remove redundant installation of griffe

* chore: Bump Nox
  • Loading branch information
edgarrmondragon authored Feb 10, 2025
1 parent 61a0b88 commit 99b726f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "cookiecutter/**"
- "e2e-tests/cookiecutters/**"
- ".github/workflows/cookiecutter-e2e.yml"
- ".github/workflows/resources/requirements.txt"
push:
branches:
- main
Expand All @@ -17,6 +18,7 @@ on:
- "cookiecutter/**"
- "e2e-tests/cookiecutters/**"
- ".github/workflows/cookiecutter-e2e.yml"
- ".github/workflows/resources/requirements.txt"
workflow_dispatch:

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resources/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
griffe~=1.5
nox==2024.10.9
nox==2025.2.9
pre-commit==4.1.0
twine==6.1.0
15 changes: 6 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import nox

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

RUFF_OVERRIDES = """\
Expand Down Expand Up @@ -39,7 +39,7 @@
"test_cookiecutter",
]

dependency_groups = nox.project.load_toml("pyproject.toml")["dependency-groups"]
dependency_groups = nox.project.load_toml()["dependency-groups"]
test_dependencies: list[str] = dependency_groups["dev"]
typing_dependencies: list[str] = dependency_groups["typing"]

Expand Down Expand Up @@ -219,9 +219,7 @@ def test_cookiecutter(session: nox.Session, replay_file_path: Path) -> None:
# TODO: Use uvx
# https://github.com/wntrblm/nox/pull/920
session.run(
"uv",
"tool",
"run",
"uvx",
"cookiecutter",
"--replay-file",
str(replay_file),
Expand All @@ -243,11 +241,11 @@ def test_cookiecutter(session: nox.Session, replay_file_path: Path) -> None:

# Check that the project can be built for distribution
session.run("uv", "build")
session.run("uv", "tool", "run", "twine", "check", "dist/*")
session.run("uvx", "twine", "check", "dist/*")

session.run("git", "init", "-b", "main", external=True)
session.run("git", "add", ".", external=True)
session.run("uv", "tool", "run", "pre-commit", "run", "--all-files", external=True)
session.run("uvx", "pre-commit", "run", "--all-files", external=True)


@nox.session(name="version-bump")
Expand Down Expand Up @@ -276,7 +274,6 @@ def version_bump(session: nox.Session) -> None:
def api_changes(session: nox.Session) -> None:
"""Check for API changes."""
args = [
"griffe",
"check",
"singer_sdk",
]
Expand All @@ -287,4 +284,4 @@ def api_changes(session: nox.Session) -> None:
if "GITHUB_ACTIONS" in os.environ:
args.append("-f=github")

session.run("uv", "tool", "run", *args, external=True)
session.run("uvx", "griffe", *args, external=True)

0 comments on commit 99b726f

Please sign in to comment.