Skip to content

Commit 0dce623

Browse files
authored
fix: missing sniffio dependency (#287)
1 parent a7ef9b9 commit 0dce623

File tree

23 files changed

+3440
-224
lines changed

23 files changed

+3440
-224
lines changed

.github/actions/integration_tests/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ outputs: {}
1313
runs:
1414
using: "composite"
1515
steps:
16-
- uses: actions/setup-python@v4
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
1718
with:
19+
enable-cache: true
1820
python-version: "3.10"
19-
- name: Install Hatch
21+
- name: Install Dependencies
2022
shell: bash
21-
run: pip install hatch==${{ env.HATCH_VERSION }}
23+
run: uv sync --group test
2224
# we are using the "automated-tests" organization with predefined users and workspaces
2325
- name: Run SDK Tests
2426
shell: bash
2527
run: |
26-
API_KEY=${{inputs.API_KEY}} API_URL=${{inputs.API_URL}} hatch run test:integration
28+
API_KEY=${{inputs.API_KEY}} API_URL=${{inputs.API_URL}} make tests-integration

.github/workflows/compliance.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v6
2020

21-
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
2223
with:
24+
enable-cache: true
2325
python-version: "3.10"
2426

2527
- name: Install prod dependencies
2628
run: |
27-
pip install hatch==v1.14.0
28-
hatch run tools:requirements
29-
pip install -r requirements.txt
29+
uv sync
30+
uv export --no-dev --no-hashes > requirements.txt
3031
3132
- name: Create file with full dependency list
3233
run: |
33-
pip freeze > requirements-full.txt
34+
uv pip freeze > requirements-full.txt
3435
3536
- name: Send license report to Fossa
3637
# This will collect all necessary information (mostly used dependencies) and send it to the Fossa API

.github/workflows/continuous-deployment-dev.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
type: string
1010
description: "The API URL for the test run"
1111

12-
env:
13-
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
14-
1512
jobs:
1613
tests:
1714
name: Tests

.github/workflows/continuous-deployment-prod.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
type: string
1010
description: "The API URL for the test run"
1111

12-
env:
13-
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
14-
1512
jobs:
1613
tests:
1714
name: Tests

.github/workflows/continuous-integration.yml

Lines changed: 33 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,55 @@ name: CI
33
on:
44
pull_request:
55

6-
env:
7-
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
8-
96
permissions:
107
pull-requests: write
118
contents: write
129

1310
jobs:
14-
format-black:
15-
name: Format black
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v6
19-
- uses: actions/setup-python@v6
20-
with:
21-
python-version: "3.10"
22-
- name: Install Hatch
23-
run: pip install hatch==${{ env.HATCH_VERSION }}
24-
- name: Run black
25-
run: hatch run code-quality:format
26-
27-
28-
mypy:
29-
name: MyPy
11+
format:
12+
name: Format Code
3013
runs-on: ubuntu-latest
3114
steps:
32-
- uses: actions/checkout@v6
33-
- uses: actions/setup-python@v6
15+
- uses: actions/checkout@v5
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
3418
with:
19+
enable-cache: true
3520
python-version: "3.10"
36-
- name: Install Hatch
37-
run: pip install hatch==${{ env.HATCH_VERSION }}
38-
- name: Run mypy
39-
run: hatch run code-quality:types
21+
- name: Install Dependencies
22+
run: uv sync --group code-quality
23+
- name: Run ruff format
24+
run: make format
4025

4126
lint:
4227
name: Lint Code
4328
runs-on: ubuntu-latest
4429
steps:
45-
- uses: actions/checkout@v6
46-
- uses: actions/setup-python@v6
30+
- uses: actions/checkout@v5
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v5
4733
with:
34+
enable-cache: true
4835
python-version: "3.10"
49-
- name: Install Hatch
50-
run: pip install hatch==${{ env.HATCH_VERSION }}
51-
- name: Run pylint
52-
run: hatch run code-quality:lint
36+
- name: Install Dependencies
37+
run: uv sync --group code-quality
38+
- name: Run ruff check
39+
run: make lint
5340

54-
isort:
55-
name: Sort imports
41+
mypy:
42+
name: Type checking with mypy
5643
runs-on: ubuntu-latest
5744
steps:
58-
- uses: actions/checkout@v6
59-
- uses: actions/setup-python@v6
45+
- uses: actions/checkout@v5
46+
- name: Install uv
47+
uses: astral-sh/setup-uv@v5
6048
with:
49+
enable-cache: true
6150
python-version: "3.10"
62-
- name: Install Hatch
63-
run: pip install hatch==${{ env.HATCH_VERSION }}
51+
- name: Install dependencies
52+
run: uv sync --group code-quality
6453
- name: Run mypy
65-
run: hatch run code-quality:sort
66-
67-
pydocstyle:
68-
name: Check docstrings
69-
runs-on: ubuntu-latest
70-
steps:
71-
- uses: actions/checkout@v6
72-
- uses: actions/setup-python@v6
73-
with:
74-
python-version: "3.10"
75-
- name: Install Hatch
76-
run: pip install hatch==${{ env.HATCH_VERSION }}
77-
- name: Run pydocstyle
78-
run: hatch run code-quality:docstrings
54+
run: make types
7955

8056
scan-for-secrets:
8157
name: Scan for secrets
@@ -101,13 +77,15 @@ jobs:
10177
with:
10278
# for coverage comment action
10379
fetch-depth: 1000
104-
- uses: actions/setup-python@v6
80+
- name: Install uv
81+
uses: astral-sh/setup-uv@v5
10582
with:
83+
enable-cache: true
10684
python-version: "3.10"
107-
- name: Install Hatch
108-
run: pip install hatch==${{ env.HATCH_VERSION }}
85+
- name: Install Dependencies
86+
run: uv sync --group test
10987
- name: Run unit tests
110-
run: hatch run test:unit-with-cov
88+
run: make tests-with-cov
11189
- name: Coverage comment
11290
id: coverage_comment
11391
uses: py-cov-action/python-coverage-comment-action@e623398c19eb3853a5572d4a516e10b15b5cefbc

.github/workflows/deploy-prod.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- published
77
workflow_dispatch:
88

9-
env:
10-
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
11-
129
permissions:
1310
id-token: write
1411

@@ -19,17 +16,17 @@ jobs:
1916
env:
2017
pypi: ${{ vars.PYPI_URL }}
2118
steps:
22-
- uses: actions/checkout@v6
23-
- uses: actions/setup-python@v6
19+
- uses: actions/checkout@v5
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
2422
with:
25-
python-version: "3.10"
26-
- name: Install Hatch
27-
run: pip install hatch==${{ env.HATCH_VERSION }}
28-
- name: Bump version
29-
# Bump version to Github action tag
30-
run: hatch version ${{github.ref_name}}
23+
enable-cache: true
24+
python-version: "3.10"
25+
- name: Bump Version
26+
run: |
27+
sed -i 's/^version = .*/version = "${{github.ref_name}}"/' pyproject.toml
3128
- name: Build
32-
run: hatch build
29+
run: make build
3330
- name: publish
3431
uses: pypa/gh-action-pypi-publish@release/v1
3532
with:

.github/workflows/deploy-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- labeled
77
workflow_dispatch:
88

9-
env:
10-
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
11-
129
jobs:
1310
deploy-test:
1411
if: ${{ github.event.label.name == 'test-deploy' }} || github.event.label.name !='integration'`

.github/workflows/deploy.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ on:
1717
permissions:
1818
id-token: write
1919

20-
env:
21-
HATCH_VERSION: "v1.14.0" # keep in sync with continuous-integration.yml
22-
2320
jobs:
2421
build-and-deploy:
2522
runs-on: ubuntu-latest
@@ -28,17 +25,17 @@ jobs:
2825
pypi: ${{ vars.PYPI_URL }}
2926

3027
steps:
31-
- uses: actions/checkout@v6
32-
- uses: actions/setup-python@v6
28+
- uses: actions/checkout@v5
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v5
3331
with:
34-
python-version: "3.10"
35-
- name: Install Hatch
36-
run: pip install hatch==${{ env.HATCH_VERSION }}
37-
- name: Bump version
38-
# Bump version to Github action tag
39-
run: hatch version ${{ inputs.version }}
32+
enable-cache: true
33+
python-version: "3.10"
34+
- name: Bump Version
35+
run: |
36+
sed -i 's/^version = .*/version = "${{ inputs.version }}"/' pyproject.toml
4037
- name: Build
41-
run: hatch build
38+
run: make build
4239
- name: publish
4340
uses: pypa/gh-action-pypi-publish@release/v1
4441
with:

.github/workflows/merge-queue.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ on:
1616
API_KEY:
1717
required: true
1818

19-
env:
20-
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
21-
2219
jobs:
2320
# the API_KEYs are stored as a secret in the repository
2421
# we are using the "automated-tests" organization with predefined users and workspaces
@@ -40,11 +37,11 @@ jobs:
4037
needs: [integration_tests]
4138
runs-on: ubuntu-latest
4239
steps:
43-
- uses: actions/checkout@v6
44-
- uses: actions/setup-python@v6
40+
- uses: actions/checkout@v5
41+
- name: Install uv
42+
uses: astral-sh/setup-uv@v5
4543
with:
46-
python-version: "3.10"
47-
- name: Install Hatch
48-
run: pip install hatch==${{ env.HATCH_VERSION }}
44+
enable-cache: true
45+
python-version: "3.10"
4946
- name: Build
50-
run: hatch build
47+
run: make build

.pre-commit-config.yaml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,18 @@ repos:
1414
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
1515
- id: trailing-whitespace # trims trailing whitespace
1616

17-
- repo: https://github.com/PyCQA/autoflake
18-
rev: v2.1.1
17+
- repo: https://github.com/astral-sh/ruff-pre-commit
18+
# Please keep these aligned with the versions defined in the pyproject.toml dependency-groups
19+
rev: v0.8.4
1920
hooks:
20-
- id: autoflake
21-
args:
22-
- "--in-place"
23-
- "--expand-star-imports"
24-
- "--remove-duplicate-keys"
25-
- "--remove-unused-variables"
26-
- "-v"
27-
28-
- repo: https://github.com/psf/black
29-
# Please keep these aligned with the versions defined in the pyproject.toml [tool.hatch.envs.code-quality]
30-
rev: 23.3.0
31-
hooks:
32-
- id: black
21+
# Run the linter (includes isort).
22+
- id: ruff
23+
args: [ --fix ]
24+
# Run the formatter.
25+
- id: ruff-format
3326

3427
- repo: https://github.com/pre-commit/mirrors-mypy
35-
# Please keep these aligned with the versions defined in the pyproject.toml [tool.hatch.envs.code-quality]
28+
# Please keep these aligned with the versions defined in the pyproject.toml dependency-groups
3629
rev: "v1.1.1"
3730
hooks:
3831
- id: mypy
@@ -47,13 +40,6 @@ repos:
4740
# - "types-python-dateutil~=2.8.19"
4841
# - "types-redis~=4.5.1"
4942

50-
- repo: https://github.com/pycqa/isort
51-
# Please keep these aligned with the versions defined in the pyproject.toml [tool.hatch.envs.code-quality]
52-
rev: 5.12.0
53-
hooks:
54-
- id: isort
55-
args: ["--profile", "black"]
56-
5743
- repo: https://github.com/zricethezav/gitleaks
5844
rev: v8.16.1
5945
hooks:

0 commit comments

Comments
 (0)