File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 check-template-consistency :
1111 uses : fingerprintjs/dx-team-toolkit/.github/workflows/check-template-consistency.yml@v1
1212 with :
13- generate-command : ' python3 -m pip install ruff && bash ./generate.sh'
13+ generate-command : ' pip install uv && uv sync --only-group dev && bash ./generate.sh'
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v4
12- - uses : actions /setup-python @v5
12+ - uses : astral-sh /setup-uv @v5
1313 with :
14+ enable-cache : true
1415 python-version : " 3.12"
1516 - name : " Install dependencies"
16- run : |
17- python -m pip install --upgrade pip
18- pip install -r requirements.txt
19- pip install -r test-requirements.txt
17+ run : uv sync
2018 - name : " Generate coverage"
2119 run : |
22- coverage run --source=fingerprint_server_sdk -m pytest
23- coverage xml
20+ uv run coverage run --source=fingerprint_server_sdk -m pytest
21+ uv run coverage xml
2422 - name : Get Cover
2523 uses : orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac
2624 with :
Original file line number Diff line number Diff line change @@ -12,20 +12,18 @@ jobs:
1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@v4
15- - uses : actions /setup-python @v5
15+ - uses : astral-sh /setup-uv @v5
1616 with :
17+ enable-cache : true
1718 python-version : " 3.13"
1819 - name : " Install dependencies"
19- run : |
20- python -m pip install --upgrade pip
21- pip install -r requirements.txt
22- pip install -r test-requirements.txt
20+ run : uv sync
2321 - name : " Generate coverage"
2422 run : |
25- coverage run --source=fingerprint_server_sdk -m pytest
26- coverage html
27- coverage json
28- python ./generate_coverage_summary.py
23+ uv run coverage run --source=fingerprint_server_sdk -m pytest
24+ uv run coverage html
25+ uv run coverage json
26+ uv run python ./generate_coverage_summary.py
2927 rm ./htmlcov/.gitignore
3028
3129 - name : Create Coverage Badges
Original file line number Diff line number Diff line change @@ -26,16 +26,14 @@ jobs:
2626
2727 steps :
2828 - uses : actions/checkout@v4
29- - uses : actions /setup-python @v5
29+ - uses : astral-sh /setup-uv @v5
3030 with :
31+ enable-cache : true
3132 python-version : ${{ matrix.python-version }}
3233 - name : " Install dependencies"
33- run : |
34- python -m pip install --upgrade pip
35- pip install -r requirements.txt
36- pip install -r test-requirements.txt
34+ run : uv sync
3735
3836 - name : " Try to get data using SDK"
39- run : " python ./run_checks.py"
37+ run : " uv run python ./run_checks.py"
4038 env :
4139 PRIVATE_KEY : " ${{ secrets.PRIVATE_KEY }}"
Original file line number Diff line number Diff line change @@ -13,20 +13,18 @@ jobs:
1313
1414 steps :
1515 - uses : actions/checkout@v4
16- - uses : actions /setup-python @v5
16+ - uses : astral-sh /setup-uv @v5
1717 with :
18+ enable-cache : true
1819 python-version : " 3.11"
1920 - name : " Install dependencies"
20- run : |
21- python -m pip install --upgrade pip
22- pip install -r requirements.txt
23- pip install -r test-requirements.txt
21+ run : uv sync
2422
2523 - name : " Run Ruff format check"
26- run : " ruff format --check ."
24+ run : " uv run ruff format --check ."
2725
2826 - name : " Run Ruff linter"
29- run : " ruff check ."
27+ run : " uv run ruff check ."
3028
3129 - name : " Run MyPy type checker"
32- run : " mypy fingerprint_server_sdk"
30+ run : " uv run mypy fingerprint_server_sdk"
Original file line number Diff line number Diff line change @@ -32,19 +32,13 @@ jobs:
3232 with :
3333 ref : ${{ github.event.inputs.tag }}
3434
35- - name : ' Install Python '
36- uses : actions /setup-python @v5
35+ - name : ' Install uv '
36+ uses : astral-sh /setup-uv @v5
3737 with :
3838 python-version : ' 3.12'
3939
4040 - name : ' Build'
41- run : |
42- python -m pip install --upgrade pip
43- pip install -r requirements.txt
44- pip install wheel
45- pip install twine
46- pip install ruff
47- python setup.py sdist bdist_wheel
41+ run : uv build
4842
4943 - name : Publish package distributions to PyPI
5044 uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
Original file line number Diff line number Diff line change 1717 language : python
1818 language-version : ' 3.12'
1919 prepare-command : |
20- python -m pip install --upgrade pip
21- pip install -r requirements.txt
22- pip install wheel
23- pip install twine
24- pip install ruff
20+ pip install uv
21+ uv sync
2522 secrets :
2623 APP_PRIVATE_KEY : ${{ secrets.APP_PRIVATE_KEY }}
2724 RUNNER_APP_PRIVATE_KEY : ${{ secrets.RUNNER_APP_PRIVATE_KEY }}
Original file line number Diff line number Diff line change @@ -15,14 +15,12 @@ jobs:
1515
1616 steps :
1717 - uses : actions/checkout@v4
18- - uses : actions /setup-python @v5
18+ - uses : astral-sh /setup-uv @v5
1919 with :
20+ enable-cache : true
2021 python-version : " ${{ matrix.python-version }}"
2122 - name : " Install dependencies"
22- run : |
23- python -m pip install --upgrade pip
24- pip install -r requirements.txt
25- pip install -r test-requirements.txt
23+ run : uv sync
2624
2725 - name : " Run tests for ${{ matrix.python-version }}"
28- run : " pytest"
26+ run : " uv run pytest"
Original file line number Diff line number Diff line change 11repos :
22 - repo : https://github.com/astral-sh/ruff-pre-commit
3- rev : v0.8.6
3+ rev : v0.15.0
44 hooks :
55 - id : ruff-format
66 - id : ruff
77 args : [--fix]
8- - repo : https://github.com/pre-commit/mirrors-mypy
9- rev : v1.14.1
8+ - repo : local
109 hooks :
1110 - id : mypy
12- additional_dependencies :
13- - pydantic>=2
14- - types-python-dateutil>=2.8.19.14
11+ name : mypy
12+ entry : uv run mypy
13+ language : system
14+ types : [python]
1515 args : [--config-file=pyproject.toml]
Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formattin
3434
3535``` bash
3636# Format code
37- ruff format .
37+ uv run ruff format .
3838
3939# Run linter
40- ruff check --fix .
40+ uv run ruff check --fix .
4141
4242# Run type checker
43- mypy fingerprint_server_sdk
43+ uv run mypy fingerprint_server_sdk
4444```
4545
4646### Updating templates
@@ -75,24 +75,23 @@ To make requests using the local source code of the SDK:
75752 . Run the following commands:
7676
7777``` shell
78- pip install -r requirements.txt
79- python run_checks.py
78+ uv sync
79+ uv run python run_checks.py
8080```
8181
8282#### Test environment
8383
84- You need to install ` python ` and ` pip ` .
84+ You need to install [ uv ] ( https://docs.astral.sh/uv/getting-started/installation/ ) .
8585Then you can run:
8686
8787``` shell
88- pip install -r requirements.txt
89- pip install -r test-requirements.txt
88+ uv sync
9089```
9190
9291#### Running tests
9392
9493``` shell
95- pytest
94+ uv run pytest
9695```
9796
9897### How to publish
You can’t perform that action at this time.
0 commit comments