Skip to content

Commit

Permalink
use uv in tox, just. Up pydantic extra-old version due to incompatibl…
Browse files Browse the repository at this point in the history
…es with python 3.12-exta-old
  • Loading branch information
lubaskinc0de committed Aug 9, 2024
1 parent 8135401 commit 6386a56
Show file tree
Hide file tree
Showing 20 changed files with 98 additions and 124 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
just-version: 1.14.0

- name: Setup environment to run tox
env:
UV_SYSTEM_PYTHON: 1
run:
just setup-runner

Expand Down Expand Up @@ -78,6 +80,8 @@ jobs:
just-version: 1.14.0

- name: Setup environment to run tox
env:
UV_SYSTEM_PYTHON: 1
run:
just setup-runner

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test_all_oses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
UV_SYSTEM_PYTHON: 1

jobs:
testing:
name: Testing (${{ matrix.python_version.tox }}, ${{ matrix.os }})
Expand Down Expand Up @@ -44,6 +47,8 @@ jobs:
just-version: 1.14.0

- name: Setup environment to run tox
env:
UV_SYSTEM_PYTHON: 1
run:
just setup-runner

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/bench_nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def filtered_hubs(self) -> Iterable[HubDescription]:
return BENCHMARK_HUBS

def filtered_envs(self) -> Iterable[EnvDescription]:
if self.env_include:
if self.env_include and self.env_exclude:
wild_envs = set(self.env_exclude) - {env_description.key for env_description in BENCHMARK_ENVS}
if wild_envs:
raise ValueError(f"Unknown envs {wild_envs}")
Expand Down
10 changes: 5 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ set windows-powershell := true
# prepare venv and repo for developing
@bootstrap:
pip install -r requirements/pre.txt
pip install -e .
pip install -r requirements/dev.txt
uv pip install -e .
uv pip install -r requirements/dev.txt
pre-commit
pre-commit install

# sync version of installed packages
@venv-sync:
pip-sync requirements/pre.txt requirements/dev.txt
pip install -e .
uv pip sync requirements/pre.txt requirements/dev.txt
uv pip install -e .

# run all linters
@lint:
Expand Down Expand Up @@ -68,7 +68,7 @@ doc_target := "docs-build"
[private]
@setup-runner:
pip install -r requirements/pre.txt
pip install -r requirements/runner.txt
uv pip install -r requirements/runner.txt

