Skip to content

V6 #1819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Oct 11, 2024
Merged

V6 #1819

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c1d39f7
[PLT-1463] Removed ND deserialize from some unit test part 1 (#1804)
Gabefire Sep 16, 2024
b26b11d
[PLT-1463] Removed ND deserialize from some unit test part 2 (#1815)
Gabefire Sep 16, 2024
4249a57
[PLT-1274] Vb/deprecate bulkimportrequest plt 1274 (#1821)
vbrodsky Sep 17, 2024
0a63a40
[PLT-1463] Remove deserialize completely (#1818)
Gabefire Sep 18, 2024
9e8bc45
[PLT-1488] Removed coco (#1820)
Gabefire Sep 18, 2024
75b5bc4
[PLT-1506] Added Ruff linting to SDK (#1822)
Gabefire Sep 20, 2024
4caafc1
Vb/refactor client plt 1385 2 (#1834)
vbrodsky Sep 20, 2024
12ab4cb
[PLT-1466] Vb/fix labeling service error reporting plt 1466 2 (#1836)
vbrodsky Sep 23, 2024
f8c9dbc
[PLT-1485] Removed Datatypes (#1830)
Gabefire Sep 23, 2024
250e063
[PLT-1560] Remove experiment requirement from UserGroup (#1840)
Gabefire Sep 25, 2024
e362281
[PLT-1471] Remove pydantic v2 deprecate warnings (#1838)
Gabefire Sep 25, 2024
87ae787
[PLT-1273] Removed setup_editor (#1841)
Gabefire Sep 25, 2024
d4986a0
[PLT-1154] Vb/refactor project inputs plt 1154 (#1844)
vbrodsky Sep 25, 2024
8b905b1
[PLT-1489] Removed get stream and corresponding classes (#1839)
Gabefire Sep 26, 2024
1cd8df5
[PLT-46] Add method / heurisrtics to extract original sdk method name…
vbrodsky Sep 26, 2024
58700f5
[PLT-1490] Removed project.setup (#1843)
Gabefire Sep 26, 2024
33983c1
Vb/remove p3.8 plt 502 (#1847)
vbrodsky Sep 27, 2024
aa5c5ee
Vb/merge 5.1.0 (#1850)
vbrodsky Sep 30, 2024
ae80326
[PLT-1490] Removed data row ids list on some project methods and remo…
Gabefire Oct 2, 2024
a7ebd42
[PLT-1584] Removed remaining deprecated messages from tests (#1854)
Gabefire Oct 8, 2024
91b61dc
[PLT-1487] Remaining sdk deprecated items removed (#1853)
Gabefire Oct 8, 2024
da0b644
[PLT-1580] Cleaned up typed array (#1858)
Gabefire Oct 8, 2024
4ac555b
[PLT-1583] Deprecated export v2 (#1865)
Gabefire Oct 10, 2024
50e917d
Vb/merge 5.2 2 (#1867)
vbrodsky Oct 11, 2024
c16ea89
Remove v6 from github build actions
Oct 11, 2024
960968b
Fix tests
Oct 11, 2024
79793ca
Fix linting
Oct 11, 2024
c28b503
Fix tests
Oct 11, 2024
4a7efb7
:memo: README updated
github-actions[bot] Oct 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/actions/lbox-matrix/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26811,11 +26811,6 @@ const core = __nccwpck_require__(8611);
try {
const files = JSON.parse(core.getInput('files-changed'));
const startingMatrix = [
{
"python-version": "3.8",
"api-key": "STAGING_LABELBOX_API_KEY_2",
"da-test-key": "DA_GCP_LABELBOX_API_KEY"
},
{
"python-version": "3.9",
"api-key": "STAGING_LABELBOX_API_KEY_3",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lbox-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- uses: ./.github/actions/python-package-shared-setup
with:
rye-version: ${{ vars.RYE_VERSION }}
python-version: '3.8'
python-version: '3.9'
- name: Create build
id: create-build
working-directory: libs/${{ matrix.package }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 3.8
prod-key: PROD_LABELBOX_API_KEY_2
da-test-key: DA_GCP_LABELBOX_API_KEY
- python-version: 3.9
prod-key: PROD_LABELBOX_API_KEY_3
da-test-key: DA_GCP_LABELBOX_API_KEY
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/python-package-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Get Latest SDK versions
id: get_sdk_versions
run: |
sdk_versions=$(git tag --list --sort=-version:refname "v.*" | head -n 4 | jq -R -s -c 'split("\n")[:-1]')
sdk_versions=$(git tag --list --sort=-version:refname "v.*" | head -n 3 | jq -R -s -c 'split("\n")[:-1]')
if [ -z "$sdk_versions" ]; then
echo "No tags found"
exit 1
Expand All @@ -58,10 +58,6 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 3.8
api-key: STAGING_LABELBOX_API_KEY_2
da-test-key: DA_GCP_LABELBOX_API_KEY
sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[3] }}
- python-version: 3.9
api-key: STAGING_LABELBOX_API_KEY_3
da-test-key: DA_GCP_LABELBOX_API_KEY
Expand Down Expand Up @@ -103,7 +99,7 @@ jobs:
- uses: ./.github/actions/python-package-shared-setup
with:
rye-version: ${{ vars.RYE_VERSION }}
python-version: '3.8'
python-version: '3.9'
- name: Create build
id: create-build
working-directory: libs/labelbox
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python-package-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 3.8
api-key: PROD_LABELBOX_API_KEY_2
da-test-key: DA_GCP_LABELBOX_API_KEY
- python-version: 3.9
api-key: PROD_LABELBOX_API_KEY_3
da-test-key: DA_GCP_LABELBOX_API_KEY
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.18
3.9.18
2 changes: 1 addition & 1 deletion docs/labelbox/exceptions.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Exceptions
===============================================================================================

.. automodule:: labelbox.exceptions
.. automodule:: lbox.exceptions
:members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/labelbox/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Labelbox Python SDK Documentation
project
project-model-config
quality-mode
request-client
resource-tag
review
search-filters
Expand Down
6 changes: 6 additions & 0 deletions docs/labelbox/request-client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Request Client
===============================================================================================

.. automodule:: lbox.request_client
:members:
:show-inheritance:
184 changes: 92 additions & 92 deletions examples/README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Labelbox Python Example Notebooks"
authors = [{ name = "Labelbox", email = "docs@labelbox.com" }]
readme = "README.md"
# Python version matches labelbox SDK
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = []

[project.urls]
Expand All @@ -22,8 +22,8 @@ dev-dependencies = [
"yapf>=0.40.2",
"black[jupyter]>=24.4.2",
"databooks>=1.3.10",
# higher versions dont support python 3.8
"pandas>=2.0.3",
# higher versions dont support python 3.9
"pandas>=2.2.3",
]

[tool.rye.scripts]
Expand Down
4 changes: 2 additions & 2 deletions libs/labelbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/ucyo/python-package-template/blob/master/Dockerfile
FROM python:3.8-slim as rye
FROM python:3.9-slim as rye

ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8" \
Expand Down Expand Up @@ -38,7 +38,7 @@ WORKDIR /home/python/labelbox-python

RUN rye config --set-bool behavior.global-python=true && \
rye config --set-bool behavior.use-uv=true && \
rye pin 3.8 && \
rye pin 3.9 && \
rye sync

CMD cd libs/labelbox && rye run integration && rye sync -f --features labelbox/data && rye run unit && rye run data
5 changes: 4 additions & 1 deletion libs/labelbox/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ ignore_missing_imports = True
ignore_errors = True

[mypy-labelbox]
ignore_errors = True
ignore_errors = True

[mypy-lbox.exceptions]
ignore_missing_imports = True
15 changes: 10 additions & 5 deletions libs/labelbox/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ dependencies = [
"tqdm>=4.66.2",
"geojson>=3.1.0",
"mypy==1.10.1",
"lbox-clients==1.1.0",
]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9,<3.13"
classifiers = [
# How mature is this project?
"Development Status :: 5 - Production/Stable",
Expand All @@ -28,7 +29,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
# Specify the Python versions you support here.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -46,8 +46,7 @@ Changelog = "https://github.com/Labelbox/labelbox-python/blob/develop/libs/label
[project.optional-dependencies]
data = [
"shapely>=2.0.3",
# numpy v2 breaks package since it only supports python >3.9
"numpy>=1.24.4, <2.0.0",
"numpy>=1.25.0",
"pillow>=10.2.0",
"typeguard>=4.1.5",
"imagesize>=1.4.1",
Expand All @@ -74,6 +73,10 @@ dev-dependencies = [
[tool.ruff]
line-length = 80

[tool.ruff.lint]
ignore = ["F", "E722"]
exclude = ["**/__init__.py"]

[tool.rye.scripts]
unit = "pytest tests/unit"
# https://github.com/Labelbox/labelbox-python/blob/7c84fdffbc14fd1f69d2a6abdcc0087dc557fa4e/Makefile
Expand All @@ -89,9 +92,11 @@ unit = "pytest tests/unit"
# LABELBOX_TEST_BASE_URL="http://host.docker.internal:8080" \
integration = { cmd = "pytest tests/integration" }
data = { cmd = "pytest tests/data" }
rye-lint = "rye lint"
rye-fmt-check = "rye fmt --check"
MYPYPATH = "../lbox-clients/src/"
mypy-lint = "mypy src --pretty --show-error-codes --non-interactive --install-types"
lint = { chain = ["mypy-lint", "rye-fmt-check"] }
lint = { chain = ["rye-fmt-check", "mypy-lint", "rye-lint"] }
test = { chain = ["lint", "unit", "integration"] }

[tool.hatch.metadata]
Expand Down
29 changes: 23 additions & 6 deletions libs/labelbox/src/labelbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from labelbox.schema.asset_attachment import AssetAttachment
from labelbox.schema.batch import Batch
from labelbox.schema.benchmark import Benchmark
from labelbox.schema.bulk_import_request import BulkImportRequest
from labelbox.schema.catalog import Catalog
from labelbox.schema.data_row import DataRow
from labelbox.schema.data_row_metadata import (
Expand All @@ -26,10 +25,7 @@
from labelbox.schema.export_task import (
BufferedJsonConverterOutput,
ExportTask,
FileConverter,
FileConverterOutput,
JsonConverter,
JsonConverterOutput,
BufferedJsonConverterOutput,
StreamType,
)
from labelbox.schema.iam_integration import IAMIntegration
Expand Down Expand Up @@ -59,6 +55,28 @@
ResponseOption,
Tool,
)
from labelbox.schema.ontology import PromptResponseClassification
from labelbox.schema.ontology import ResponseOption
from labelbox.schema.role import Role, ProjectRole
from labelbox.schema.invite import Invite, InviteLimit
from labelbox.schema.data_row_metadata import (
DataRowMetadataOntology,
DataRowMetadataField,
DataRowMetadata,
DeleteDataRowMetadata,
)
from labelbox.schema.model_run import ModelRun, DataSplit
from labelbox.schema.benchmark import Benchmark
from labelbox.schema.iam_integration import IAMIntegration
from labelbox.schema.resource_tag import ResourceTag
from labelbox.schema.project_model_config import ProjectModelConfig
from labelbox.schema.project_resource_tag import ProjectResourceTag
from labelbox.schema.media_type import MediaType
from labelbox.schema.slice import Slice, CatalogSlice, ModelSlice
from labelbox.schema.task_queue import TaskQueue
from labelbox.schema.label_score import LabelScore
from labelbox.schema.identifiables import UniqueIds, GlobalKeys, DataRowIds
from labelbox.schema.identifiable import UniqueId, GlobalKey
from labelbox.schema.ontology_kind import OntologyKind
from labelbox.schema.organization import Organization
from labelbox.schema.project import Project
Expand All @@ -68,7 +86,6 @@
ProjectOverviewDetailed,
)
from labelbox.schema.project_resource_tag import ProjectResourceTag
from labelbox.schema.queue_mode import QueueMode
from labelbox.schema.resource_tag import ResourceTag
from labelbox.schema.review import Review
from labelbox.schema.role import ProjectRole, Role
Expand Down
6 changes: 3 additions & 3 deletions libs/labelbox/src/labelbox/adv_client.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import io
import json
import logging
from typing import Dict, Any, Optional, List, Callable
from typing import Any, Callable, Dict, List, Optional
from urllib.parse import urlparse
from labelbox.exceptions import LabelboxError

import requests
from requests import Session, Response
from lbox.exceptions import LabelboxError
from requests import Response, Session

logger = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions libs/labelbox/src/labelbox/annotated_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing_extensions import Annotated
from typing import Annotated

from pydantic import Field


Cuid = Annotated[str, Field(min_length=25, max_length=25)]
Loading