From afcde3a8177dc788440e00fd3899d1961654221f Mon Sep 17 00:00:00 2001 From: Tomas Perez <142829795+coactive-tomas@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:22:07 -0500 Subject: [PATCH] Us uv for sync (#36) --- pyproject.toml | 5 ++--- pyrgo/cmds/sync.py | 9 +++++---- pyrgo/typing.py | 2 -- requirements/core.txt | 22 ++++++---------------- requirements/dev.txt | 22 ++++++---------------- 5 files changed, 19 insertions(+), 41 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0cf901b..cf01d44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pyrgo" -version = "2.2.9" +version = "2.2.10" readme = "README.md" requires-python = ">=3.9" classifiers = [ @@ -27,8 +27,7 @@ dependencies = [ "tomlkit < 1", "pdoc < 15", "mashumaro[orjson,toml] < 4", - "uv < 1", - "pip-tools < 8", + "uv >= 0.1.5, < 1", ] [project.optional-dependencies] diff --git a/pyrgo/cmds/sync.py b/pyrgo/cmds/sync.py index 35ca8bb..cec0a49 100644 --- a/pyrgo/cmds/sync.py +++ b/pyrgo/cmds/sync.py @@ -25,9 +25,10 @@ def sync(env: str) -> None: ensure_env_exist(env=env, config=config, where="lock-files") piptools_command = PythonCommandExec( - program="piptools", + program="uv", ).add_args( args=[ + "pip", "sync", config.requirements.joinpath(f"{env}.txt") .relative_to(config.cwd) @@ -35,12 +36,12 @@ def sync(env: str) -> None: ], ) pip_command = PythonCommandExec( - program="pip", + program="uv", ).add_args( - args=["install"], + args=["pip", "install"], ) - pip_command.add_args(args=["--no-deps", "-e", "."]) + pip_command.add_args(args=["-e", "."]) program_execution = inform_and_run_program( commands=[ diff --git a/pyrgo/typing.py b/pyrgo/typing.py index cb8d81a..b4e64b9 100644 --- a/pyrgo/typing.py +++ b/pyrgo/typing.py @@ -15,6 +15,4 @@ "pip_audit", "vulture", "pdoc", - "pip", - "piptools", ] diff --git a/requirements/core.txt b/requirements/core.txt index 09e3786..fcdf1b6 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,9 +1,8 @@ -# This file was autogenerated by uv v0.1.1 via the following command: -# uv pip compile --no-cache -o requirements/core.txt pyproject.toml +# This file was autogenerated by uv v0.1.5 via the following command: +# uv pip compile --upgrade --no-cache -o requirements/core.txt pyproject.toml boolean-py==4.0 # via license-expression build==1.0.3 - # via pip-tools cachecontrol==0.14.0 # via pip-audit certifi==2024.2.2 @@ -11,7 +10,6 @@ certifi==2024.2.2 charset-normalizer==3.3.2 # via requests click==8.1.7 - # via pip-tools cyclonedx-python-lib==6.4.1 # via pip-audit defusedxml==0.7.1 @@ -58,15 +56,12 @@ packaging==23.2 # pytest pdoc==14.4.0 pip==24.0 - # via - # pip-api - # pip-tools + # via pip-api pip-api==0.0.33 # via pip-audit pip-audit==2.7.1 pip-requirements-parser==32.0.1 # via pip-audit -pip-tools==7.3.0 pluggy==1.4.0 # via pytest py-serializable==1.0.1 @@ -87,9 +82,7 @@ requests==2.31.0 result==0.16.0 rich==13.7.0 # via pip-audit -ruff==0.2.1 -setuptools==69.1.0 - # via pip-tools +ruff==0.2.2 six==1.16.0 # via html5lib sortedcontainers==2.4.0 @@ -101,7 +94,6 @@ tomli==2.0.1 # build # mashumaro # mypy - # pip-tools # pyproject-hooks # pytest # vulture @@ -113,13 +105,11 @@ typing-extensions==4.9.0 # mashumaro # mypy # result -urllib3==2.2.0 +urllib3==2.2.1 # via requests -uv==0.1.1 +uv==0.1.5 vulture==2.11 webencodings==0.5.1 # via html5lib -wheel==0.42.0 - # via pip-tools zipp==3.17.0 # via importlib-metadata diff --git a/requirements/dev.txt b/requirements/dev.txt index 077fbcf..1475dfe 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,9 +1,8 @@ -# This file was autogenerated by uv v0.1.1 via the following command: -# uv pip compile --extra dev --no-cache -o requirements/dev.txt pyproject.toml +# This file was autogenerated by uv v0.1.5 via the following command: +# uv pip compile --upgrade --extra dev --no-cache -o requirements/dev.txt pyproject.toml boolean-py==4.0 # via license-expression build==1.0.3 - # via pip-tools cachecontrol==0.14.0 # via pip-audit certifi==2024.2.2 @@ -11,7 +10,6 @@ certifi==2024.2.2 charset-normalizer==3.3.2 # via requests click==8.1.7 - # via pip-tools coverage==7.4.1 # via pytest-cov cyclonedx-python-lib==6.4.1 @@ -60,15 +58,12 @@ packaging==23.2 # pytest pdoc==14.4.0 pip==24.0 - # via - # pip-api - # pip-tools + # via pip-api pip-api==0.0.33 # via pip-audit pip-audit==2.7.1 pip-requirements-parser==32.0.1 # via pip-audit -pip-tools==7.3.0 pluggy==1.4.0 # via pytest py-serializable==1.0.1 @@ -91,9 +86,7 @@ requests==2.31.0 result==0.16.0 rich==13.7.0 # via pip-audit -ruff==0.2.1 -setuptools==69.1.0 - # via pip-tools +ruff==0.2.2 six==1.16.0 # via html5lib sortedcontainers==2.4.0 @@ -106,7 +99,6 @@ tomli==2.0.1 # coverage # mashumaro # mypy - # pip-tools # pyproject-hooks # pytest # vulture @@ -119,13 +111,11 @@ typing-extensions==4.9.0 # mashumaro # mypy # result -urllib3==2.2.0 +urllib3==2.2.1 # via requests -uv==0.1.1 +uv==0.1.5 vulture==2.11 webencodings==0.5.1 # via html5lib -wheel==0.42.0 - # via pip-tools zipp==3.17.0 # via importlib-metadata