nox-uv 0.6.0__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nox-uv
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Facilitate nox integration with uv for Python projects
5
- Project-URL: Homepage, https://github.com/dantebben/nox-uv
6
- Project-URL: Repository, https://github.com/dantebben/nox-uv
7
- Project-URL: Issues, https://github.com/dantebben/nox-uv/issues
5
+ Keywords: nox,uv
6
+ Author: Dan Tebben
8
7
  Author-email: Dan Tebben <dantebben@gmail.com>
9
8
  License-Expression: MIT
10
9
  License-File: LICENSE.txt
11
- Keywords: nox,uv
12
10
  Classifier: Development Status :: 4 - Beta
13
11
  Classifier: Intended Audience :: Developers
14
12
  Classifier: License :: OSI Approved :: MIT License
@@ -22,8 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
22
20
  Classifier: Programming Language :: Python :: 3.13
23
21
  Classifier: Topic :: Software Development :: Testing
24
22
  Classifier: Typing :: Typed
23
+ Requires-Dist: nox>=2025.5.1
25
24
  Requires-Python: >=3.9
26
- Requires-Dist: nox>=2025.05.01
25
+ Project-URL: Homepage, https://github.com/dantebben/nox-uv
26
+ Project-URL: Issues, https://github.com/dantebben/nox-uv/issues
27
+ Project-URL: Repository, https://github.com/dantebben/nox-uv
27
28
  Description-Content-Type: text/markdown
28
29
 
29
30
  ## Intro
@@ -85,6 +86,8 @@ Within, your `noxfile.py`:
85
86
  dependencies.
86
87
  - `uv sync` is used to install dependencies so that their versions are constrained by
87
88
  `uv.lock`.
89
+ - By default (configurable with the `uv_sync_locked` parameter), `uv.lock` is also
90
+ validated to be up to date.
88
91
 
89
92
  ```py
90
93
  from nox import Session, options
@@ -57,6 +57,8 @@ Within, your `noxfile.py`:
57
57
  dependencies.
58
58
  - `uv sync` is used to install dependencies so that their versions are constrained by
59
59
  `uv.lock`.
60
+ - By default (configurable with the `uv_sync_locked` parameter), `uv.lock` is also
61
+ validated to be up to date.
60
62
 
61
63
  ```py
62
64
  from nox import Session, options
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nox-uv"
3
- version = "0.6.0"
3
+ version = "0.6.1"
4
4
  description = "Facilitate nox integration with uv for Python projects"
5
5
  keywords = ["nox", "uv"]
6
6
  readme = "README.md"
@@ -36,17 +36,15 @@ Repository = "https://github.com/dantebben/nox-uv"
36
36
  Issues = "https://github.com/dantebben/nox-uv/issues"
37
37
 
38
38
  [build-system]
39
- requires = ["hatchling"]
40
- build-backend = "hatchling.build"
39
+ requires = ["uv_build>=0.7.19,<0.8.0"]
40
+ build-backend = "uv_build"
41
41
 
42
42
  [dependency-groups]
43
43
  lint = [
44
44
  "ruff>=0.9.7",
45
45
  ]
46
46
  test = [
47
- # TODO: Remove this upper bound with pytest-cov fixes issues with filterwarnings = ["error"]
48
- # https://github.com/pytest-dev/pytest-cov/issues/693
49
- "pytest<8.4.0",
47
+ "pytest>=8.4.0",
50
48
  "pytest-cov>=6.0.0",
51
49
  ]
