Skip to content

Commit 9d1fdc2

Browse files
Merge pull request #1983 from kili-technology/bump/26.1.0
chore: 26.1 baseline
2 parents c3d9a4f + 957a005 commit 9d1fdc2

File tree

239 files changed

+1614
-3360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+1614
-3360
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- uses: actions/checkout@v4
99
- uses: actions/setup-python@v5
1010
with:
11-
python-version: 3.9
11+
python-version: "3.10"
1212
cache: "pip"
1313
- uses: pre-commit/action@v3.0.1
1414

@@ -17,7 +17,7 @@ jobs:
1717
name: Pylint test
1818
strategy:
1919
matrix:
20-
python-version: ["3.9", "3.12"]
20+
python-version: ["3.10", "3.12"]
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Set up Python ${{ matrix.python-version }}
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
strategy:
3939
matrix:
40-
version: ["3.9", "3.12"]
40+
version: ["3.10", "3.12"]
4141
steps:
4242
- uses: actions/checkout@v4
4343
- uses: actions/setup-python@v5
@@ -58,11 +58,11 @@ jobs:
5858
matrix:
5959
include:
6060
- os: ubuntu-latest
61-
python-version: 3.9
61+
python-version: "3.10"
6262
- os: windows-latest
63-
python-version: 3.9
63+
python-version: "3.10"
6464
- os: ubuntu-latest
65-
python-version: 3.12
65+
python-version: "3.12"
6666
runs-on: ${{ matrix.os }}
6767
steps:
6868
- name: Checkout repo
@@ -86,12 +86,19 @@ jobs:
8686
timeout-minutes: 10
8787
runs-on: ubuntu-latest
8888
steps:
89-
- uses: actions/checkout@v4
90-
- uses: lycheeverse/lychee-action@v1.9.3
89+
- uses: actions/checkout@v5
90+
- name: Convert ipynb to markdown
91+
shell: bash
92+
run: |
93+
pip install --quiet nbconvert
94+
# Find all .ipynb files under recipes/ and subfolders and convert them to .md
95+
find recipes -type f -name '*.ipynb' -print0 | while IFS= read -r -d '' file; do
96+
echo "Converting $file"
97+
jupyter nbconvert --to markdown "$file"
98+
done
99+
- uses: lycheeverse/lychee-action@v2
91100
with:
92-
fail: true
93-
debug: false
94-
args: "-qq --no-progress --insecure './**/*.md' './src/kili/**/*.py'"
101+
args: "-qq --no-progress --insecure --accept 200,201,202,203,204,206,207,208,226,301,302,307,308 --max-redirects 5 './**/*.md'"
95102

96103
build-test:
97104
runs-on: ubuntu-latest
@@ -101,7 +108,7 @@ jobs:
101108
- name: Set up Python
102109
uses: actions/setup-python@v5
103110
with:
104-
python-version: 3.9
111+
python-version: "3.10"
105112
cache: "pip"
106113

107114
- name: Install dependencies
@@ -131,7 +138,7 @@ jobs:
131138
- name: Set up Python
132139
uses: actions/setup-python@v5
133140
with:
134-
python-version: 3.9
141+
python-version: "3.10"
135142
cache: "pip"
136143

137144
- name: Install dependencies

.github/workflows/deploy_doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Set up Python
4141
uses: actions/setup-python@v5
4242
with:
43-
python-version: 3.9
43+
python-version: "3.10"
4444
cache: "pip"
4545

4646
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Python
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.9
19+
python-version: "3.10"
2020
cache: "pip"
2121

2222
- name: Install dependencies
@@ -48,7 +48,7 @@ jobs:
4848
fi
4949
5050
- name: Publish to PyPI
51-
uses: pypa/gh-action-pypi-publish@v1.12.4
51+
uses: pypa/gh-action-pypi-publish@v1.13.0
5252
with:
5353
verbose: true
5454

.lycheeignore

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
^(http|https)://cloud.kili-technology.com/api/label/v2/graphql$
2-
https://my-custom-url-publicly-accessible/
3-
https://to/second/asset.png
4-
jane.doe@test.com
5-
john@doe.com
6-
john.doe@test.com
7-
https://tagtog.com/JaqenNLP/ApartmentReview
8-
https://tagtog.com/JaqenNLP/ApartmentReviews/-settings
9-
https://platform.openai.com/docs/models/overview
1+
# Ignore localhost and local network addresses
2+
http://localhost:*
3+
http://127.0.0.1:*
4+
5+
# Ignore GraphQL endpoints (they return 400 for GET requests)
6+
http://localhost:4001/api/label/v2/graphql*
7+
https://cloud.kili-technology.com/api/label/v2/graphql*
8+
9+
# Ignore OpenAI documentation (403 errors due to bot protection)
10+
https://help.openai.com/*
11+
https://platform.openai.com/*

.pylintrc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ persistent=yes
8888

