Skip to content

Commit

Permalink
deps: fix dependency specification problem
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
serramatutu committed Jun 24, 2024
1 parent 750b7ad commit c12daa8
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Dependencies-20240624-151729.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .lefthook/commit-msg/template-checker
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?

Expand Down
4 changes: 4 additions & 0 deletions deps/dev.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
-r async.in
-r sync.in

ruff
basedpyright
uv
49 changes: 49 additions & 0 deletions deps/dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,57 @@
# 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
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
multidict==6.0.5
# via
# aiohttp
# yarl
nodejs-wheel-binaries==20.14.0
# via basedpyright
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
3 changes: 3 additions & 0 deletions deps/test.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
49 changes: 48 additions & 1 deletion deps/test.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,14 @@ features = [

[tool.hatch.envs.dev]
features = [
"async",
"sync",
"dev-main",
"dev-test"
"dev-test",
]
[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]
Expand Down

0 comments on commit c12daa8

Please sign in to comment.