52
50
  type_check = [
@@ -59,9 +57,7 @@ default-groups = "all"
59
57
  [tool.mypy]
60
58
  ignore_missing_imports = true
61
59
  strict = true
62
- # TODO: Remove this when explicit-override is enabled by default in strict mode
63
- # https://github.com/python/mypy/issues/17511
64
- enable_error_code = ["explicit-override"]
60
+ enable_error_code = ["deprecated", "explicit-override"]
65
61
 
66
62
 
67
63
  [tool.ruff]
@@ -1,7 +0,0 @@
1
- # For information about this file, see: https://editorconfig.org/
2
- root = true
3
-
4
- # For ease of fitting multiple editor panes side by side consistently, set all files types to use
5
- # the same relaxed max line length permitted in PEP 8.
6
- [*]
7
- max_line_length = 99
@@ -1,48 +0,0 @@
1
- name: CI
2
-
3
- on: [push, pull_request]
4
-
5
- env:
6
- UV_VERSION: "0.7.12"
7
-
8
- jobs:
9
- test:
10
- runs-on: ubuntu-24.04
11
- strategy:
12
- matrix:
13
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13" ]
14
- steps:
15
- - uses: actions/checkout@v4
16
- - name: Install uv
17
- uses: astral-sh/setup-uv@v5
18
- with:
19
- version: ${{ env.UV_VERSION }}
20
- - name: Set up Python ${{ matrix.python-version }}
21
- uses: actions/setup-python@v5
22
- with:
23
- python-version: ${{ matrix.python-version }}
24
- - name: Install Package
25
- run: uv sync --locked --no-default-groups
26
- - name: Test with Nox
27
- run: uv run nox -s test-${{ matrix.python-version }}
28
- quality:
29
- runs-on: ubuntu-24.04
30
- strategy:
31
- matrix:
32
- nox-session: ["lint", "type_check"]
33
- steps:
34
- - uses: actions/checkout@v4
35
- - name: Install uv
36
- uses: astral-sh/setup-uv@v5
37
- with:
38
- version: ${{ env.UV_VERSION }}
39
- - name: Set up Python
40
- uses: actions/setup-python@v5
41
- with:
42
- python-version-file: ".python-version"
43
- - name: Install dependencies
44
- run: uv sync --locked --no-default-groups
45
- - name: Test with Nox
46
- run: uv run nox -s ${{ matrix.nox-session }}
47
-
48
-
nox_uv-0.6.0/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- .vscode
2
- .idea
3
- .mypy_cache
4
- .nox
5
- .pytest_cache
6
- dist
7
- htmlcov
8
- __pycache__
9
- *.pyc
10
- *.egg-info
11
- .coverage
12
- .coverage.*
@@ -1 +0,0 @@
1
- 3.12
nox_uv-0.6.0/noxfile.py DELETED
@@ -1,72 +0,0 @@
1
- from nox import Session, options, parametrize
2
-
3
- from nox_uv import session
4
-
5
- options.error_on_external_run = True
6
- options.default_venv_backend = "uv"
7
- options.sessions = ["lint", "type_check", "test"]
8
-
9
-
10
- @session(
11
- python=["3.9", "3.10", "3.11", "3.12", "3.13"],
12
- uv_groups=["test"],
13
- )
14
- def test(s: Session) -> None:
15
- s.run(
16
- "python",
17
- "-m",
18
- "pytest",
19
- "--cov=nox_uv",
20
- "--cov-branch",
21
- "--cov-report=html",
22
- "--cov-report=term",
23
- "--cov-fail-under=100",
24
- "tests",
25
- *s.posargs,
26
- )
27
-
28
-
29
- @session(uv_only_groups=["lint"])
30
- @parametrize(
31
- "command",
32
- [
33
- # During formatting, additionally sort imports and remove unused imports.
34
- [
35
- "ruff",
36
- "check",
37
- ".",
38
- "--select",
39
- "I",
40
- "--select",
41
- "F401",
42
- "--extend-fixable",
43
- "F401",
44
- "--fix",
45
- ],
46
- ["ruff", "format", "."],
47
- ],
48
- )
49
- def fmt(s: Session, command: list[str]) -> None:
50
- s.run(*command)
51
-
52
-
53
- @session(uv_only_groups=["lint"])
54
- @parametrize(
55
- "command",
56
- [
57
- ["ruff", "check", "."],
58
- ["ruff", "format", "--check", "."],
59
- ],
60
- )
61
- def lint(s: Session, command: list[str]) -> None:
62
- s.run(*command)
63
-
64
-
65
- @session(uv_only_groups=["lint"])
66
- def lint_fix(s: Session) -> None:
67
- s.run("ruff", "check", ".", "--extend-fixable", "F401", "--fix")
68
-
69
-
70
- @session(uv_groups=["test", "type_check"])
71
- def type_check(s: Session) -> None:
72
- s.run("mypy", "src", "tests", "noxfile.py")
File without changes
@@ -1 +0,0 @@
1
- 3.12
File without changes
@@ -1,115 +0,0 @@
1
- from nox import Session, options
2
-
3
- from nox_uv import session
4
-
5
- options.default_venv_backend = "uv"
6
- options.sessions = [
7
- "check_python_version",
8
- "install_nothing",
9
- "test_group",
10
- "all_groups",
11
- "all_extras",
12
- "one_extra",
13
- "correct_python",
14
- "only_groups",
15
- "no_install_project",
16
- "do_install_project",
17
- ]
18
-
19
-
20
- @session(venv_backend="none")
21
- def check_python_version(s: Session) -> None:
22
- s.run("python", "--version")
23
-
24
-
25
- @session
26
- def install_nothing(s: Session) -> None:
27
- r = s.run("uv", "pip", "list", silent=True)
28
- assert isinstance(r, str)
29
- assert "nox-uv" in r
30
- assert "scapy" not in r
31
- assert "pyyaml" not in r
32
- assert "networkx" not in r
33
- assert "ruff" not in r
34
- assert "pytest-cov" not in r
35
- assert "mypy" not in r
36
-
37
-
38
- @session(uv_groups=["test"])
39
- def test_group(s: Session) -> None:
40
- r = s.run("uv", "pip", "list", silent=True)
41
- assert isinstance(r, str)
42
- assert "pytest-cov" in r
43
- assert "networkx" not in r
44
- assert "ruff" not in r
45
-
46
-
47
- @session(uv_all_groups=True)
48
- def all_groups(s: Session) -> None:
49
- r = s.run("uv", "pip", "list", silent=True)
50
- assert isinstance(r, str)
51
- assert "networkx" in r
52
- assert "ruff" in r
53
- assert "pytest-cov" in r
54
- assert "mypy" in r
55
-
56
-
57
- @session(uv_all_extras=True)
58
- def all_extras(s: Session) -> None:
59
- r = s.run("uv", "pip", "list", silent=True)
60
- assert isinstance(r, str)
61
- assert "networkx" not in r
62
- assert "scapy" in r
63
- assert "pyyaml" in r
64
-
65
-
66
- @session(uv_extras=["pyyaml"], uv_sync_locked=False) # Test without the --locked flag
67
- def one_extra(s: Session) -> None:
68
- r = s.run("uv", "pip", "list", silent=True)
69
- assert isinstance(r, str)
70
- assert "networkx" not in r
71
- assert "pyyaml" in r
72
-
73
-
74
- @session(python=["3.10"])
75
- def correct_python(s: Session) -> None:
76
- assert s.python == "3.10"
77
- v = s.run("python", "--version", silent=True)
78
- if isinstance(v, str):
79
- assert "Python 3.10" in v
80
- else:
81
- raise RuntimeError("Python version was not returned.")
82
-
83
-
84
- @session(uv_only_groups=["lint"])
85
- def only_groups(s: Session) -> None:
86
- r = s.run("uv", "pip", "list", silent=True)
87
- assert isinstance(r, str)
88
- assert "ruff" in r
89
- assert "nox-uv" not in r
90
-
91
-
92
- @session(uv_no_install_project=True, uv_groups=["lint"])
93
- def no_install_project(s: Session) -> None:
94
- r = s.run("uv", "pip", "list", silent=True)
95
- assert isinstance(r, str)
96
- assert "ruff" in r
97
- assert "subproject" not in r
98
-
99
-
100
- @session(uv_groups=["lint"])
101
- def do_install_project(s: Session) -> None:
102
- r = s.run("uv", "pip", "list", silent=True)
103
- assert isinstance(r, str)
104
- assert "ruff" in r
105
- assert "subproject" in r
106
-
107
-
108
- @session(uv_groups=["type_check"], venv_backend="virtualenv")
109
- def failed_virtualenv(s: Session) -> None:
110
- pass
111
-
112
-
113
- @session(uv_groups=["type_check"], venv_backend="none")
114
- def failed_venv_none(s: Session) -> None:
115
- pass
@@ -1,46 +0,0 @@
1
- [project]
2
- name = "subproject"
3
- version = "0.1.0"
4
- description = "Project for testing nox-uv"
5
- readme = "README.md"
6
- requires-python = ">=3.9"
7
- classifiers = [
8
- "Private :: Do Not Upload",
9
- ]
10
- dependencies = [
11
- "nox-uv",
12
- ]
13
-
14
- [tool.uv.sources]
15
- nox-uv = { path = "../../", editable = true }
16
-
17
- [build-system]
18
- requires = ["hatchling"]
19
- build-backend = "hatchling.build"
20
-
21
-
22
- [project.optional-dependencies]
23
- pyyaml = ["pyyaml"]
24
- scapy = ["scapy"]
25
-
26
- [dependency-groups]
27
- never-used = [
28
- "networkx"
29
- ]
30
-
31
- lint = [
32
- "ruff>=0.9.7",
33
- ]
34
- test = [
35
- "pytest-cov>=6.0.0",
36
- ]
37
- type_check = [
38
- "mypy>=1.15.0",
39
- ]
40
-
41
- [tool.uv]
42
- default-groups = [
43
- "lint",
44
- "test",
45
- "type_check",
46
- ]
File without changes
@@ -1,6 +0,0 @@
1
- def main() -> None:
2
- print("Hello from subproject!")
3
-
4
-
5
- if __name__ == "__main__":
6
- main()