From 2eb57a15ecc39bdaebef47dbad30293ac82e6a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 6 Sep 2024 11:00:52 +0200 Subject: [PATCH] Fix incompatibility with latest `syrupy` and update in Poetry (#2497) --- integration-tests/conftest.py | 8 +++++++- server/poetry.lock | 14 ++++++++++++++ server/pyproject.toml | 1 + server/requirements_cuda.txt | 6 ++++++ server/requirements_intel.txt | 6 ++++++ server/requirements_rocm.txt | 6 ++++++ 6 files changed, 40 insertions(+), 1 deletion(-) diff --git a/integration-tests/conftest.py b/integration-tests/conftest.py index a8a77cd2..f58f5fdf 100644 --- a/integration-tests/conftest.py +++ b/integration-tests/conftest.py @@ -64,6 +64,7 @@ class ResponseComparator(JSONSnapshotExtension): self, data, *, + include=None, exclude=None, matcher=None, ): @@ -79,7 +80,12 @@ class ResponseComparator(JSONSnapshotExtension): data = [d.model_dump() for d in data] data = self._filter( - data=data, depth=0, path=(), exclude=exclude, matcher=matcher + data=data, + depth=0, + path=(), + exclude=exclude, + include=include, + matcher=matcher, ) return json.dumps(data, indent=2, ensure_ascii=False, sort_keys=False) + "\n" diff --git a/server/poetry.lock b/server/poetry.lock index fc1a54a3..49276807 100644 --- a/server/poetry.lock +++ b/server/poetry.lock @@ -2945,6 +2945,20 @@ mpmath = ">=1.1.0,<1.4" [package.extras] dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] +[[package]] +name = "syrupy" +version = "4.7.1" +description = "Pytest Snapshot Test Utility" +optional = false +python-versions = ">=3.8.1" +files = [ + {file = "syrupy-4.7.1-py3-none-any.whl", hash = "sha256:be002267a512a4bedddfae2e026c93df1ea928ae10baadc09640516923376d41"}, + {file = "syrupy-4.7.1.tar.gz", hash = "sha256:f9d4485f3f27d0e5df6ed299cac6fa32eb40a441915d988e82be5a4bdda335c8"}, +] + +[package.dependencies] +pytest = ">=7.0.0,<9.0.0" + [[package]] name = "texttable" version = "1.7.0" diff --git a/server/pyproject.toml b/server/pyproject.toml index 57deb1b8..66844402 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -47,6 +47,7 @@ marlin-kernels = [ { url = "https://github.com/danieldk/marlin-kernels/releases/download/v0.2.0/marlin_kernels-0.2.0+cu123torch2.4-cp312-cp312-linux_x86_64.whl", python = "~3.12", optional = true }, ] rich = "^13.7.1" +syrupy = "^4.7.1" [tool.poetry.extras] torch = ["torch"] diff --git a/server/requirements_cuda.txt b/server/requirements_cuda.txt index eb521bd6..71291f7b 100644 --- a/server/requirements_cuda.txt +++ b/server/requirements_cuda.txt @@ -4,6 +4,7 @@ click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13" einops==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" filelock==3.15.4 ; python_version >= "3.9" and python_version < "3.13" fsspec==2024.5.0 ; python_version >= "3.9" and python_version < "3.13" googleapis-common-protos==1.63.2 ; python_version >= "3.9" and python_version < "3.13" @@ -15,6 +16,7 @@ hf-transfer==0.1.8 ; python_version >= "3.9" and python_version < "3.13" huggingface-hub==0.23.5 ; python_version >= "3.9" and python_version < "3.13" idna==3.7 ; python_version >= "3.9" and python_version < "3.13" importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.13" +iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13" loguru==0.6.0 ; python_version >= "3.9" and python_version < "3.13" markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "3.13" mdurl==0.1.2 ; python_version >= "3.9" and python_version < "3.13" @@ -31,10 +33,12 @@ opentelemetry-sdk==1.25.0 ; python_version >= "3.9" and python_version < "3.13" opentelemetry-semantic-conventions==0.46b0 ; python_version >= "3.9" and python_version < "3.13" packaging==24.1 ; python_version >= "3.9" and python_version < "3.13" pillow==10.4.0 ; python_version >= "3.9" and python_version < "3.13" +pluggy==1.5.0 ; python_version >= "3.9" and python_version < "3.13" prometheus-client==0.20.0 ; python_version >= "3.9" and python_version < "3.13" protobuf==4.25.3 ; python_version >= "3.9" and python_version < "3.13" py-cpuinfo==9.0.0 ; python_version >= "3.9" and python_version < "3.13" pygments==2.18.0 ; python_version >= "3.9" and python_version < "3.13" +pytest==7.4.4 ; python_version >= "3.9" and python_version < "3.13" pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" regex==2024.5.15 ; python_version >= "3.9" and python_version < "3.13" requests==2.32.3 ; python_version >= "3.9" and python_version < "3.13" @@ -43,7 +47,9 @@ safetensors==0.4.3 ; python_version >= "3.9" and python_version < "3.13" scipy==1.13.1 ; python_version >= "3.9" and python_version < "3.13" sentencepiece==0.1.99 ; python_version >= "3.9" and python_version < "3.13" setuptools==71.1.0 ; python_version >= "3.9" and python_version < "3.13" +syrupy==4.7.1 ; python_version >= "3.9" and python_version < "3.13" tokenizers==0.19.1 ; python_version >= "3.9" and python_version < "3.13" +tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" tqdm==4.66.4 ; python_version >= "3.9" and python_version < "3.13" transformers==4.43.1 ; python_version >= "3.9" and python_version < "3.13" typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13" diff --git a/server/requirements_intel.txt b/server/requirements_intel.txt index eb521bd6..71291f7b 100644 --- a/server/requirements_intel.txt +++ b/server/requirements_intel.txt @@ -4,6 +4,7 @@ click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13" einops==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" filelock==3.15.4 ; python_version >= "3.9" and python_version < "3.13" fsspec==2024.5.0 ; python_version >= "3.9" and python_version < "3.13" googleapis-common-protos==1.63.2 ; python_version >= "3.9" and python_version < "3.13" @@ -15,6 +16,7 @@ hf-transfer==0.1.8 ; python_version >= "3.9" and python_version < "3.13" huggingface-hub==0.23.5 ; python_version >= "3.9" and python_version < "3.13" idna==3.7 ; python_version >= "3.9" and python_version < "3.13" importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.13" +iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13" loguru==0.6.0 ; python_version >= "3.9" and python_version < "3.13" markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "3.13" mdurl==0.1.2 ; python_version >= "3.9" and python_version < "3.13" @@ -31,10 +33,12 @@ opentelemetry-sdk==1.25.0 ; python_version >= "3.9" and python_version < "3.13" opentelemetry-semantic-conventions==0.46b0 ; python_version >= "3.9" and python_version < "3.13" packaging==24.1 ; python_version >= "3.9" and python_version < "3.13" pillow==10.4.0 ; python_version >= "3.9" and python_version < "3.13" +pluggy==1.5.0 ; python_version >= "3.9" and python_version < "3.13" prometheus-client==0.20.0 ; python_version >= "3.9" and python_version < "3.13" protobuf==4.25.3 ; python_version >= "3.9" and python_version < "3.13" py-cpuinfo==9.0.0 ; python_version >= "3.9" and python_version < "3.13" pygments==2.18.0 ; python_version >= "3.9" and python_version < "3.13" +pytest==7.4.4 ; python_version >= "3.9" and python_version < "3.13" pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" regex==2024.5.15 ; python_version >= "3.9" and python_version < "3.13" requests==2.32.3 ; python_version >= "3.9" and python_version < "3.13" @@ -43,7 +47,9 @@ safetensors==0.4.3 ; python_version >= "3.9" and python_version < "3.13" scipy==1.13.1 ; python_version >= "3.9" and python_version < "3.13" sentencepiece==0.1.99 ; python_version >= "3.9" and python_version < "3.13" setuptools==71.1.0 ; python_version >= "3.9" and python_version < "3.13" +syrupy==4.7.1 ; python_version >= "3.9" and python_version < "3.13" tokenizers==0.19.1 ; python_version >= "3.9" and python_version < "3.13" +tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" tqdm==4.66.4 ; python_version >= "3.9" and python_version < "3.13" transformers==4.43.1 ; python_version >= "3.9" and python_version < "3.13" typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13" diff --git a/server/requirements_rocm.txt b/server/requirements_rocm.txt index eb521bd6..71291f7b 100644 --- a/server/requirements_rocm.txt +++ b/server/requirements_rocm.txt @@ -4,6 +4,7 @@ click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13" einops==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" filelock==3.15.4 ; python_version >= "3.9" and python_version < "3.13" fsspec==2024.5.0 ; python_version >= "3.9" and python_version < "3.13" googleapis-common-protos==1.63.2 ; python_version >= "3.9" and python_version < "3.13" @@ -15,6 +16,7 @@ hf-transfer==0.1.8 ; python_version >= "3.9" and python_version < "3.13" huggingface-hub==0.23.5 ; python_version >= "3.9" and python_version < "3.13" idna==3.7 ; python_version >= "3.9" and python_version < "3.13" importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.13" +iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13" loguru==0.6.0 ; python_version >= "3.9" and python_version < "3.13" markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "3.13" mdurl==0.1.2 ; python_version >= "3.9" and python_version < "3.13" @@ -31,10 +33,12 @@ opentelemetry-sdk==1.25.0 ; python_version >= "3.9" and python_version < "3.13" opentelemetry-semantic-conventions==0.46b0 ; python_version >= "3.9" and python_version < "3.13" packaging==24.1 ; python_version >= "3.9" and python_version < "3.13" pillow==10.4.0 ; python_version >= "3.9" and python_version < "3.13" +pluggy==1.5.0 ; python_version >= "3.9" and python_version < "3.13" prometheus-client==0.20.0 ; python_version >= "3.9" and python_version < "3.13" protobuf==4.25.3 ; python_version >= "3.9" and python_version < "3.13" py-cpuinfo==9.0.0 ; python_version >= "3.9" and python_version < "3.13" pygments==2.18.0 ; python_version >= "3.9" and python_version < "3.13" +pytest==7.4.4 ; python_version >= "3.9" and python_version < "3.13" pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" regex==2024.5.15 ; python_version >= "3.9" and python_version < "3.13" requests==2.32.3 ; python_version >= "3.9" and python_version < "3.13" @@ -43,7 +47,9 @@ safetensors==0.4.3 ; python_version >= "3.9" and python_version < "3.13" scipy==1.13.1 ; python_version >= "3.9" and python_version < "3.13" sentencepiece==0.1.99 ; python_version >= "3.9" and python_version < "3.13" setuptools==71.1.0 ; python_version >= "3.9" and python_version < "3.13" +syrupy==4.7.1 ; python_version >= "3.9" and python_version < "3.13" tokenizers==0.19.1 ; python_version >= "3.9" and python_version < "3.13" +tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" tqdm==4.66.4 ; python_version >= "3.9" and python_version < "3.13" transformers==4.43.1 ; python_version >= "3.9" and python_version < "3.13" typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13"