File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33set -eo pipefail
44shopt -s inherit_errexit
55
6- watch_file venv/bin/activate
6+ watch_file . venv/bin/activate
77
8- if [[ -f " venv/bin/activate" ]]; then
9- source venv/bin/activate
8+ if [[ -f " . venv/bin/activate" ]]; then
9+ source . venv/bin/activate
1010fi
Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ jobs:
1616 ]
1717 include :
1818 - python-version : ' 3.9'
19- post-venv : ' venv/bin/pip install "urllib3<2" "requests<=2.30" "types-requests<=2.30"'
19+ post-venv : ' . venv/bin/pip install "urllib3<2" "requests<=2.30" "types-requests<=2.30"'
2020 name : Python ${{ matrix.python-version }} ${{ matrix.post-venv }}
2121 steps :
2222 - uses : actions/checkout@v4
2323 - uses : actions/setup-python@v5
2424 with :
2525 python-version : ${{ matrix.python-version }}
2626 architecture : x64
27+ - name : Install uv
28+ uses : astral-sh/setup-uv@v7
2729 - run : make venv
2830 - if : ${{ matrix.post-venv }}
2931 run : ${{ matrix.post-venv }}
3032 - run : make test
31- - run : make lint
33+ - run : make check
34+ - run : make format-check
Original file line number Diff line number Diff line change 1- venv : pyproject.toml poetry.lock venv-tools
2- rm -rf venv
3- python3 -m venv venv
4- VIRTUAL_ENV=venv venv-tools/bin/poetry install
1+ DEFAULT_GOAL := ci
52
6- venv-tools : requirements.tools.txt
7- rm -rf venv-tools
8- python3 -m venv venv-tools
9- venv-tools/bin/pip install -r requirements.tools.txt
3+ .PHONY : ci
4+ ci : check format-check test
5+
6+ .PHONY : venv
7+ venv : .venv
8+
9+ .venv : uv.lock
10+ uv sync
1011
1112.PHONY : clean
1213clean :
13- rm -rf venv
14- rm -rf venv-tools
14+ rm -rf .venv
1515 rm -rf dist
1616
1717.PHONY : test
1818test : venv
19- venv/bin/pytest -vv
20-
21- .PHONY : build
22- build : venv-tools
23- rm -rf dist
24- venv-tools/bin/poetry build
19+ uv run pytest
2520
2621.PHONY : format
2722format : venv-tools
28- venv-tools/bin/ ruff check --fix --unsafe-fixes
29- venv-tools/bin/ ruff format
23+ uv run ruff check --fix --unsafe-fixes
24+ uv run ruff format
3025
3126.PHONY : format-check
3227format-check : venv-tools
33- venv-tools/bin/ruff check
34- venv-tools/bin/ruff format --check
35-
36- .PHONY : lint
37- lint : mypy format-check
28+ uv run ruff check
29+ uv run ruff format --check
3830
39- .PHONY : mypy
40- mypy : venv
41- venv/bin/ mypy flareio tests
31+ .PHONY : check
32+ check : venv
33+ uv run mypy src/ flareio tests
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- [tool . poetry ]
1+ [project ]
22name = " flareio"
33version = " 1.2.0"
44description = " Python SDK for the flare.io API."
5- authors = [" Alexandre Viau <alexandre.viau@flare.io>" ]
5+ authors = [
6+ { name = " Alexandre Viau" , email =" alexandre.viau@flare.io>" }
7+ ]
68readme = " README.md"
79repository = " https://github.com/Flared/python-flareio"
810license = " MIT"
11+ requires-python = " >=3.9"
912keywords = [
1013 " flare" ,
1114 " sdk" ,
@@ -24,19 +27,22 @@ packages = [
2427 { include = " flareio" },
2528]
2629
27- [tool . poetry . dependencies ]
30+ [dependencies ]
2831python = " >=3.8"
2932requests = " >=2"
3033
3134[build-system ]
32- requires = [" poetry-core " ]
33- build-backend = " poetry.core.masonry.api "
35+ requires = [" uv_build>=0.9.28,<0.10.0 " ]
36+ build-backend = " uv_build "
3437
35- [tool .poetry .group .dev .dependencies ]
36- pytest = " 8.3.2"
37- mypy = " ^1.11.1"
38- requests-mock = " ^1.12.1"
39- types-requests = " ^2.32.0.20240712"
38+ [dependency-groups ]
39+ dev = [
40+ " pytest>=8.3.2" ,
41+ " mypy>=1.11.1" ,
42+ " ruff>=0.15.0" ,
43+ " requests-mock>=1.12.1" ,
44+ " types-requests>=2.32.0.20240712" ,
45+ ]
4046
4147[tool .ruff .lint ]
4248extend-select = [
Load Diff This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments