nox-uv 0.5.0__py3-none-any.whl → 0.6.0__py3-none-any.whl
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.
- nox_uv/__init__.py +7 -2
- {nox_uv-0.5.0.dist-info → nox_uv-0.6.0.dist-info}/METADATA +7 -6
- nox_uv-0.6.0.dist-info/RECORD +6 -0
- nox_uv-0.5.0.dist-info/RECORD +0 -6
- {nox_uv-0.5.0.dist-info → nox_uv-0.6.0.dist-info}/WHEEL +0 -0
- {nox_uv-0.5.0.dist-info → nox_uv-0.6.0.dist-info}/licenses/LICENSE.txt +0 -0
nox_uv/__init__.py
CHANGED
|
@@ -26,6 +26,7 @@ def session(
|
|
|
26
26
|
uv_only_groups: Sequence[str] = (),
|
|
27
27
|
uv_all_extras: bool = False,
|
|
28
28
|
uv_all_groups: bool = False,
|
|
29
|
+
uv_no_install_project: bool = False,
|
|
29
30
|
uv_sync_locked: bool = True,
|
|
30
31
|
**kwargs: dict[str, Any],
|
|
31
32
|
) -> Callable[..., Callable[..., R]]:
|
|
@@ -34,7 +35,7 @@ def session(
|
|
|
34
35
|
Args:
|
|
35
36
|
args: Positional arguments are forwarded to ``nox.session``.
|
|
36
37
|
kwargs: Keyword arguments are forwarded to ``nox.session``. Used to catch any future
|
|
37
|
-
arguments of nox.session that aren't
|
|
38
|
+
arguments of nox.session that aren't explicitly captured in nox_uv.session.
|
|
38
39
|
|
|
39
40
|
Returns:
|
|
40
41
|
The decorated session function.
|
|
@@ -55,6 +56,7 @@ def session(
|
|
|
55
56
|
uv_all_extras=uv_all_extras,
|
|
56
57
|
uv_all_groups=uv_all_groups,
|
|
57
58
|
uv_only_groups=uv_only_groups,
|
|
59
|
+
uv_no_install_project=uv_no_install_project,
|
|
58
60
|
uv_sync_locked=uv_sync_locked,
|
|
59
61
|
**kwargs,
|
|
60
62
|
) # type: ignore
|
|
@@ -84,6 +86,9 @@ def session(
|
|
|
84
86
|
if uv_all_extras:
|
|
85
87
|
extended_cmd.append("--all-extras")
|
|
86
88
|
|
|
89
|
+
if uv_no_install_project:
|
|
90
|
+
extended_cmd.append("--no-install-project")
|
|
91
|
+
|
|
87
92
|
sync_cmd += extended_cmd
|
|
88
93
|
|
|
89
94
|
@functools.wraps(function)
|
|
@@ -104,7 +109,7 @@ def session(
|
|
|
104
109
|
else:
|
|
105
110
|
if len(extended_cmd) > 0:
|
|
106
111
|
raise s.error(
|
|
107
|
-
'Using "uv" specific
|
|
112
|
+
'Using "uv" specific parameters is not allowed outside of a "uv" '
|
|
108
113
|
"venv_backend.\n"
|
|
109
114
|
f"Check the venv_backend, or the {extended_cmd} parameters."
|
|
110
115
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nox-uv
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Facilitate nox integration with uv for Python projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/dantebben/nox-uv
|
|
6
6
|
Project-URL: Repository, https://github.com/dantebben/nox-uv
|
|
@@ -44,8 +44,8 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
|
|
45
45
|
[mypy-badge]: https://www.mypy-lang.org/static/mypy_badge.svg
|
|
46
46
|
|
|
47
|
-
`nox-uv` is a simple drop-in replacement for [nox](https://nox.thea.codes/)'s `@nox.session` that
|
|
48
|
-
dependencies constrained by [uv](https://docs.astral.sh/uv/)'s lockfile.
|
|
47
|
+
`nox-uv` is a simple drop-in replacement for [nox](https://nox.thea.codes/)'s `@nox.session` that
|
|
48
|
+
installs dependencies constrained by [uv](https://docs.astral.sh/uv/)'s lockfile.
|
|
49
49
|
|
|
50
50
|
## Usage
|
|
51
51
|
|
|
@@ -107,7 +107,7 @@ def type_check(s: Session) -> None:
|
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
@session(uv_only_groups=["lint"])
|
|
110
|
-
def
|
|
110
|
+
def lint(s: Session) -> None:
|
|
111
111
|
s.run("ruff", "check", ".")
|
|
112
112
|
s.run("ruff", "format", "--check", ".")
|
|
113
113
|
```
|
|
@@ -124,10 +124,11 @@ def type_check(s: Session) -> None:
|
|
|
124
124
|
- `uv_groups`: list of `uv` _dependency-groups_
|
|
125
125
|
- `uv_extras`: list of `uv` _optional-dependencies_
|
|
126
126
|
- `uv_only_groups`: list of `uv` _only-groups_ to include. Prevents installation of project
|
|
127
|
-
_dependencies_
|
|
127
|
+
_dependencies_
|
|
128
128
|
- `uv_all_extras`: boolean to install all _optional-dependencies_ from `pyproject.toml`
|
|
129
129
|
- `uv_all_groups`: boolean to install all _dependency-groups_
|
|
130
|
-
- `
|
|
130
|
+
- `uv_no_install_project`: boolean to not install the current project
|
|
131
|
+
- `uv_sync_locked`: boolean to validate that `uv.lock` is up to date
|
|
131
132
|
|
|
132
133
|
|
|
133
134
|
## Inspiration
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
nox_uv/__init__.py,sha256=mMZxMHQNKNTp4AblBvFa6nBrn28Nx7iME_TpO0XBV2E,3979
|
|
2
|
+
nox_uv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
nox_uv-0.6.0.dist-info/METADATA,sha256=j-v9Xg2ymDAEoq2SGHjU2JZbv383S7Qu7PQc661LZN0,4662
|
|
4
|
+
nox_uv-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
+
nox_uv-0.6.0.dist-info/licenses/LICENSE.txt,sha256=iTZ5ALF1isnM6Ey9Tjom0XIGBBysArB0I2NHZ9a-b8I,1067
|
|
6
|
+
nox_uv-0.6.0.dist-info/RECORD,,
|
nox_uv-0.5.0.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
nox_uv/__init__.py,sha256=saOMVr75kYQRM1F2y0WhswoalybmXaeqyXWiQw1PtOs,3799
|
|
2
|
-
nox_uv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
nox_uv-0.5.0.dist-info/METADATA,sha256=E0z2X2Ls22uPh4gfkupWkBLlWSAPlAe7LqQGLrlskBM,4599
|
|
4
|
-
nox_uv-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
-
nox_uv-0.5.0.dist-info/licenses/LICENSE.txt,sha256=iTZ5ALF1isnM6Ey9Tjom0XIGBBysArB0I2NHZ9a-b8I,1067
|
|
6
|
-
nox_uv-0.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|