Skip to content

Commit b7ac86b

Browse files
Merge pull request #1984 from kili-technology/claude/add-python-3.13-3.14-018wCLoAuNfDoNKamck45gsA
chore: add support for python 3.13
2 parents ab58cd7 + 1da84ad commit b7ac86b

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4
9-
- uses: actions/setup-python@v5
9+
- uses: actions/setup-python@v6
1010
with:
1111
python-version: "3.10"
1212
cache: "pip"
@@ -16,12 +16,13 @@ jobs:
1616
runs-on: ubuntu-latest
1717
name: Pylint test
1818
strategy:
19+
fail-fast: false
1920
matrix:
20-
python-version: ["3.10", "3.12"]
21+
python-version: ["3.10", "3.12", "3.13"]
2122
steps:
2223
- uses: actions/checkout@v4
2324
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@v6
2526
with:
2627
python-version: ${{ matrix.python-version }}
2728
cache: "pip"
@@ -36,11 +37,12 @@ jobs:
3637
pyright:
3738
runs-on: ubuntu-latest
3839
strategy:
40+
fail-fast: false
3941
matrix:
40-
version: ["3.10", "3.12"]
42+
version: ["3.10", "3.12", "3.13"]
4143
steps:
4244
- uses: actions/checkout@v4
43-
- uses: actions/setup-python@v5
45+
- uses: actions/setup-python@v6
4446
with:
4547
python-version: ${{ matrix.version }}
4648
cache: "pip"
@@ -55,6 +57,7 @@ jobs:
5557
timeout-minutes: 15
5658
name: Unit and integration tests
5759
strategy:
60+
fail-fast: false
5861
matrix:
5962
include:
6063
- os: ubuntu-latest
@@ -63,13 +66,15 @@ jobs:
6366
python-version: "3.10"
6467
- os: ubuntu-latest
6568
python-version: "3.12"
69+
- os: ubuntu-latest
70+
python-version: "3.13"
6671
runs-on: ${{ matrix.os }}
6772
steps:
6873
- name: Checkout repo
6974
uses: actions/checkout@v4
7075

7176
- name: Set up Python ${{ matrix.python-version }}
72-
uses: actions/setup-python@v5
77+
uses: actions/setup-python@v6
7378
with:
7479
python-version: ${{ matrix.python-version }}
7580
cache: "pip"
@@ -106,7 +111,7 @@ jobs:
106111
- uses: actions/checkout@v4
107112

108113
- name: Set up Python
109-
uses: actions/setup-python@v5
114+
uses: actions/setup-python@v6
110115
with:
111116
python-version: "3.10"
112117
cache: "pip"
@@ -136,7 +141,7 @@ jobs:
136141
- uses: actions/checkout@v4
137142

138143
- name: Set up Python
139-
uses: actions/setup-python@v5
144+
uses: actions/setup-python@v6
140145
with:
141146
python-version: "3.10"
142147
cache: "pip"

pyproject.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.10",
2525
"Programming Language :: Python :: 3.11",
2626
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
2728
"Programming Language :: Python :: Implementation :: CPython",
2829
"Programming Language :: Python :: Implementation :: PyPy",
2930
]
@@ -37,13 +38,13 @@ dependencies = [
3738
"typing-extensions >= 4.5.0, < 5.0.0",
3839
"pyparsing >= 3.0.0, < 4.0.0",
3940
"websocket-client >= 1.0.0, < 2.0.0",
40-
"cuid >= 0.4, < 0.5",
41+
"cuid2 >= 2.0.0, < 3.0.0",
4142
"urllib3 >= 1.26, < 3",
4243
"gql[requests,websockets] >= 3.5.0b5, < 4.0.0",
4344
"filelock >= 3.0.0, < 4.0.0",
4445
"pip-system-certs >= 4.0.0, < 5.0.0; platform_system=='Windows'",
4546
"pyrate-limiter >= 3, < 4",
46-
"kili-formats == 0.2.10"
47+
"kili-formats == 1.0.0"
4748
]
4849
urls = { homepage = "https://github.com/kili-technology/kili-python-sdk" }
4950

@@ -83,7 +84,7 @@ dev = [
8384
"vulture==2.11",
8485
"dead==1.5.2",
8586
# optional dependencies
86-
"kili-formats[all] == 0.2.10",
87+
"kili-formats[all] == 1.0.0",
8788
"opencv-python >= 4.0.0, < 5.0.0",
8889
"azure-storage-blob >= 12.0.0, < 13.0.0",
8990
# optional dependencies gis
@@ -99,7 +100,7 @@ dev = [
99100
all = [
100101
# aggregate all optional deps without dev
101102
"azure-storage-blob >= 12.0.0, < 13.0.0",
102-
"kili-formats[all] == 0.2.10",
103+
"kili-formats[all] == 1.0.0",
103104
"opencv-python >= 4.0.0, < 5.0.0",
104105
"Pillow >=9.0.0, <11.0.0",
105106
"pyproj == 3.7.1",
@@ -112,20 +113,20 @@ cli = [
112113
"tabulate >= 0.9.0, < 0.10.0"
113114
]
114115
coco = [
115-
"kili-formats[coco] == 0.2.10"
116+
"kili-formats[coco] == 1.0.0"
116117
]
117118
gis = [
118119
"pyproj == 3.7.1",
119120
"shapely >= 1.8, < 3"
120121
]
121122
image = [
122123
"Pillow >=9.0.0, <11.0.0",
123-
"kili-formats[image] == 0.2.10"
124+
"kili-formats[image] == 1.0.0"
124125
]
125126
image-utils = ["opencv-python >= 4.0.0, < 5.0.0"]
126127

127128
video = [
128-
"kili-formats[video] == 0.2.10"
129+
"kili-formats[video] == 1.0.0"
129130
]
130131
yolo = [
131132
"pyyaml >= 6.0, < 7.0"

src/kili/use_cases/label/process_shapefiles.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import struct
99
from typing import TYPE_CHECKING, Optional, Union, cast
1010

11-
from cuid import cuid
11+
from cuid2 import cuid_wrapper
12+
13+
cuid = cuid_wrapper()
1214

1315
if TYPE_CHECKING:
1416
from shapely.geometry import LinearRing, LineString, Point, Polygon

src/kili/utils/bucket.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Union
66
from urllib.parse import parse_qs, urlparse
77

8-
import cuid
8+
from cuid2 import cuid_wrapper
99
from tenacity import retry
1010
from tenacity.stop import stop_after_attempt
1111
from tenacity.wait import wait_random
@@ -14,10 +14,12 @@
1414

1515
MAX_NUMBER_SIGNED_URLS_TO_FETCH = 30
1616

17+
_cuid_generator = cuid_wrapper()
18+
1719

1820
def generate_unique_id() -> str:
1921
"""Generate a unique id."""
20-
return cuid.cuid()
22+
return _cuid_generator()
2123

2224

2325
# pylint: disable=missing-type-doc

0 commit comments

Comments
 (0)