From c244b9b2ef5c41bf27942d6b26d47d0145dfa903 Mon Sep 17 00:00:00 2001 From: serramatutu Date: Mon, 24 Jun 2024 15:14:32 +0200 Subject: [PATCH] deps: fix dependency specification problem The way dependencies were set up previously, we'd eventually run into conflicts since `uv pip compile` would run independently for each `.in` file. This is now fixed since we're using `-r *.in` in the `.in` files. --- .../Dependencies-20240624-151729.yaml | 3 + .lefthook/commit-msg/template-checker | 2 +- deps/dev.in | 5 ++ deps/dev.txt | 69 +++++++++++++++++++ deps/test.in | 3 + deps/test.txt | 49 ++++++++++++- pyproject.toml | 9 +-- 7 files changed, 131 insertions(+), 9 deletions(-) create mode 100644 .changes/unreleased/Dependencies-20240624-151729.yaml diff --git a/.changes/unreleased/Dependencies-20240624-151729.yaml b/.changes/unreleased/Dependencies-20240624-151729.yaml new file mode 100644 index 0000000..d31e1df --- /dev/null +++ b/.changes/unreleased/Dependencies-20240624-151729.yaml @@ -0,0 +1,3 @@ +kind: Dependencies +body: Fix the way we specify dependencies to avoid conflicts. +time: 2024-06-24T15:17:29.393201+02:00 diff --git a/.lefthook/commit-msg/template-checker b/.lefthook/commit-msg/template-checker index 7414916..628af44 100755 --- a/.lefthook/commit-msg/template-checker +++ b/.lefthook/commit-msg/template-checker @@ -8,7 +8,7 @@ INPUT_FILE=$1 -PATTERN="^((chore|ci|docs|feat|fix|internal|perf|refactor|revert|test|version)(\([a-z0-9\-]+\))?(!)?(: (.*\s*)*))" +PATTERN="^((chore|ci|deps|docs|feat|fix|internal|perf|refactor|revert|test|version)(\([a-z0-9\-]+\))?(!)?(: (.*\s*)*))" grep -E "$PATTERN" $INPUT_FILE MATCH=$? diff --git a/deps/dev.in b/deps/dev.in index 134a409..1f6ed3d 100644 --- a/deps/dev.in +++ b/deps/dev.in @@ -1,2 +1,7 @@ +-r async.in +-r sync.in +-r test.in + ruff basedpyright +uv diff --git a/deps/dev.txt b/deps/dev.txt index 4534857..c881e64 100644 --- a/deps/dev.txt +++ b/deps/dev.txt @@ -1,8 +1,77 @@ # This file was autogenerated by uv via the following command: # uv pip compile deps/dev.in -o deps/dev.txt +aiohttp==3.9.5 + # via gql +aiosignal==1.3.1 + # via aiohttp +anyio==4.4.0 + # via gql +attrs==23.2.0 + # via + # aiohttp + # pytest-subtests +backoff==2.2.1 + # via gql basedpyright==1.12.6 # via -r deps/dev.in +certifi==2024.6.2 + # via requests +charset-normalizer==3.3.2 + # via requests +frozenlist==1.4.1 + # via + # aiohttp + # aiosignal +gql==3.5.0 + # via + # -r deps/async.in + # -r deps/sync.in +graphql-core==3.2.3 + # via gql +idna==3.7 + # via + # anyio + # requests + # yarl +iniconfig==2.0.0 + # via pytest +multidict==6.0.5 + # via + # aiohttp + # yarl nodejs-wheel-binaries==20.14.0 # via basedpyright +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.2.2 + # via + # -r deps/test.in + # pytest-asyncio + # pytest-mock + # pytest-subtests +pytest-asyncio==0.23.7 + # via -r deps/test.in +pytest-mock==3.14.0 + # via -r deps/test.in +pytest-subtests==0.12.1 + # via -r deps/test.in +requests==2.32.3 + # via + # gql + # requests-toolbelt +requests-toolbelt==1.0.0 + # via gql ruff==0.4.8 # via -r deps/dev.in +sniffio==1.3.1 + # via anyio +urllib3==2.2.2 + # via requests +uv==0.2.13 + # via -r deps/dev.in +yarl==1.9.4 + # via + # aiohttp + # gql diff --git a/deps/test.in b/deps/test.in index 559f493..f6adc18 100644 --- a/deps/test.in +++ b/deps/test.in @@ -1,3 +1,6 @@ +-r async.in +-r sync.in + pytest>=8.2.0,<9.0.0 pytest-asyncio>=0.23.7,<0.24.0 pytest-subtests>=0.12.1,<0.13.0 diff --git a/deps/test.txt b/deps/test.txt index 52a5641..fad525d 100644 --- a/deps/test.txt +++ b/deps/test.txt @@ -1,9 +1,42 @@ # This file was autogenerated by uv via the following command: # uv pip compile deps/test.in -o deps/test.txt +aiohttp==3.9.5 + # via gql +aiosignal==1.3.1 + # via aiohttp +anyio==4.4.0 + # via gql attrs==23.2.0 - # via pytest-subtests + # via + # aiohttp + # pytest-subtests +backoff==2.2.1 + # via gql +certifi==2024.6.2 + # via requests +charset-normalizer==3.3.2 + # via requests +frozenlist==1.4.1 + # via + # aiohttp + # aiosignal +gql==3.5.0 + # via + # -r deps/async.in + # -r deps/sync.in +graphql-core==3.2.3 + # via gql +idna==3.7 + # via + # anyio + # requests + # yarl iniconfig==2.0.0 # via pytest +multidict==6.0.5 + # via + # aiohttp + # yarl packaging==24.1 # via pytest pluggy==1.5.0 @@ -20,3 +53,17 @@ pytest-mock==3.14.0 # via -r deps/test.in pytest-subtests==0.12.1 # via -r deps/test.in +requests==2.32.3 + # via + # gql + # requests-toolbelt +requests-toolbelt==1.0.0 + # via gql +sniffio==1.3.1 + # via anyio +urllib3==2.2.2 + # via requests +yarl==1.9.4 + # via + # aiohttp + # gql diff --git a/pyproject.toml b/pyproject.toml index 21b71ef..86280fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ async = [ sync = [ "deps/sync.txt" ] -dev-main = [ +dev-all = [ "deps/dev.txt", ] dev-test = [ @@ -57,18 +57,13 @@ features = [ [tool.hatch.envs.dev] features = [ - "async", - "sync", - "dev-main", - "dev-test" + "dev-all", ] [tool.hatch.envs.dev.scripts] fetch-schema = "python scripts/fetch_schema.py > tests/server_schema.gql" [tool.hatch.envs.test] features = [ - "async", - "sync", "dev-test" ] [tool.hatch.envs.test.scripts]