[private]
@inv *ARGS:
Expand Down
10 changes: 3 additions & 7 deletions requirements/bench.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/bench.txt --strip-extras requirements/raw/bench.txt
#
# This file was autogenerated by uv via the following command:
# uv pip compile requirements/raw/bench.txt -o requirements/bench.txt --allow-unsafe --strip-extras --no-strip-markers
-e ./benchmarks
# via -r requirements/raw/bench.txt
annotated-types==0.6.0
Expand All @@ -20,7 +16,7 @@ marshmallow==3.20.1
# via -r requirements/raw/bench.txt
mashumaro==3.10
# via -r requirements/raw/bench.txt
msgspec==0.18.4 ; implementation_name != "pypy"
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench.txt
packaging==24.0
# via
Expand Down
10 changes: 3 additions & 7 deletions requirements/bench_pypy38.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/bench_pypy38.txt --strip-extras requirements/raw/bench_pypy38.txt
#
# This file was autogenerated by uv via the following command:
# uv pip compile requirements/raw/bench_pypy38.txt -o requirements/bench_pypy38.txt --allow-unsafe --strip-extras --no-strip-markers
-e ./benchmarks
# via -r requirements/raw/bench_pypy38.txt
annotated-types==0.6.0
Expand All @@ -20,7 +16,7 @@ marshmallow==3.20.1
# via -r requirements/raw/bench_pypy38.txt
mashumaro==3.10
# via -r requirements/raw/bench_pypy38.txt
msgspec==0.18.4 ; implementation_name != "pypy"
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench_pypy38.txt
packaging==24.0
# via
Expand Down
53 changes: 27 additions & 26 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/dev.txt --strip-extras requirements/raw/dev.txt
#
# This file was autogenerated by uv via the following command:
# uv pip compile requirements/raw/dev.txt -o requirements/dev.txt --allow-unsafe --strip-extras --no-strip-markers
-e ./benchmarks
# via -r requirements/raw/bench.txt
-e ./tests/tests_helpers
Expand All @@ -24,7 +20,7 @@ beautifulsoup4==4.12.3
# via furo
build==1.2.1
# via pip-tools
cachetools==5.3.3
cachetools==5.4.0
# via tox
cattrs==23.1.2
# via -r requirements/raw/bench.txt
Expand Down Expand Up @@ -69,7 +65,7 @@ docutils==0.20.1
# sphinx-paramlinks
docutils-stubs==0.0.22
# via -r requirements/raw/doc.txt
filelock==3.13.4
filelock==3.15.4
# via
# tox
# virtualenv
Expand All @@ -83,7 +79,7 @@ gitdb==4.0.11
# via gitpython
gitpython==3.1.43
# via -r requirements/raw/doc.txt
greenlet==3.0.3
greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'
# via sqlalchemy
identify==2.5.36
# via pre-commit
Expand Down Expand Up @@ -126,7 +122,7 @@ mdit-py-plugins==0.4.0
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
msgspec==0.18.4 ; implementation_name != "pypy"
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench.txt
mypy==1.9.0
# via -r requirements/raw/lint.txt
Expand All @@ -140,7 +136,7 @@ numpy==1.26.4
# via
# contourpy
# matplotlib
packaging==24.0
packaging==24.1
# via
# build
# marshmallow
Expand All @@ -150,15 +146,20 @@ packaging==24.0
# pytest
# sphinx
# tox
# tox-uv
pbr==6.0.0
# via sphinxcontrib-apidoc
phonenumberslite==8.13.26
# via -r requirements/raw/test_extra_none.txt
pillow==10.3.0
# via matplotlib
pip==24.0
# via
# -r requirements/raw/pre.txt
# pip-tools
pip-tools==7.4.1
# via -r requirements/raw/dev.txt
platformdirs==4.2.0
platformdirs==4.2.2
# via
# tox
# virtualenv
Expand Down Expand Up @@ -194,7 +195,7 @@ pyparsing==3.1.2
# via matplotlib
pyperf==2.6.1
# via -r requirements/raw/bench.txt
pyproject-api==1.6.1
pyproject-api==1.7.1
# via tox
pyproject-hooks==1.0.0
# via
Expand All @@ -220,6 +221,11 @@ ruff==0.4.1
# via -r requirements/raw/lint.txt
schematics==2.1.1
# via -r requirements/raw/bench.txt
setuptools==69.5.1
# via
# -r requirements/raw/dev.txt
# nodeenv
# pip-tools
six==1.16.0
# via
# mando
Expand Down Expand Up @@ -278,7 +284,9 @@ toml==0.10.2
# via vulture
towncrier==23.11.0
# via -r requirements/raw/dev.txt
tox==4.14.2
tox==4.17.1
# via tox-uv
tox-uv==1.11.1
# via -r requirements/raw/runner.txt
typing-extensions==4.11.0
# via
Expand All @@ -289,7 +297,11 @@ typing-extensions==4.11.0
# sqlalchemy
urllib3==2.2.1
# via requests
virtualenv==20.25.3
uv==0.2.34
# via
# -r requirements/raw/pre.txt
# tox-uv
virtualenv==20.26.3
# via
# pre-commit
# tox
Expand All @@ -299,14 +311,3 @@ wheel==0.43.0
# via
# -r requirements/raw/pre.txt
# pip-tools

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via
# -r requirements/raw/pre.txt
# pip-tools
setuptools==69.5.1
# via
# -r requirements/raw/dev.txt
# nodeenv
# pip-tools
10 changes: 3 additions & 7 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/doc.txt --strip-extras requirements/raw/doc.txt
#
# This file was autogenerated by uv via the following command:
# uv pip compile requirements/raw/doc.txt -o requirements/doc.txt --allow-unsafe --strip-extras --no-strip-markers
-e ./benchmarks
# via -r requirements/raw/bench.txt
alabaster==0.7.16
Expand Down Expand Up @@ -63,7 +59,7 @@ mdit-py-plugins==0.4.0
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
msgspec==0.18.4 ; implementation_name != "pypy"
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench.txt
myst-parser==2.0.0
# via -r requirements/raw/doc.txt
Expand Down
20 changes: 7 additions & 13 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/lint.txt --strip-extras requirements/raw/lint.txt
#
# This file was autogenerated by uv via the following command:
# uv pip compile requirements/raw/lint.txt -o requirements/lint.txt --allow-unsafe --strip-extras --no-strip-markers
-e ./benchmarks
# via -r requirements/raw/bench.txt
-e ./tests/tests_helpers
Expand All @@ -30,7 +26,7 @@ cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
colorama==0.4.6 ; python_version > '3.4'
# via radon
contourpy==1.2.1
# via matplotlib
Expand Down Expand Up @@ -67,7 +63,7 @@ gitdb==4.0.11
# via gitpython
gitpython==3.1.43
# via -r requirements/raw/doc.txt
greenlet==3.0.3
greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'
# via sqlalchemy
identify==2.5.36
# via pre-commit
Expand Down Expand Up @@ -105,7 +101,7 @@ mdit-py-plugins==0.4.0
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
msgspec==0.18.4 ; implementation_name != "pypy"
msgspec==0.18.4 ; implementation_name != 'pypy'
# via -r requirements/raw/bench.txt
mypy==1.9.0
# via -r requirements/raw/lint.txt
Expand Down Expand Up @@ -184,6 +180,8 @@ ruff==0.4.1
# via -r requirements/raw/lint.txt
schematics==2.1.1
# via -r requirements/raw/bench.txt
setuptools==69.5.1
# via nodeenv
six==1.16.0
# via
# mando
Expand Down Expand Up @@ -253,7 +251,3 @@ virtualenv==20.25.3
# via pre-commit
vulture==2.10
# via -r requirements/raw/lint.txt