8989
# Minimum Python version to use for version dependent checks. Will default to
9090
# the version used to run pylint.
91-
py-version=3.9
91+
py-version=3.10
9292

9393
# Discover python modules and packages in the file system subtree.
9494
recursive=no
@@ -99,10 +99,6 @@ recursive=no
9999
# source root.
100100
source-roots=
101101

102-
# When enabled, pylint would attempt to guess common misconfiguration and emit
103-
# user-friendly hints instead of false-positive error messages.
104-
suggestion-mode=yes
105-
106102
# Allow loading of arbitrary C extensions. Extensions are imported into the
107103
# active Python interpreter and may run arbitrary code.
108104
unsafe-load-any-extension=no
@@ -437,6 +433,7 @@ disable=raw-checker-failed,
437433
too-few-public-methods,
438434
too-many-ancestors,
439435
too-many-arguments,
436+
too-many-positional-arguments,
440437
too-many-instance-attributes,
441438
too-many-locals,
442439
fixme,

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Set up the Development environment
44

5-
To install the development environment, please follow these steps, preferably in a Python 3.9 virtual environment.
5+
To install the development environment, please follow these steps, preferably in a Python 3.10 virtual environment.
66

77
```bash
88
pip install -e ".[dev]"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Kili Python SDK
22

3-
[![Python 3.9](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)](https://www.python.org/)
3+
[![Python 3.10](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://www.python.org/)
44
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
55
![GitHub release (latest by date)](https://img.shields.io/github/v/release/kili-technology/kili-python-sdk?label=pypi%20package)
66

@@ -36,7 +36,7 @@ It comes with several [tutorials](https://python-sdk-docs.kili-technology.com/la
3636

3737
## Requirements
3838

39-
- Python >= 3.9
39+
- Python >= 3.10
4040
- Create and copy a [Kili API key](https://docs.kili-technology.com/docs/creating-an-api-key)
4141
- Add the `KILI_API_KEY` variable in your bash environment (or in the settings of your favorite IDE) by pasting the API key value you copied above:
4242

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Kili Python SDK has been designed to perform complex project-related tasks by us
1414

1515
## Requirements
1616

17-
You only need Python 3.9 or higher.
17+
You only need Python 3.10 or higher.
1818

1919
## Installation
2020

docs/sdk/tutorials/finetuning_dinov2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ We can then prepare the assets to be uploaded to Kili:
188188
# sort the assets by alternating between classes so that both
189189
# classes show up in the first page of the labeling interface
190190
content_array = []
191-
iterator = zip((data_dir / "def_front").iterdir(), (data_dir / "ok_front").iterdir())
191+
iterator = zip((data_dir / "def_front").iterdir(), (data_dir / "ok_front").iterdir(), strict=False)
192192
for filepath_def, filepath_ok in iterator:
193193
content_array.append(filepath_def)
194194
content_array.append(filepath_ok)

docs/sdk/tutorials/importing_coco.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,17 +548,15 @@ Below, we import some useful functions to convert annotations to Kili label form
548548

549549

550550
```python
551-
from typing import Dict, List
552-
553551
from kili.utils.labels.bbox import bbox_points_to_normalized_vertices, point_to_normalized_point
554552
from kili.utils.labels.image import mask_to_normalized_vertices
555553
```
556554

557555

558556
```python
559557
def coco_bbox_annotation_to_normalized_vertices(
560-
coco_ann: Dict, *, img_width: int, img_height: int
561-
) -> List[Dict]:
558+
coco_ann: dict, *, img_width: int, img_height: int
559+
) -> list[dict]:
562560
x, y, width, height = coco_ann["bbox"]
563561
ret = bbox_points_to_normalized_vertices(
564562
bottom_left={"x": x, "y": y + height},
@@ -575,8 +573,8 @@ def coco_bbox_annotation_to_normalized_vertices(
575573

576574
```python
577575
def coco_segm_annotation_to_normalized_vertices(
578-
coco_ann: Dict, *, img_width: int, img_height: int
579-
) -> List[List[Dict]]:
576+
coco_ann: dict, *, img_width: int, img_height: int
577+
) -> list[list[dict]]:
580578
coco_segmentations = coco_ann["segmentation"]
581579

582580
ret = []
@@ -590,7 +588,7 @@ def coco_segm_annotation_to_normalized_vertices(
590588
img_width=img_width,
591589
origin_location="top_left",
592590
)
593-
for x, y in zip(coco_segm[::2], coco_segm[1::2])
591+
for x, y in zip(coco_segm[::2], coco_segm[1::2], strict=False)
594592
]
595593
ret.append(vertices)
596594

@@ -706,6 +704,7 @@ for image_id in external_id_array:
706704
keypoints[1::3],
707705
keypoints[2::3],
708706
person_keypoints_val2017["categories"][0]["keypoints"],
707+
strict=False,
709708
):
710709
if x == y == visibility == 0:
711710
continue

0 commit comments

Comments
 (0)