# The following packages are considered to be unsafe in a requirements file:
setuptools==69.5.1
# via nodeenv
16 changes: 6 additions & 10 deletions requirements/pre.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/pre.txt --strip-extras requirements/raw/pre.txt
#
wheel==0.43.0
# via -r requirements/raw/pre.txt

# The following packages are considered to be unsafe in a requirements file:
# This file was autogenerated by uv via the following command:
# uv pip compile requirements/raw/pre.txt -o requirements/pre.txt --allow-unsafe --strip-extras --no-strip-markers
pip==24.0
# via -r requirements/raw/pre.txt
uv==0.2.34
# via -r requirements/raw/pre.txt
wheel==0.43.0
# via -r requirements/raw/pre.txt
1 change: 1 addition & 0 deletions requirements/raw/pre.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pip==24.0
wheel==0.43.0
uv==0.2.34
2 changes: 1 addition & 1 deletion requirements/raw/runner.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tox==4.14.2
tox-uv==1.11.1
invoke==2.2.0
coverage==7.4.4
2 changes: 1 addition & 1 deletion requirements/raw/test_extra_old.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r test_extra_none.txt
attrs==21.3.0
sqlalchemy==2.0.0
pydantic==2.0.0
pydantic==2.1.0

# pydantic-core has dependency:
# `typing-extensions >=4.6.0,<4.7.0; platform_python_implementation == "PyPy"`
Expand Down
Loading

0 comments on commit 6386a56

Please sign in to comment.